code
stringlengths
1
1.05M
repo_name
stringlengths
6
83
path
stringlengths
3
242
language
stringclasses
222 values
license
stringclasses
20 values
size
int64
1
1.05M
package com.ruoyi.system.mapper; import java.util.List; import org.apache.ibatis.annotations.Param; import com.ruoyi.common.core.domain.entity.SysDept; /** * 部门管理 数据层 * * @author ruoyi */ public interface SysDeptMapper { /** * 查询部门管理数据 * * @param dept 部门信息 * @return 部门信息集合 */ public List<SysDept> selectDeptList(SysDept dept); /** * 根据角色ID查询部门树信息 * * @param roleId 角色ID * @param deptCheckStrictly 部门树选择项是否关联显示 * @return 选中部门列表 */ public List<Long> selectDeptListByRoleId(@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly); /** * 根据部门ID查询信息 * * @param deptId 部门ID * @return 部门信息 */ public SysDept selectDeptById(Long deptId); /** * 根据ID查询所有子部门 * * @param deptId 部门ID * @return 部门列表 */ public List<SysDept> selectChildrenDeptById(Long deptId); /** * 根据ID查询所有子部门(正常状态) * * @param deptId 部门ID * @return 子部门数 */ public int selectNormalChildrenDeptById(Long deptId); /** * 是否存在子节点 * * @param deptId 部门ID * @return 结果 */ public int hasChildByDeptId(Long deptId); /** * 查询部门是否存在用户 * * @param deptId 部门ID * @return 结果 */ public int checkDeptExistUser(Long deptId); /** * 校验部门名称是否唯一 * * @param deptName 部门名称 * @param parentId 父部门ID * @return 结果 */ public SysDept checkDeptNameUnique(@Param("deptName") String deptName, @Param("parentId") Long parentId); /** * 新增部门信息 * * @param dept 部门信息 * @return 结果 */ public int insertDept(SysDept dept); /** * 修改部门信息 * * @param dept 部门信息 * @return 结果 */ public int updateDept(SysDept dept); /** * 修改所在部门正常状态 * * @param deptIds 部门ID组 */ public void updateDeptStatusNormal(Long[] deptIds); /** * 修改子元素关系 * * @param depts 子元素 * @return 结果 */ public int updateDeptChildren(@Param("depts") List<SysDept> depts); /** * 删除部门管理信息 * * @param deptId 部门ID * @return 结果 */ public int deleteDeptById(Long deptId); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java
Java
mit
2,653
package com.ruoyi.system.mapper; import java.util.List; import org.apache.ibatis.annotations.Param; import com.ruoyi.common.core.domain.entity.SysDictData; /** * 字典表 数据层 * * @author ruoyi */ public interface SysDictDataMapper { /** * 根据条件分页查询字典数据 * * @param dictData 字典数据信息 * @return 字典数据集合信息 */ public List<SysDictData> selectDictDataList(SysDictData dictData); /** * 根据字典类型查询字典数据 * * @param dictType 字典类型 * @return 字典数据集合信息 */ public List<SysDictData> selectDictDataByType(String dictType); /** * 根据字典类型和字典键值查询字典数据信息 * * @param dictType 字典类型 * @param dictValue 字典键值 * @return 字典标签 */ public String selectDictLabel(@Param("dictType") String dictType, @Param("dictValue") String dictValue); /** * 根据字典数据ID查询信息 * * @param dictCode 字典数据ID * @return 字典数据 */ public SysDictData selectDictDataById(Long dictCode); /** * 查询字典数据 * * @param dictType 字典类型 * @return 字典数据 */ public int countDictDataByType(String dictType); /** * 通过字典ID删除字典数据信息 * * @param dictCode 字典数据ID * @return 结果 */ public int deleteDictDataById(Long dictCode); /** * 批量删除字典数据信息 * * @param dictCodes 需要删除的字典数据ID * @return 结果 */ public int deleteDictDataByIds(Long[] dictCodes); /** * 新增字典数据信息 * * @param dictData 字典数据信息 * @return 结果 */ public int insertDictData(SysDictData dictData); /** * 修改字典数据信息 * * @param dictData 字典数据信息 * @return 结果 */ public int updateDictData(SysDictData dictData); /** * 同步修改字典类型 * * @param oldDictType 旧字典类型 * @param newDictType 新旧字典类型 * @return 结果 */ public int updateDictDataType(@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictDataMapper.java
Java
mit
2,347
package com.ruoyi.system.mapper; import java.util.List; import com.ruoyi.common.core.domain.entity.SysDictType; /** * 字典表 数据层 * * @author ruoyi */ public interface SysDictTypeMapper { /** * 根据条件分页查询字典类型 * * @param dictType 字典类型信息 * @return 字典类型集合信息 */ public List<SysDictType> selectDictTypeList(SysDictType dictType); /** * 根据所有字典类型 * * @return 字典类型集合信息 */ public List<SysDictType> selectDictTypeAll(); /** * 根据字典类型ID查询信息 * * @param dictId 字典类型ID * @return 字典类型 */ public SysDictType selectDictTypeById(Long dictId); /** * 根据字典类型查询信息 * * @param dictType 字典类型 * @return 字典类型 */ public SysDictType selectDictTypeByType(String dictType); /** * 通过字典ID删除字典信息 * * @param dictId 字典ID * @return 结果 */ public int deleteDictTypeById(Long dictId); /** * 批量删除字典类型信息 * * @param dictIds 需要删除的字典ID * @return 结果 */ public int deleteDictTypeByIds(Long[] dictIds); /** * 新增字典类型信息 * * @param dictType 字典类型信息 * @return 结果 */ public int insertDictType(SysDictType dictType); /** * 修改字典类型信息 * * @param dictType 字典类型信息 * @return 结果 */ public int updateDictType(SysDictType dictType); /** * 校验字典类型称是否唯一 * * @param dictType 字典类型 * @return 结果 */ public SysDictType checkDictTypeUnique(String dictType); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictTypeMapper.java
Java
mit
1,828
package com.ruoyi.system.mapper; import java.util.List; import com.ruoyi.system.domain.SysLogininfor; /** * 系统访问日志情况信息 数据层 * * @author ruoyi */ public interface SysLogininforMapper { /** * 新增系统登录日志 * * @param logininfor 访问日志对象 */ public void insertLogininfor(SysLogininfor logininfor); /** * 查询系统登录日志集合 * * @param logininfor 访问日志对象 * @return 登录记录集合 */ public List<SysLogininfor> selectLogininforList(SysLogininfor logininfor); /** * 批量删除系统登录日志 * * @param infoIds 需要删除的登录日志ID * @return 结果 */ public int deleteLogininforByIds(Long[] infoIds); /** * 清空系统登录日志 * * @return 结果 */ public int cleanLogininfor(); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysLogininforMapper.java
Java
mit
902
package com.ruoyi.system.mapper; import java.util.List; import org.apache.ibatis.annotations.Param; import com.ruoyi.common.core.domain.entity.SysMenu; /** * 菜单表 数据层 * * @author ruoyi */ public interface SysMenuMapper { /** * 查询系统菜单列表 * * @param menu 菜单信息 * @return 菜单列表 */ public List<SysMenu> selectMenuList(SysMenu menu); /** * 根据用户所有权限 * * @return 权限列表 */ public List<String> selectMenuPerms(); /** * 根据用户查询系统菜单列表 * * @param menu 菜单信息 * @return 菜单列表 */ public List<SysMenu> selectMenuListByUserId(SysMenu menu); /** * 根据角色ID查询权限 * * @param roleId 角色ID * @return 权限列表 */ public List<String> selectMenuPermsByRoleId(Long roleId); /** * 根据用户ID查询权限 * * @param userId 用户ID * @return 权限列表 */ public List<String> selectMenuPermsByUserId(Long userId); /** * 根据用户ID查询菜单 * * @return 菜单列表 */ public List<SysMenu> selectMenuTreeAll(); /** * 根据用户ID查询菜单 * * @param userId 用户ID * @return 菜单列表 */ public List<SysMenu> selectMenuTreeByUserId(Long userId); /** * 根据角色ID查询菜单树信息 * * @param roleId 角色ID * @param menuCheckStrictly 菜单树选择项是否关联显示 * @return 选中菜单列表 */ public List<Long> selectMenuListByRoleId(@Param("roleId") Long roleId, @Param("menuCheckStrictly") boolean menuCheckStrictly); /** * 根据菜单ID查询信息 * * @param menuId 菜单ID * @return 菜单信息 */ public SysMenu selectMenuById(Long menuId); /** * 是否存在菜单子节点 * * @param menuId 菜单ID * @return 结果 */ public int hasChildByMenuId(Long menuId); /** * 新增菜单信息 * * @param menu 菜单信息 * @return 结果 */ public int insertMenu(SysMenu menu); /** * 修改菜单信息 * * @param menu 菜单信息 * @return 结果 */ public int updateMenu(SysMenu menu); /** * 删除菜单管理信息 * * @param menuId 菜单ID * @return 结果 */ public int deleteMenuById(Long menuId); /** * 校验菜单名称是否唯一 * * @param menuName 菜单名称 * @param parentId 父菜单ID * @return 结果 */ public SysMenu checkMenuNameUnique(@Param("menuName") String menuName, @Param("parentId") Long parentId); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java
Java
mit
2,755
package com.ruoyi.system.mapper; import java.util.List; import com.ruoyi.system.domain.SysNotice; /** * 通知公告表 数据层 * * @author ruoyi */ public interface SysNoticeMapper { /** * 查询公告信息 * * @param noticeId 公告ID * @return 公告信息 */ public SysNotice selectNoticeById(Long noticeId); /** * 查询公告列表 * * @param notice 公告信息 * @return 公告集合 */ public List<SysNotice> selectNoticeList(SysNotice notice); /** * 新增公告 * * @param notice 公告信息 * @return 结果 */ public int insertNotice(SysNotice notice); /** * 修改公告 * * @param notice 公告信息 * @return 结果 */ public int updateNotice(SysNotice notice); /** * 批量删除公告 * * @param noticeId 公告ID * @return 结果 */ public int deleteNoticeById(Long noticeId); /** * 批量删除公告信息 * * @param noticeIds 需要删除的公告ID * @return 结果 */ public int deleteNoticeByIds(Long[] noticeIds); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysNoticeMapper.java
Java
mit
1,163
package com.ruoyi.system.mapper; import java.util.List; import com.ruoyi.system.domain.SysOperLog; /** * 操作日志 数据层 * * @author ruoyi */ public interface SysOperLogMapper { /** * 新增操作日志 * * @param operLog 操作日志对象 */ public void insertOperlog(SysOperLog operLog); /** * 查询系统操作日志集合 * * @param operLog 操作日志对象 * @return 操作日志集合 */ public List<SysOperLog> selectOperLogList(SysOperLog operLog); /** * 批量删除系统操作日志 * * @param operIds 需要删除的操作日志ID * @return 结果 */ public int deleteOperLogByIds(Long[] operIds); /** * 查询操作日志详细 * * @param operId 操作ID * @return 操作日志对象 */ public SysOperLog selectOperLogById(Long operId); /** * 清空操作日志 */ public void cleanOperLog(); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysOperLogMapper.java
Java
mit
979
package com.ruoyi.system.mapper; import java.util.List; import com.ruoyi.system.domain.SysPost; /** * 岗位信息 数据层 * * @author ruoyi */ public interface SysPostMapper { /** * 查询岗位数据集合 * * @param post 岗位信息 * @return 岗位数据集合 */ public List<SysPost> selectPostList(SysPost post); /** * 查询所有岗位 * * @return 岗位列表 */ public List<SysPost> selectPostAll(); /** * 通过岗位ID查询岗位信息 * * @param postId 岗位ID * @return 角色对象信息 */ public SysPost selectPostById(Long postId); /** * 根据用户ID获取岗位选择框列表 * * @param userId 用户ID * @return 选中岗位ID列表 */ public List<Long> selectPostListByUserId(Long userId); /** * 查询用户所属岗位组 * * @param userName 用户名 * @return 结果 */ public List<SysPost> selectPostsByUserName(String userName); /** * 删除岗位信息 * * @param postId 岗位ID * @return 结果 */ public int deletePostById(Long postId); /** * 批量删除岗位信息 * * @param postIds 需要删除的岗位ID * @return 结果 */ public int deletePostByIds(Long[] postIds); /** * 修改岗位信息 * * @param post 岗位信息 * @return 结果 */ public int updatePost(SysPost post); /** * 新增岗位信息 * * @param post 岗位信息 * @return 结果 */ public int insertPost(SysPost post); /** * 校验岗位名称 * * @param postName 岗位名称 * @return 结果 */ public SysPost checkPostNameUnique(String postName); /** * 校验岗位编码 * * @param postCode 岗位编码 * @return 结果 */ public SysPost checkPostCodeUnique(String postCode); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysPostMapper.java
Java
mit
1,986
package com.ruoyi.system.mapper; import java.util.List; import com.ruoyi.system.domain.SysRoleDept; /** * 角色与部门关联表 数据层 * * @author ruoyi */ public interface SysRoleDeptMapper { /** * 通过角色ID删除角色和部门关联 * * @param roleId 角色ID * @return 结果 */ public int deleteRoleDeptByRoleId(Long roleId); /** * 批量删除角色部门关联信息 * * @param ids 需要删除的数据ID * @return 结果 */ public int deleteRoleDept(Long[] ids); /** * 查询部门使用数量 * * @param deptId 部门ID * @return 结果 */ public int selectCountRoleDeptByDeptId(Long deptId); /** * 批量新增角色部门信息 * * @param roleDeptList 角色部门列表 * @return 结果 */ public int batchRoleDept(List<SysRoleDept> roleDeptList); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleDeptMapper.java
Java
mit
920
package com.ruoyi.system.mapper; import java.util.List; import com.ruoyi.common.core.domain.entity.SysRole; /** * 角色表 数据层 * * @author ruoyi */ public interface SysRoleMapper { /** * 根据条件分页查询角色数据 * * @param role 角色信息 * @return 角色数据集合信息 */ public List<SysRole> selectRoleList(SysRole role); /** * 根据用户ID查询角色 * * @param userId 用户ID * @return 角色列表 */ public List<SysRole> selectRolePermissionByUserId(Long userId); /** * 查询所有角色 * * @return 角色列表 */ public List<SysRole> selectRoleAll(); /** * 根据用户ID获取角色选择框列表 * * @param userId 用户ID * @return 选中角色ID列表 */ public List<Long> selectRoleListByUserId(Long userId); /** * 通过角色ID查询角色 * * @param roleId 角色ID * @return 角色对象信息 */ public SysRole selectRoleById(Long roleId); /** * 根据用户ID查询角色 * * @param userName 用户名 * @return 角色列表 */ public List<SysRole> selectRolesByUserName(String userName); /** * 校验角色名称是否唯一 * * @param roleName 角色名称 * @return 角色信息 */ public SysRole checkRoleNameUnique(String roleName); /** * 校验角色权限是否唯一 * * @param roleKey 角色权限 * @return 角色信息 */ public SysRole checkRoleKeyUnique(String roleKey); /** * 修改角色信息 * * @param role 角色信息 * @return 结果 */ public int updateRole(SysRole role); /** * 新增角色信息 * * @param role 角色信息 * @return 结果 */ public int insertRole(SysRole role); /** * 通过角色ID删除角色 * * @param roleId 角色ID * @return 结果 */ public int deleteRoleById(Long roleId); /** * 批量删除角色信息 * * @param roleIds 需要删除的角色ID * @return 结果 */ public int deleteRoleByIds(Long[] roleIds); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java
Java
mit
2,238
package com.ruoyi.system.mapper; import java.util.List; import com.ruoyi.system.domain.SysRoleMenu; /** * 角色与菜单关联表 数据层 * * @author ruoyi */ public interface SysRoleMenuMapper { /** * 查询菜单使用数量 * * @param menuId 菜单ID * @return 结果 */ public int checkMenuExistRole(Long menuId); /** * 通过角色ID删除角色和菜单关联 * * @param roleId 角色ID * @return 结果 */ public int deleteRoleMenuByRoleId(Long roleId); /** * 批量删除角色菜单关联信息 * * @param ids 需要删除的数据ID * @return 结果 */ public int deleteRoleMenu(Long[] ids); /** * 批量新增角色菜单信息 * * @param roleMenuList 角色菜单列表 * @return 结果 */ public int batchRoleMenu(List<SysRoleMenu> roleMenuList); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMenuMapper.java
Java
mit
911
package com.ruoyi.system.mapper; import java.util.List; import org.apache.ibatis.annotations.Param; import com.ruoyi.common.core.domain.entity.SysUser; /** * 用户表 数据层 * * @author ruoyi */ public interface SysUserMapper { /** * 根据条件分页查询用户列表 * * @param sysUser 用户信息 * @return 用户信息集合信息 */ public List<SysUser> selectUserList(SysUser sysUser); /** * 根据条件分页查询已配用户角色列表 * * @param user 用户信息 * @return 用户信息集合信息 */ public List<SysUser> selectAllocatedList(SysUser user); /** * 根据条件分页查询未分配用户角色列表 * * @param user 用户信息 * @return 用户信息集合信息 */ public List<SysUser> selectUnallocatedList(SysUser user); /** * 通过用户名查询用户 * * @param userName 用户名 * @return 用户对象信息 */ public SysUser selectUserByUserName(String userName); /** * 通过用户ID查询用户 * * @param userId 用户ID * @return 用户对象信息 */ public SysUser selectUserById(Long userId); /** * 新增用户信息 * * @param user 用户信息 * @return 结果 */ public int insertUser(SysUser user); /** * 修改用户信息 * * @param user 用户信息 * @return 结果 */ public int updateUser(SysUser user); /** * 修改用户头像 * * @param userName 用户名 * @param avatar 头像地址 * @return 结果 */ public int updateUserAvatar(@Param("userName") String userName, @Param("avatar") String avatar); /** * 重置用户密码 * * @param userName 用户名 * @param password 密码 * @return 结果 */ public int resetUserPwd(@Param("userName") String userName, @Param("password") String password); /** * 通过用户ID删除用户 * * @param userId 用户ID * @return 结果 */ public int deleteUserById(Long userId); /** * 批量删除用户信息 * * @param userIds 需要删除的用户ID * @return 结果 */ public int deleteUserByIds(Long[] userIds); /** * 校验用户名称是否唯一 * * @param userName 用户名称 * @return 结果 */ public SysUser checkUserNameUnique(String userName); /** * 校验手机号码是否唯一 * * @param phonenumber 手机号码 * @return 结果 */ public SysUser checkPhoneUnique(String phonenumber); /** * 校验email是否唯一 * * @param email 用户邮箱 * @return 结果 */ public SysUser checkEmailUnique(String email); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java
Java
mit
2,846
package com.ruoyi.system.mapper; import java.util.List; import com.ruoyi.system.domain.SysUserPost; /** * 用户与岗位关联表 数据层 * * @author ruoyi */ public interface SysUserPostMapper { /** * 通过用户ID删除用户和岗位关联 * * @param userId 用户ID * @return 结果 */ public int deleteUserPostByUserId(Long userId); /** * 通过岗位ID查询岗位使用数量 * * @param postId 岗位ID * @return 结果 */ public int countUserPostById(Long postId); /** * 批量删除用户和岗位关联 * * @param ids 需要删除的数据ID * @return 结果 */ public int deleteUserPost(Long[] ids); /** * 批量新增用户岗位信息 * * @param userPostList 用户岗位列表 * @return 结果 */ public int batchUserPost(List<SysUserPost> userPostList); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java
Java
mit
921
package com.ruoyi.system.mapper; import java.util.List; import org.apache.ibatis.annotations.Param; import com.ruoyi.system.domain.SysUserRole; /** * 用户与角色关联表 数据层 * * @author ruoyi */ public interface SysUserRoleMapper { /** * 通过用户ID删除用户和角色关联 * * @param userId 用户ID * @return 结果 */ public int deleteUserRoleByUserId(Long userId); /** * 批量删除用户和角色关联 * * @param ids 需要删除的数据ID * @return 结果 */ public int deleteUserRole(Long[] ids); /** * 通过角色ID查询角色使用数量 * * @param roleId 角色ID * @return 结果 */ public int countUserRoleByRoleId(Long roleId); /** * 批量新增用户角色信息 * * @param userRoleList 用户角色列表 * @return 结果 */ public int batchUserRole(List<SysUserRole> userRoleList); /** * 删除用户和角色关联信息 * * @param userRole 用户和角色关联信息 * @return 结果 */ public int deleteUserRoleInfo(SysUserRole userRole); /** * 批量取消授权用户角色 * * @param roleId 角色ID * @param userIds 需要删除的用户数据ID * @return 结果 */ public int deleteUserRoleInfos(@Param("roleId") Long roleId, @Param("userIds") Long[] userIds); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserRoleMapper.java
Java
mit
1,432
package com.ruoyi.system.service; import java.util.List; import com.ruoyi.system.domain.SysConfig; /** * 参数配置 服务层 * * @author ruoyi */ public interface ISysConfigService { /** * 查询参数配置信息 * * @param configId 参数配置ID * @return 参数配置信息 */ public SysConfig selectConfigById(Long configId); /** * 根据键名查询参数配置信息 * * @param configKey 参数键名 * @return 参数键值 */ public String selectConfigByKey(String configKey); /** * 获取验证码开关 * * @return true开启,false关闭 */ public boolean selectCaptchaEnabled(); /** * 查询参数配置列表 * * @param config 参数配置信息 * @return 参数配置集合 */ public List<SysConfig> selectConfigList(SysConfig config); /** * 新增参数配置 * * @param config 参数配置信息 * @return 结果 */ public int insertConfig(SysConfig config); /** * 修改参数配置 * * @param config 参数配置信息 * @return 结果 */ public int updateConfig(SysConfig config); /** * 批量删除参数信息 * * @param configIds 需要删除的参数ID */ public void deleteConfigByIds(Long[] configIds); /** * 加载参数缓存数据 */ public void loadingConfigCache(); /** * 清空参数缓存数据 */ public void clearConfigCache(); /** * 重置参数缓存数据 */ public void resetConfigCache(); /** * 校验参数键名是否唯一 * * @param config 参数信息 * @return 结果 */ public boolean checkConfigKeyUnique(SysConfig config); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysConfigService.java
Java
mit
1,810
package com.ruoyi.system.service; import java.util.List; import com.ruoyi.common.core.domain.TreeSelect; import com.ruoyi.common.core.domain.entity.SysDept; /** * 部门管理 服务层 * * @author ruoyi */ public interface ISysDeptService { /** * 查询部门管理数据 * * @param dept 部门信息 * @return 部门信息集合 */ public List<SysDept> selectDeptList(SysDept dept); /** * 查询部门树结构信息 * * @param dept 部门信息 * @return 部门树信息集合 */ public List<TreeSelect> selectDeptTreeList(SysDept dept); /** * 构建前端所需要树结构 * * @param depts 部门列表 * @return 树结构列表 */ public List<SysDept> buildDeptTree(List<SysDept> depts); /** * 构建前端所需要下拉树结构 * * @param depts 部门列表 * @return 下拉树结构列表 */ public List<TreeSelect> buildDeptTreeSelect(List<SysDept> depts); /** * 根据角色ID查询部门树信息 * * @param roleId 角色ID * @return 选中部门列表 */ public List<Long> selectDeptListByRoleId(Long roleId); /** * 根据部门ID查询信息 * * @param deptId 部门ID * @return 部门信息 */ public SysDept selectDeptById(Long deptId); /** * 根据ID查询所有子部门(正常状态) * * @param deptId 部门ID * @return 子部门数 */ public int selectNormalChildrenDeptById(Long deptId); /** * 是否存在部门子节点 * * @param deptId 部门ID * @return 结果 */ public boolean hasChildByDeptId(Long deptId); /** * 查询部门是否存在用户 * * @param deptId 部门ID * @return 结果 true 存在 false 不存在 */ public boolean checkDeptExistUser(Long deptId); /** * 校验部门名称是否唯一 * * @param dept 部门信息 * @return 结果 */ public boolean checkDeptNameUnique(SysDept dept); /** * 校验部门是否有数据权限 * * @param deptId 部门id */ public void checkDeptDataScope(Long deptId); /** * 新增保存部门信息 * * @param dept 部门信息 * @return 结果 */ public int insertDept(SysDept dept); /** * 修改保存部门信息 * * @param dept 部门信息 * @return 结果 */ public int updateDept(SysDept dept); /** * 删除部门管理信息 * * @param deptId 部门ID * @return 结果 */ public int deleteDeptById(Long deptId); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java
Java
mit
2,698
package com.ruoyi.system.service; import java.util.List; import com.ruoyi.common.core.domain.entity.SysDictData; /** * 字典 业务层 * * @author ruoyi */ public interface ISysDictDataService { /** * 根据条件分页查询字典数据 * * @param dictData 字典数据信息 * @return 字典数据集合信息 */ public List<SysDictData> selectDictDataList(SysDictData dictData); /** * 根据字典类型和字典键值查询字典数据信息 * * @param dictType 字典类型 * @param dictValue 字典键值 * @return 字典标签 */ public String selectDictLabel(String dictType, String dictValue); /** * 根据字典数据ID查询信息 * * @param dictCode 字典数据ID * @return 字典数据 */ public SysDictData selectDictDataById(Long dictCode); /** * 批量删除字典数据信息 * * @param dictCodes 需要删除的字典数据ID */ public void deleteDictDataByIds(Long[] dictCodes); /** * 新增保存字典数据信息 * * @param dictData 字典数据信息 * @return 结果 */ public int insertDictData(SysDictData dictData); /** * 修改保存字典数据信息 * * @param dictData 字典数据信息 * @return 结果 */ public int updateDictData(SysDictData dictData); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictDataService.java
Java
mit
1,408
package com.ruoyi.system.service; import java.util.List; import com.ruoyi.common.core.domain.entity.SysDictData; import com.ruoyi.common.core.domain.entity.SysDictType; /** * 字典 业务层 * * @author ruoyi */ public interface ISysDictTypeService { /** * 根据条件分页查询字典类型 * * @param dictType 字典类型信息 * @return 字典类型集合信息 */ public List<SysDictType> selectDictTypeList(SysDictType dictType); /** * 根据所有字典类型 * * @return 字典类型集合信息 */ public List<SysDictType> selectDictTypeAll(); /** * 根据字典类型查询字典数据 * * @param dictType 字典类型 * @return 字典数据集合信息 */ public List<SysDictData> selectDictDataByType(String dictType); /** * 根据字典类型ID查询信息 * * @param dictId 字典类型ID * @return 字典类型 */ public SysDictType selectDictTypeById(Long dictId); /** * 根据字典类型查询信息 * * @param dictType 字典类型 * @return 字典类型 */ public SysDictType selectDictTypeByType(String dictType); /** * 批量删除字典信息 * * @param dictIds 需要删除的字典ID */ public void deleteDictTypeByIds(Long[] dictIds); /** * 加载字典缓存数据 */ public void loadingDictCache(); /** * 清空字典缓存数据 */ public void clearDictCache(); /** * 重置字典缓存数据 */ public void resetDictCache(); /** * 新增保存字典类型信息 * * @param dictType 字典类型信息 * @return 结果 */ public int insertDictType(SysDictType dictType); /** * 修改保存字典类型信息 * * @param dictType 字典类型信息 * @return 结果 */ public int updateDictType(SysDictType dictType); /** * 校验字典类型称是否唯一 * * @param dictType 字典类型 * @return 结果 */ public boolean checkDictTypeUnique(SysDictType dictType); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictTypeService.java
Java
mit
2,169
package com.ruoyi.system.service; import java.util.List; import com.ruoyi.system.domain.SysLogininfor; /** * 系统访问日志情况信息 服务层 * * @author ruoyi */ public interface ISysLogininforService { /** * 新增系统登录日志 * * @param logininfor 访问日志对象 */ public void insertLogininfor(SysLogininfor logininfor); /** * 查询系统登录日志集合 * * @param logininfor 访问日志对象 * @return 登录记录集合 */ public List<SysLogininfor> selectLogininforList(SysLogininfor logininfor); /** * 批量删除系统登录日志 * * @param infoIds 需要删除的登录日志ID * @return 结果 */ public int deleteLogininforByIds(Long[] infoIds); /** * 清空系统登录日志 */ public void cleanLogininfor(); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysLogininforService.java
Java
mit
876
package com.ruoyi.system.service; import java.util.List; import java.util.Set; import com.ruoyi.common.core.domain.TreeSelect; import com.ruoyi.common.core.domain.entity.SysMenu; import com.ruoyi.system.domain.vo.RouterVo; /** * 菜单 业务层 * * @author ruoyi */ public interface ISysMenuService { /** * 根据用户查询系统菜单列表 * * @param userId 用户ID * @return 菜单列表 */ public List<SysMenu> selectMenuList(Long userId); /** * 根据用户查询系统菜单列表 * * @param menu 菜单信息 * @param userId 用户ID * @return 菜单列表 */ public List<SysMenu> selectMenuList(SysMenu menu, Long userId); /** * 根据用户ID查询权限 * * @param userId 用户ID * @return 权限列表 */ public Set<String> selectMenuPermsByUserId(Long userId); /** * 根据角色ID查询权限 * * @param roleId 角色ID * @return 权限列表 */ public Set<String> selectMenuPermsByRoleId(Long roleId); /** * 根据用户ID查询菜单树信息 * * @param userId 用户ID * @return 菜单列表 */ public List<SysMenu> selectMenuTreeByUserId(Long userId); /** * 根据角色ID查询菜单树信息 * * @param roleId 角色ID * @return 选中菜单列表 */ public List<Long> selectMenuListByRoleId(Long roleId); /** * 构建前端路由所需要的菜单 * * @param menus 菜单列表 * @return 路由列表 */ public List<RouterVo> buildMenus(List<SysMenu> menus); /** * 构建前端所需要树结构 * * @param menus 菜单列表 * @return 树结构列表 */ public List<SysMenu> buildMenuTree(List<SysMenu> menus); /** * 构建前端所需要下拉树结构 * * @param menus 菜单列表 * @return 下拉树结构列表 */ public List<TreeSelect> buildMenuTreeSelect(List<SysMenu> menus); /** * 根据菜单ID查询信息 * * @param menuId 菜单ID * @return 菜单信息 */ public SysMenu selectMenuById(Long menuId); /** * 是否存在菜单子节点 * * @param menuId 菜单ID * @return 结果 true 存在 false 不存在 */ public boolean hasChildByMenuId(Long menuId); /** * 查询菜单是否存在角色 * * @param menuId 菜单ID * @return 结果 true 存在 false 不存在 */ public boolean checkMenuExistRole(Long menuId); /** * 新增保存菜单信息 * * @param menu 菜单信息 * @return 结果 */ public int insertMenu(SysMenu menu); /** * 修改保存菜单信息 * * @param menu 菜单信息 * @return 结果 */ public int updateMenu(SysMenu menu); /** * 删除菜单管理信息 * * @param menuId 菜单ID * @return 结果 */ public int deleteMenuById(Long menuId); /** * 校验菜单名称是否唯一 * * @param menu 菜单信息 * @return 结果 */ public boolean checkMenuNameUnique(SysMenu menu); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysMenuService.java
Java
mit
3,217
package com.ruoyi.system.service; import java.util.List; import com.ruoyi.system.domain.SysNotice; /** * 公告 服务层 * * @author ruoyi */ public interface ISysNoticeService { /** * 查询公告信息 * * @param noticeId 公告ID * @return 公告信息 */ public SysNotice selectNoticeById(Long noticeId); /** * 查询公告列表 * * @param notice 公告信息 * @return 公告集合 */ public List<SysNotice> selectNoticeList(SysNotice notice); /** * 新增公告 * * @param notice 公告信息 * @return 结果 */ public int insertNotice(SysNotice notice); /** * 修改公告 * * @param notice 公告信息 * @return 结果 */ public int updateNotice(SysNotice notice); /** * 删除公告信息 * * @param noticeId 公告ID * @return 结果 */ public int deleteNoticeById(Long noticeId); /** * 批量删除公告信息 * * @param noticeIds 需要删除的公告ID * @return 结果 */ public int deleteNoticeByIds(Long[] noticeIds); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysNoticeService.java
Java
mit
1,161
package com.ruoyi.system.service; import java.util.List; import com.ruoyi.system.domain.SysOperLog; /** * 操作日志 服务层 * * @author ruoyi */ public interface ISysOperLogService { /** * 新增操作日志 * * @param operLog 操作日志对象 */ public void insertOperlog(SysOperLog operLog); /** * 查询系统操作日志集合 * * @param operLog 操作日志对象 * @return 操作日志集合 */ public List<SysOperLog> selectOperLogList(SysOperLog operLog); /** * 批量删除系统操作日志 * * @param operIds 需要删除的操作日志ID * @return 结果 */ public int deleteOperLogByIds(Long[] operIds); /** * 查询操作日志详细 * * @param operId 操作ID * @return 操作日志对象 */ public SysOperLog selectOperLogById(Long operId); /** * 清空操作日志 */ public void cleanOperLog(); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysOperLogService.java
Java
mit
982
package com.ruoyi.system.service; import java.util.List; import com.ruoyi.system.domain.SysPost; /** * 岗位信息 服务层 * * @author ruoyi */ public interface ISysPostService { /** * 查询岗位信息集合 * * @param post 岗位信息 * @return 岗位列表 */ public List<SysPost> selectPostList(SysPost post); /** * 查询所有岗位 * * @return 岗位列表 */ public List<SysPost> selectPostAll(); /** * 通过岗位ID查询岗位信息 * * @param postId 岗位ID * @return 角色对象信息 */ public SysPost selectPostById(Long postId); /** * 根据用户ID获取岗位选择框列表 * * @param userId 用户ID * @return 选中岗位ID列表 */ public List<Long> selectPostListByUserId(Long userId); /** * 校验岗位名称 * * @param post 岗位信息 * @return 结果 */ public boolean checkPostNameUnique(SysPost post); /** * 校验岗位编码 * * @param post 岗位信息 * @return 结果 */ public boolean checkPostCodeUnique(SysPost post); /** * 通过岗位ID查询岗位使用数量 * * @param postId 岗位ID * @return 结果 */ public int countUserPostById(Long postId); /** * 删除岗位信息 * * @param postId 岗位ID * @return 结果 */ public int deletePostById(Long postId); /** * 批量删除岗位信息 * * @param postIds 需要删除的岗位ID * @return 结果 */ public int deletePostByIds(Long[] postIds); /** * 新增保存岗位信息 * * @param post 岗位信息 * @return 结果 */ public int insertPost(SysPost post); /** * 修改保存岗位信息 * * @param post 岗位信息 * @return 结果 */ public int updatePost(SysPost post); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysPostService.java
Java
mit
1,971
package com.ruoyi.system.service; import java.util.List; import java.util.Set; import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.system.domain.SysUserRole; /** * 角色业务层 * * @author ruoyi */ public interface ISysRoleService { /** * 根据条件分页查询角色数据 * * @param role 角色信息 * @return 角色数据集合信息 */ public List<SysRole> selectRoleList(SysRole role); /** * 根据用户ID查询角色列表 * * @param userId 用户ID * @return 角色列表 */ public List<SysRole> selectRolesByUserId(Long userId); /** * 根据用户ID查询角色权限 * * @param userId 用户ID * @return 权限列表 */ public Set<String> selectRolePermissionByUserId(Long userId); /** * 查询所有角色 * * @return 角色列表 */ public List<SysRole> selectRoleAll(); /** * 根据用户ID获取角色选择框列表 * * @param userId 用户ID * @return 选中角色ID列表 */ public List<Long> selectRoleListByUserId(Long userId); /** * 通过角色ID查询角色 * * @param roleId 角色ID * @return 角色对象信息 */ public SysRole selectRoleById(Long roleId); /** * 校验角色名称是否唯一 * * @param role 角色信息 * @return 结果 */ public boolean checkRoleNameUnique(SysRole role); /** * 校验角色权限是否唯一 * * @param role 角色信息 * @return 结果 */ public boolean checkRoleKeyUnique(SysRole role); /** * 校验角色是否允许操作 * * @param role 角色信息 */ public void checkRoleAllowed(SysRole role); /** * 校验角色是否有数据权限 * * @param roleIds 角色id */ public void checkRoleDataScope(Long... roleIds); /** * 通过角色ID查询角色使用数量 * * @param roleId 角色ID * @return 结果 */ public int countUserRoleByRoleId(Long roleId); /** * 新增保存角色信息 * * @param role 角色信息 * @return 结果 */ public int insertRole(SysRole role); /** * 修改保存角色信息 * * @param role 角色信息 * @return 结果 */ public int updateRole(SysRole role); /** * 修改角色状态 * * @param role 角色信息 * @return 结果 */ public int updateRoleStatus(SysRole role); /** * 修改数据权限信息 * * @param role 角色信息 * @return 结果 */ public int authDataScope(SysRole role); /** * 通过角色ID删除角色 * * @param roleId 角色ID * @return 结果 */ public int deleteRoleById(Long roleId); /** * 批量删除角色信息 * * @param roleIds 需要删除的角色ID * @return 结果 */ public int deleteRoleByIds(Long[] roleIds); /** * 取消授权用户角色 * * @param userRole 用户和角色关联信息 * @return 结果 */ public int deleteAuthUser(SysUserRole userRole); /** * 批量取消授权用户角色 * * @param roleId 角色ID * @param userIds 需要取消授权的用户数据ID * @return 结果 */ public int deleteAuthUsers(Long roleId, Long[] userIds); /** * 批量选择授权用户角色 * * @param roleId 角色ID * @param userIds 需要删除的用户数据ID * @return 结果 */ public int insertAuthUsers(Long roleId, Long[] userIds); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRoleService.java
Java
mit
3,711
package com.ruoyi.system.service; import com.ruoyi.common.core.domain.model.LoginUser; import com.ruoyi.system.domain.SysUserOnline; /** * 在线用户 服务层 * * @author ruoyi */ public interface ISysUserOnlineService { /** * 通过登录地址查询信息 * * @param ipaddr 登录地址 * @param user 用户信息 * @return 在线用户信息 */ public SysUserOnline selectOnlineByIpaddr(String ipaddr, LoginUser user); /** * 通过用户名称查询信息 * * @param userName 用户名称 * @param user 用户信息 * @return 在线用户信息 */ public SysUserOnline selectOnlineByUserName(String userName, LoginUser user); /** * 通过登录地址/用户名称查询信息 * * @param ipaddr 登录地址 * @param userName 用户名称 * @param user 用户信息 * @return 在线用户信息 */ public SysUserOnline selectOnlineByInfo(String ipaddr, String userName, LoginUser user); /** * 设置在线用户信息 * * @param user 用户信息 * @return 在线用户 */ public SysUserOnline loginUserToUserOnline(LoginUser user); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserOnlineService.java
Java
mit
1,206
package com.ruoyi.system.service; import java.util.List; import com.ruoyi.common.core.domain.entity.SysUser; /** * 用户 业务层 * * @author ruoyi */ public interface ISysUserService { /** * 根据条件分页查询用户列表 * * @param user 用户信息 * @return 用户信息集合信息 */ public List<SysUser> selectUserList(SysUser user); /** * 根据条件分页查询已分配用户角色列表 * * @param user 用户信息 * @return 用户信息集合信息 */ public List<SysUser> selectAllocatedList(SysUser user); /** * 根据条件分页查询未分配用户角色列表 * * @param user 用户信息 * @return 用户信息集合信息 */ public List<SysUser> selectUnallocatedList(SysUser user); /** * 通过用户名查询用户 * * @param userName 用户名 * @return 用户对象信息 */ public SysUser selectUserByUserName(String userName); /** * 通过用户ID查询用户 * * @param userId 用户ID * @return 用户对象信息 */ public SysUser selectUserById(Long userId); /** * 根据用户ID查询用户所属角色组 * * @param userName 用户名 * @return 结果 */ public String selectUserRoleGroup(String userName); /** * 根据用户ID查询用户所属岗位组 * * @param userName 用户名 * @return 结果 */ public String selectUserPostGroup(String userName); /** * 校验用户名称是否唯一 * * @param user 用户信息 * @return 结果 */ public boolean checkUserNameUnique(SysUser user); /** * 校验手机号码是否唯一 * * @param user 用户信息 * @return 结果 */ public boolean checkPhoneUnique(SysUser user); /** * 校验email是否唯一 * * @param user 用户信息 * @return 结果 */ public boolean checkEmailUnique(SysUser user); /** * 校验用户是否允许操作 * * @param user 用户信息 */ public void checkUserAllowed(SysUser user); /** * 校验用户是否有数据权限 * * @param userId 用户id */ public void checkUserDataScope(Long userId); /** * 新增用户信息 * * @param user 用户信息 * @return 结果 */ public int insertUser(SysUser user); /** * 注册用户信息 * * @param user 用户信息 * @return 结果 */ public boolean registerUser(SysUser user); /** * 修改用户信息 * * @param user 用户信息 * @return 结果 */ public int updateUser(SysUser user); /** * 用户授权角色 * * @param userId 用户ID * @param roleIds 角色组 */ public void insertUserAuth(Long userId, Long[] roleIds); /** * 修改用户状态 * * @param user 用户信息 * @return 结果 */ public int updateUserStatus(SysUser user); /** * 修改用户基本信息 * * @param user 用户信息 * @return 结果 */ public int updateUserProfile(SysUser user); /** * 修改用户头像 * * @param userName 用户名 * @param avatar 头像地址 * @return 结果 */ public boolean updateUserAvatar(String userName, String avatar); /** * 重置用户密码 * * @param user 用户信息 * @return 结果 */ public int resetPwd(SysUser user); /** * 重置用户密码 * * @param userName 用户名 * @param password 密码 * @return 结果 */ public int resetUserPwd(String userName, String password); /** * 通过用户ID删除用户 * * @param userId 用户ID * @return 结果 */ public int deleteUserById(Long userId); /** * 批量删除用户信息 * * @param userIds 需要删除的用户ID * @return 结果 */ public int deleteUserByIds(Long[] userIds); /** * 导入用户数据 * * @param userList 用户数据列表 * @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据 * @param operName 操作用户 * @return 结果 */ public String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName); }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java
Java
mit
4,485
package com.ruoyi.system.service.impl; import java.util.Collection; import java.util.List; import javax.annotation.PostConstruct; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.common.annotation.DataSource; import com.ruoyi.common.constant.CacheConstants; import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.core.text.Convert; import com.ruoyi.common.enums.DataSourceType; import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.domain.SysConfig; import com.ruoyi.system.mapper.SysConfigMapper; import com.ruoyi.system.service.ISysConfigService; /** * 参数配置 服务层实现 * * @author ruoyi */ @Service public class SysConfigServiceImpl implements ISysConfigService { @Autowired private SysConfigMapper configMapper; @Autowired private RedisCache redisCache; /** * 项目启动时,初始化参数到缓存 */ @PostConstruct public void init() { loadingConfigCache(); } /** * 查询参数配置信息 * * @param configId 参数配置ID * @return 参数配置信息 */ @Override @DataSource(DataSourceType.MASTER) public SysConfig selectConfigById(Long configId) { SysConfig config = new SysConfig(); config.setConfigId(configId); return configMapper.selectConfig(config); } /** * 根据键名查询参数配置信息 * * @param configKey 参数key * @return 参数键值 */ @Override public String selectConfigByKey(String configKey) { String configValue = Convert.toStr(redisCache.getCacheObject(getCacheKey(configKey))); if (StringUtils.isNotEmpty(configValue)) { return configValue; } SysConfig config = new SysConfig(); config.setConfigKey(configKey); SysConfig retConfig = configMapper.selectConfig(config); if (StringUtils.isNotNull(retConfig)) { redisCache.setCacheObject(getCacheKey(configKey), retConfig.getConfigValue()); return retConfig.getConfigValue(); } return StringUtils.EMPTY; } /** * 获取验证码开关 * * @return true开启,false关闭 */ @Override public boolean selectCaptchaEnabled() { String captchaEnabled = selectConfigByKey("sys.account.captchaEnabled"); if (StringUtils.isEmpty(captchaEnabled)) { return true; } return Convert.toBool(captchaEnabled); } /** * 查询参数配置列表 * * @param config 参数配置信息 * @return 参数配置集合 */ @Override public List<SysConfig> selectConfigList(SysConfig config) { return configMapper.selectConfigList(config); } /** * 新增参数配置 * * @param config 参数配置信息 * @return 结果 */ @Override public int insertConfig(SysConfig config) { int row = configMapper.insertConfig(config); if (row > 0) { redisCache.setCacheObject(getCacheKey(config.getConfigKey()), config.getConfigValue()); } return row; } /** * 修改参数配置 * * @param config 参数配置信息 * @return 结果 */ @Override public int updateConfig(SysConfig config) { SysConfig temp = configMapper.selectConfigById(config.getConfigId()); if (!StringUtils.equals(temp.getConfigKey(), config.getConfigKey())) { redisCache.deleteObject(getCacheKey(temp.getConfigKey())); } int row = configMapper.updateConfig(config); if (row > 0) { redisCache.setCacheObject(getCacheKey(config.getConfigKey()), config.getConfigValue()); } return row; } /** * 批量删除参数信息 * * @param configIds 需要删除的参数ID */ @Override public void deleteConfigByIds(Long[] configIds) { for (Long configId : configIds) { SysConfig config = selectConfigById(configId); if (StringUtils.equals(UserConstants.YES, config.getConfigType())) { throw new ServiceException(String.format("内置参数【%1$s】不能删除 ", config.getConfigKey())); } configMapper.deleteConfigById(configId); redisCache.deleteObject(getCacheKey(config.getConfigKey())); } } /** * 加载参数缓存数据 */ @Override public void loadingConfigCache() { List<SysConfig> configsList = configMapper.selectConfigList(new SysConfig()); for (SysConfig config : configsList) { redisCache.setCacheObject(getCacheKey(config.getConfigKey()), config.getConfigValue()); } } /** * 清空参数缓存数据 */ @Override public void clearConfigCache() { Collection<String> keys = redisCache.keys(CacheConstants.SYS_CONFIG_KEY + "*"); redisCache.deleteObject(keys); } /** * 重置参数缓存数据 */ @Override public void resetConfigCache() { clearConfigCache(); loadingConfigCache(); } /** * 校验参数键名是否唯一 * * @param config 参数配置信息 * @return 结果 */ @Override public boolean checkConfigKeyUnique(SysConfig config) { Long configId = StringUtils.isNull(config.getConfigId()) ? -1L : config.getConfigId(); SysConfig info = configMapper.checkConfigKeyUnique(config.getConfigKey()); if (StringUtils.isNotNull(info) && info.getConfigId().longValue() != configId.longValue()) { return UserConstants.NOT_UNIQUE; } return UserConstants.UNIQUE; } /** * 设置cache key * * @param configKey 参数键 * @return 缓存键key */ private String getCacheKey(String configKey) { return CacheConstants.SYS_CONFIG_KEY + configKey; } }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java
Java
mit
6,270
package com.ruoyi.system.service.impl; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.stream.Collectors; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.common.annotation.DataScope; import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.core.domain.TreeSelect; import com.ruoyi.common.core.domain.entity.SysDept; import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.text.Convert; import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.spring.SpringUtils; import com.ruoyi.system.mapper.SysDeptMapper; import com.ruoyi.system.mapper.SysRoleMapper; import com.ruoyi.system.service.ISysDeptService; /** * 部门管理 服务实现 * * @author ruoyi */ @Service public class SysDeptServiceImpl implements ISysDeptService { @Autowired private SysDeptMapper deptMapper; @Autowired private SysRoleMapper roleMapper; /** * 查询部门管理数据 * * @param dept 部门信息 * @return 部门信息集合 */ @Override @DataScope(deptAlias = "d") public List<SysDept> selectDeptList(SysDept dept) { return deptMapper.selectDeptList(dept); } /** * 查询部门树结构信息 * * @param dept 部门信息 * @return 部门树信息集合 */ @Override public List<TreeSelect> selectDeptTreeList(SysDept dept) { List<SysDept> depts = SpringUtils.getAopProxy(this).selectDeptList(dept); return buildDeptTreeSelect(depts); } /** * 构建前端所需要树结构 * * @param depts 部门列表 * @return 树结构列表 */ @Override public List<SysDept> buildDeptTree(List<SysDept> depts) { List<SysDept> returnList = new ArrayList<SysDept>(); List<Long> tempList = depts.stream().map(SysDept::getDeptId).collect(Collectors.toList()); for (SysDept dept : depts) { // 如果是顶级节点, 遍历该父节点的所有子节点 if (!tempList.contains(dept.getParentId())) { recursionFn(depts, dept); returnList.add(dept); } } if (returnList.isEmpty()) { returnList = depts; } return returnList; } /** * 构建前端所需要下拉树结构 * * @param depts 部门列表 * @return 下拉树结构列表 */ @Override public List<TreeSelect> buildDeptTreeSelect(List<SysDept> depts) { List<SysDept> deptTrees = buildDeptTree(depts); return deptTrees.stream().map(TreeSelect::new).collect(Collectors.toList()); } /** * 根据角色ID查询部门树信息 * * @param roleId 角色ID * @return 选中部门列表 */ @Override public List<Long> selectDeptListByRoleId(Long roleId) { SysRole role = roleMapper.selectRoleById(roleId); return deptMapper.selectDeptListByRoleId(roleId, role.isDeptCheckStrictly()); } /** * 根据部门ID查询信息 * * @param deptId 部门ID * @return 部门信息 */ @Override public SysDept selectDeptById(Long deptId) { return deptMapper.selectDeptById(deptId); } /** * 根据ID查询所有子部门(正常状态) * * @param deptId 部门ID * @return 子部门数 */ @Override public int selectNormalChildrenDeptById(Long deptId) { return deptMapper.selectNormalChildrenDeptById(deptId); } /** * 是否存在子节点 * * @param deptId 部门ID * @return 结果 */ @Override public boolean hasChildByDeptId(Long deptId) { int result = deptMapper.hasChildByDeptId(deptId); return result > 0; } /** * 查询部门是否存在用户 * * @param deptId 部门ID * @return 结果 true 存在 false 不存在 */ @Override public boolean checkDeptExistUser(Long deptId) { int result = deptMapper.checkDeptExistUser(deptId); return result > 0; } /** * 校验部门名称是否唯一 * * @param dept 部门信息 * @return 结果 */ @Override public boolean checkDeptNameUnique(SysDept dept) { Long deptId = StringUtils.isNull(dept.getDeptId()) ? -1L : dept.getDeptId(); SysDept info = deptMapper.checkDeptNameUnique(dept.getDeptName(), dept.getParentId()); if (StringUtils.isNotNull(info) && info.getDeptId().longValue() != deptId.longValue()) { return UserConstants.NOT_UNIQUE; } return UserConstants.UNIQUE; } /** * 校验部门是否有数据权限 * * @param deptId 部门id */ @Override public void checkDeptDataScope(Long deptId) { if (!SysUser.isAdmin(SecurityUtils.getUserId()) && StringUtils.isNotNull(deptId)) { SysDept dept = new SysDept(); dept.setDeptId(deptId); List<SysDept> depts = SpringUtils.getAopProxy(this).selectDeptList(dept); if (StringUtils.isEmpty(depts)) { throw new ServiceException("没有权限访问部门数据!"); } } } /** * 新增保存部门信息 * * @param dept 部门信息 * @return 结果 */ @Override public int insertDept(SysDept dept) { SysDept info = deptMapper.selectDeptById(dept.getParentId()); // 如果父节点不为正常状态,则不允许新增子节点 if (!UserConstants.DEPT_NORMAL.equals(info.getStatus())) { throw new ServiceException("部门停用,不允许新增"); } dept.setAncestors(info.getAncestors() + "," + dept.getParentId()); return deptMapper.insertDept(dept); } /** * 修改保存部门信息 * * @param dept 部门信息 * @return 结果 */ @Override public int updateDept(SysDept dept) { SysDept newParentDept = deptMapper.selectDeptById(dept.getParentId()); SysDept oldDept = deptMapper.selectDeptById(dept.getDeptId()); if (StringUtils.isNotNull(newParentDept) && StringUtils.isNotNull(oldDept)) { String newAncestors = newParentDept.getAncestors() + "," + newParentDept.getDeptId(); String oldAncestors = oldDept.getAncestors(); dept.setAncestors(newAncestors); updateDeptChildren(dept.getDeptId(), newAncestors, oldAncestors); } int result = deptMapper.updateDept(dept); if (UserConstants.DEPT_NORMAL.equals(dept.getStatus()) && StringUtils.isNotEmpty(dept.getAncestors()) && !StringUtils.equals("0", dept.getAncestors())) { // 如果该部门是启用状态,则启用该部门的所有上级部门 updateParentDeptStatusNormal(dept); } return result; } /** * 修改该部门的父级部门状态 * * @param dept 当前部门 */ private void updateParentDeptStatusNormal(SysDept dept) { String ancestors = dept.getAncestors(); Long[] deptIds = Convert.toLongArray(ancestors); deptMapper.updateDeptStatusNormal(deptIds); } /** * 修改子元素关系 * * @param deptId 被修改的部门ID * @param newAncestors 新的父ID集合 * @param oldAncestors 旧的父ID集合 */ public void updateDeptChildren(Long deptId, String newAncestors, String oldAncestors) { List<SysDept> children = deptMapper.selectChildrenDeptById(deptId); for (SysDept child : children) { child.setAncestors(child.getAncestors().replaceFirst(oldAncestors, newAncestors)); } if (children.size() > 0) { deptMapper.updateDeptChildren(children); } } /** * 删除部门管理信息 * * @param deptId 部门ID * @return 结果 */ @Override public int deleteDeptById(Long deptId) { return deptMapper.deleteDeptById(deptId); } /** * 递归列表 */ private void recursionFn(List<SysDept> list, SysDept t) { // 得到子节点列表 List<SysDept> childList = getChildList(list, t); t.setChildren(childList); for (SysDept tChild : childList) { if (hasChild(list, tChild)) { recursionFn(list, tChild); } } } /** * 得到子节点列表 */ private List<SysDept> getChildList(List<SysDept> list, SysDept t) { List<SysDept> tlist = new ArrayList<SysDept>(); Iterator<SysDept> it = list.iterator(); while (it.hasNext()) { SysDept n = (SysDept) it.next(); if (StringUtils.isNotNull(n.getParentId()) && n.getParentId().longValue() == t.getDeptId().longValue()) { tlist.add(n); } } return tlist; } /** * 判断是否有子节点 */ private boolean hasChild(List<SysDept> list, SysDept t) { return getChildList(list, t).size() > 0; } }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
Java
mit
9,573
package com.ruoyi.system.service.impl; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.common.core.domain.entity.SysDictData; import com.ruoyi.common.utils.DictUtils; import com.ruoyi.system.mapper.SysDictDataMapper; import com.ruoyi.system.service.ISysDictDataService; /** * 字典 业务层处理 * * @author ruoyi */ @Service public class SysDictDataServiceImpl implements ISysDictDataService { @Autowired private SysDictDataMapper dictDataMapper; /** * 根据条件分页查询字典数据 * * @param dictData 字典数据信息 * @return 字典数据集合信息 */ @Override public List<SysDictData> selectDictDataList(SysDictData dictData) { return dictDataMapper.selectDictDataList(dictData); } /** * 根据字典类型和字典键值查询字典数据信息 * * @param dictType 字典类型 * @param dictValue 字典键值 * @return 字典标签 */ @Override public String selectDictLabel(String dictType, String dictValue) { return dictDataMapper.selectDictLabel(dictType, dictValue); } /** * 根据字典数据ID查询信息 * * @param dictCode 字典数据ID * @return 字典数据 */ @Override public SysDictData selectDictDataById(Long dictCode) { return dictDataMapper.selectDictDataById(dictCode); } /** * 批量删除字典数据信息 * * @param dictCodes 需要删除的字典数据ID */ @Override public void deleteDictDataByIds(Long[] dictCodes) { for (Long dictCode : dictCodes) { SysDictData data = selectDictDataById(dictCode); dictDataMapper.deleteDictDataById(dictCode); List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(data.getDictType()); DictUtils.setDictCache(data.getDictType(), dictDatas); } } /** * 新增保存字典数据信息 * * @param data 字典数据信息 * @return 结果 */ @Override public int insertDictData(SysDictData data) { int row = dictDataMapper.insertDictData(data); if (row > 0) { List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(data.getDictType()); DictUtils.setDictCache(data.getDictType(), dictDatas); } return row; } /** * 修改保存字典数据信息 * * @param data 字典数据信息 * @return 结果 */ @Override public int updateDictData(SysDictData data) { int row = dictDataMapper.updateDictData(data); if (row > 0) { List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(data.getDictType()); DictUtils.setDictCache(data.getDictType(), dictDatas); } return row; } }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictDataServiceImpl.java
Java
mit
3,004
package com.ruoyi.system.service.impl; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import javax.annotation.PostConstruct; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.core.domain.entity.SysDictData; import com.ruoyi.common.core.domain.entity.SysDictType; import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.DictUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.mapper.SysDictDataMapper; import com.ruoyi.system.mapper.SysDictTypeMapper; import com.ruoyi.system.service.ISysDictTypeService; /** * 字典 业务层处理 * * @author ruoyi */ @Service public class SysDictTypeServiceImpl implements ISysDictTypeService { @Autowired private SysDictTypeMapper dictTypeMapper; @Autowired private SysDictDataMapper dictDataMapper; /** * 项目启动时,初始化字典到缓存 */ @PostConstruct public void init() { loadingDictCache(); } /** * 根据条件分页查询字典类型 * * @param dictType 字典类型信息 * @return 字典类型集合信息 */ @Override public List<SysDictType> selectDictTypeList(SysDictType dictType) { return dictTypeMapper.selectDictTypeList(dictType); } /** * 根据所有字典类型 * * @return 字典类型集合信息 */ @Override public List<SysDictType> selectDictTypeAll() { return dictTypeMapper.selectDictTypeAll(); } /** * 根据字典类型查询字典数据 * * @param dictType 字典类型 * @return 字典数据集合信息 */ @Override public List<SysDictData> selectDictDataByType(String dictType) { List<SysDictData> dictDatas = DictUtils.getDictCache(dictType); if (StringUtils.isNotEmpty(dictDatas)) { return dictDatas; } dictDatas = dictDataMapper.selectDictDataByType(dictType); if (StringUtils.isNotEmpty(dictDatas)) { DictUtils.setDictCache(dictType, dictDatas); return dictDatas; } return null; } /** * 根据字典类型ID查询信息 * * @param dictId 字典类型ID * @return 字典类型 */ @Override public SysDictType selectDictTypeById(Long dictId) { return dictTypeMapper.selectDictTypeById(dictId); } /** * 根据字典类型查询信息 * * @param dictType 字典类型 * @return 字典类型 */ @Override public SysDictType selectDictTypeByType(String dictType) { return dictTypeMapper.selectDictTypeByType(dictType); } /** * 批量删除字典类型信息 * * @param dictIds 需要删除的字典ID */ @Override public void deleteDictTypeByIds(Long[] dictIds) { for (Long dictId : dictIds) { SysDictType dictType = selectDictTypeById(dictId); if (dictDataMapper.countDictDataByType(dictType.getDictType()) > 0) { throw new ServiceException(String.format("%1$s已分配,不能删除", dictType.getDictName())); } dictTypeMapper.deleteDictTypeById(dictId); DictUtils.removeDictCache(dictType.getDictType()); } } /** * 加载字典缓存数据 */ @Override public void loadingDictCache() { SysDictData dictData = new SysDictData(); dictData.setStatus("0"); Map<String, List<SysDictData>> dictDataMap = dictDataMapper.selectDictDataList(dictData).stream().collect(Collectors.groupingBy(SysDictData::getDictType)); for (Map.Entry<String, List<SysDictData>> entry : dictDataMap.entrySet()) { DictUtils.setDictCache(entry.getKey(), entry.getValue().stream().sorted(Comparator.comparing(SysDictData::getDictSort)).collect(Collectors.toList())); } } /** * 清空字典缓存数据 */ @Override public void clearDictCache() { DictUtils.clearDictCache(); } /** * 重置字典缓存数据 */ @Override public void resetDictCache() { clearDictCache(); loadingDictCache(); } /** * 新增保存字典类型信息 * * @param dict 字典类型信息 * @return 结果 */ @Override public int insertDictType(SysDictType dict) { int row = dictTypeMapper.insertDictType(dict); if (row > 0) { DictUtils.setDictCache(dict.getDictType(), null); } return row; } /** * 修改保存字典类型信息 * * @param dict 字典类型信息 * @return 结果 */ @Override @Transactional public int updateDictType(SysDictType dict) { SysDictType oldDict = dictTypeMapper.selectDictTypeById(dict.getDictId()); dictDataMapper.updateDictDataType(oldDict.getDictType(), dict.getDictType()); int row = dictTypeMapper.updateDictType(dict); if (row > 0) { List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(dict.getDictType()); DictUtils.setDictCache(dict.getDictType(), dictDatas); } return row; } /** * 校验字典类型称是否唯一 * * @param dict 字典类型 * @return 结果 */ @Override public boolean checkDictTypeUnique(SysDictType dict) { Long dictId = StringUtils.isNull(dict.getDictId()) ? -1L : dict.getDictId(); SysDictType dictType = dictTypeMapper.checkDictTypeUnique(dict.getDictType()); if (StringUtils.isNotNull(dictType) && dictType.getDictId().longValue() != dictId.longValue()) { return UserConstants.NOT_UNIQUE; } return UserConstants.UNIQUE; } }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java
Java
mit
6,139
package com.ruoyi.system.service.impl; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.system.domain.SysLogininfor; import com.ruoyi.system.mapper.SysLogininforMapper; import com.ruoyi.system.service.ISysLogininforService; /** * 系统访问日志情况信息 服务层处理 * * @author ruoyi */ @Service public class SysLogininforServiceImpl implements ISysLogininforService { @Autowired private SysLogininforMapper logininforMapper; /** * 新增系统登录日志 * * @param logininfor 访问日志对象 */ @Override public void insertLogininfor(SysLogininfor logininfor) { logininforMapper.insertLogininfor(logininfor); } /** * 查询系统登录日志集合 * * @param logininfor 访问日志对象 * @return 登录记录集合 */ @Override public List<SysLogininfor> selectLogininforList(SysLogininfor logininfor) { return logininforMapper.selectLogininforList(logininfor); } /** * 批量删除系统登录日志 * * @param infoIds 需要删除的登录日志ID * @return 结果 */ @Override public int deleteLogininforByIds(Long[] infoIds) { return logininforMapper.deleteLogininforByIds(infoIds); } /** * 清空系统登录日志 */ @Override public void cleanLogininfor() { logininforMapper.cleanLogininfor(); } }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysLogininforServiceImpl.java
Java
mit
1,541
package com.ruoyi.system.service.impl; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Set; import java.util.stream.Collectors; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.common.constant.Constants; import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.core.domain.TreeSelect; import com.ruoyi.common.core.domain.entity.SysMenu; import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.domain.vo.MetaVo; import com.ruoyi.system.domain.vo.RouterVo; import com.ruoyi.system.mapper.SysMenuMapper; import com.ruoyi.system.mapper.SysRoleMapper; import com.ruoyi.system.mapper.SysRoleMenuMapper; import com.ruoyi.system.service.ISysMenuService; /** * 菜单 业务层处理 * * @author ruoyi */ @Service public class SysMenuServiceImpl implements ISysMenuService { public static final String PREMISSION_STRING = "perms[\"{0}\"]"; @Autowired private SysMenuMapper menuMapper; @Autowired private SysRoleMapper roleMapper; @Autowired private SysRoleMenuMapper roleMenuMapper; /** * 根据用户查询系统菜单列表 * * @param userId 用户ID * @return 菜单列表 */ @Override public List<SysMenu> selectMenuList(Long userId) { return selectMenuList(new SysMenu(), userId); } /** * 查询系统菜单列表 * * @param menu 菜单信息 * @return 菜单列表 */ @Override public List<SysMenu> selectMenuList(SysMenu menu, Long userId) { List<SysMenu> menuList = null; // 管理员显示所有菜单信息 if (SysUser.isAdmin(userId)) { menuList = menuMapper.selectMenuList(menu); } else { menu.getParams().put("userId", userId); menuList = menuMapper.selectMenuListByUserId(menu); } return menuList; } /** * 根据用户ID查询权限 * * @param userId 用户ID * @return 权限列表 */ @Override public Set<String> selectMenuPermsByUserId(Long userId) { List<String> perms = menuMapper.selectMenuPermsByUserId(userId); Set<String> permsSet = new HashSet<>(); for (String perm : perms) { if (StringUtils.isNotEmpty(perm)) { permsSet.addAll(Arrays.asList(perm.trim().split(","))); } } return permsSet; } /** * 根据角色ID查询权限 * * @param roleId 角色ID * @return 权限列表 */ @Override public Set<String> selectMenuPermsByRoleId(Long roleId) { List<String> perms = menuMapper.selectMenuPermsByRoleId(roleId); Set<String> permsSet = new HashSet<>(); for (String perm : perms) { if (StringUtils.isNotEmpty(perm)) { permsSet.addAll(Arrays.asList(perm.trim().split(","))); } } return permsSet; } /** * 根据用户ID查询菜单 * * @param userId 用户名称 * @return 菜单列表 */ @Override public List<SysMenu> selectMenuTreeByUserId(Long userId) { List<SysMenu> menus = null; if (SecurityUtils.isAdmin(userId)) { menus = menuMapper.selectMenuTreeAll(); } else { menus = menuMapper.selectMenuTreeByUserId(userId); } return getChildPerms(menus, 0); } /** * 根据角色ID查询菜单树信息 * * @param roleId 角色ID * @return 选中菜单列表 */ @Override public List<Long> selectMenuListByRoleId(Long roleId) { SysRole role = roleMapper.selectRoleById(roleId); return menuMapper.selectMenuListByRoleId(roleId, role.isMenuCheckStrictly()); } /** * 构建前端路由所需要的菜单 * * @param menus 菜单列表 * @return 路由列表 */ @Override public List<RouterVo> buildMenus(List<SysMenu> menus) { List<RouterVo> routers = new LinkedList<RouterVo>(); for (SysMenu menu : menus) { RouterVo router = new RouterVo(); router.setHidden("1".equals(menu.getVisible())); router.setName(getRouteName(menu)); router.setPath(getRouterPath(menu)); router.setComponent(getComponent(menu)); router.setQuery(menu.getQuery()); router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache()), menu.getPath())); List<SysMenu> cMenus = menu.getChildren(); if (StringUtils.isNotEmpty(cMenus) && UserConstants.TYPE_DIR.equals(menu.getMenuType())) { router.setAlwaysShow(true); router.setRedirect("noRedirect"); router.setChildren(buildMenus(cMenus)); } else if (isMenuFrame(menu)) { router.setMeta(null); List<RouterVo> childrenList = new ArrayList<RouterVo>(); RouterVo children = new RouterVo(); children.setPath(menu.getPath()); children.setComponent(menu.getComponent()); children.setName(getRouteName(menu.getRouteName(), menu.getPath())); children.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache()), menu.getPath())); children.setQuery(menu.getQuery()); childrenList.add(children); router.setChildren(childrenList); } else if (menu.getParentId().intValue() == 0 && isInnerLink(menu)) { router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon())); router.setPath("/"); List<RouterVo> childrenList = new ArrayList<RouterVo>(); RouterVo children = new RouterVo(); String routerPath = innerLinkReplaceEach(menu.getPath()); children.setPath(routerPath); children.setComponent(UserConstants.INNER_LINK); children.setName(getRouteName(menu.getRouteName(), routerPath)); children.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), menu.getPath())); childrenList.add(children); router.setChildren(childrenList); } routers.add(router); } return routers; } /** * 构建前端所需要树结构 * * @param menus 菜单列表 * @return 树结构列表 */ @Override public List<SysMenu> buildMenuTree(List<SysMenu> menus) { List<SysMenu> returnList = new ArrayList<SysMenu>(); List<Long> tempList = menus.stream().map(SysMenu::getMenuId).collect(Collectors.toList()); for (Iterator<SysMenu> iterator = menus.iterator(); iterator.hasNext();) { SysMenu menu = (SysMenu) iterator.next(); // 如果是顶级节点, 遍历该父节点的所有子节点 if (!tempList.contains(menu.getParentId())) { recursionFn(menus, menu); returnList.add(menu); } } if (returnList.isEmpty()) { returnList = menus; } return returnList; } /** * 构建前端所需要下拉树结构 * * @param menus 菜单列表 * @return 下拉树结构列表 */ @Override public List<TreeSelect> buildMenuTreeSelect(List<SysMenu> menus) { List<SysMenu> menuTrees = buildMenuTree(menus); return menuTrees.stream().map(TreeSelect::new).collect(Collectors.toList()); } /** * 根据菜单ID查询信息 * * @param menuId 菜单ID * @return 菜单信息 */ @Override public SysMenu selectMenuById(Long menuId) { return menuMapper.selectMenuById(menuId); } /** * 是否存在菜单子节点 * * @param menuId 菜单ID * @return 结果 */ @Override public boolean hasChildByMenuId(Long menuId) { int result = menuMapper.hasChildByMenuId(menuId); return result > 0; } /** * 查询菜单使用数量 * * @param menuId 菜单ID * @return 结果 */ @Override public boolean checkMenuExistRole(Long menuId) { int result = roleMenuMapper.checkMenuExistRole(menuId); return result > 0; } /** * 新增保存菜单信息 * * @param menu 菜单信息 * @return 结果 */ @Override public int insertMenu(SysMenu menu) { return menuMapper.insertMenu(menu); } /** * 修改保存菜单信息 * * @param menu 菜单信息 * @return 结果 */ @Override public int updateMenu(SysMenu menu) { return menuMapper.updateMenu(menu); } /** * 删除菜单管理信息 * * @param menuId 菜单ID * @return 结果 */ @Override public int deleteMenuById(Long menuId) { return menuMapper.deleteMenuById(menuId); } /** * 校验菜单名称是否唯一 * * @param menu 菜单信息 * @return 结果 */ @Override public boolean checkMenuNameUnique(SysMenu menu) { Long menuId = StringUtils.isNull(menu.getMenuId()) ? -1L : menu.getMenuId(); SysMenu info = menuMapper.checkMenuNameUnique(menu.getMenuName(), menu.getParentId()); if (StringUtils.isNotNull(info) && info.getMenuId().longValue() != menuId.longValue()) { return UserConstants.NOT_UNIQUE; } return UserConstants.UNIQUE; } /** * 获取路由名称 * * @param menu 菜单信息 * @return 路由名称 */ public String getRouteName(SysMenu menu) { // 非外链并且是一级目录(类型为目录) if (isMenuFrame(menu)) { return StringUtils.EMPTY; } return getRouteName(menu.getRouteName(), menu.getPath()); } /** * 获取路由名称,如没有配置路由名称则取路由地址 * * @param name 路由名称 * @param path 路由地址 * @return 路由名称(驼峰格式) */ public String getRouteName(String name, String path) { String routerName = StringUtils.isNotEmpty(name) ? name : path; return StringUtils.capitalize(routerName); } /** * 获取路由地址 * * @param menu 菜单信息 * @return 路由地址 */ public String getRouterPath(SysMenu menu) { String routerPath = menu.getPath(); // 内链打开外网方式 if (menu.getParentId().intValue() != 0 && isInnerLink(menu)) { routerPath = innerLinkReplaceEach(routerPath); } // 非外链并且是一级目录(类型为目录) if (0 == menu.getParentId().intValue() && UserConstants.TYPE_DIR.equals(menu.getMenuType()) && UserConstants.NO_FRAME.equals(menu.getIsFrame())) { routerPath = "/" + menu.getPath(); } // 非外链并且是一级目录(类型为菜单) else if (isMenuFrame(menu)) { routerPath = "/"; } return routerPath; } /** * 获取组件信息 * * @param menu 菜单信息 * @return 组件信息 */ public String getComponent(SysMenu menu) { String component = UserConstants.LAYOUT; if (StringUtils.isNotEmpty(menu.getComponent()) && !isMenuFrame(menu)) { component = menu.getComponent(); } else if (StringUtils.isEmpty(menu.getComponent()) && menu.getParentId().intValue() != 0 && isInnerLink(menu)) { component = UserConstants.INNER_LINK; } else if (StringUtils.isEmpty(menu.getComponent()) && isParentView(menu)) { component = UserConstants.PARENT_VIEW; } return component; } /** * 是否为菜单内部跳转 * * @param menu 菜单信息 * @return 结果 */ public boolean isMenuFrame(SysMenu menu) { return menu.getParentId().intValue() == 0 && UserConstants.TYPE_MENU.equals(menu.getMenuType()) && menu.getIsFrame().equals(UserConstants.NO_FRAME); } /** * 是否为内链组件 * * @param menu 菜单信息 * @return 结果 */ public boolean isInnerLink(SysMenu menu) { return menu.getIsFrame().equals(UserConstants.NO_FRAME) && StringUtils.ishttp(menu.getPath()); } /** * 是否为parent_view组件 * * @param menu 菜单信息 * @return 结果 */ public boolean isParentView(SysMenu menu) { return menu.getParentId().intValue() != 0 && UserConstants.TYPE_DIR.equals(menu.getMenuType()); } /** * 根据父节点的ID获取所有子节点 * * @param list 分类表 * @param parentId 传入的父节点ID * @return String */ public List<SysMenu> getChildPerms(List<SysMenu> list, int parentId) { List<SysMenu> returnList = new ArrayList<SysMenu>(); for (Iterator<SysMenu> iterator = list.iterator(); iterator.hasNext();) { SysMenu t = (SysMenu) iterator.next(); // 一、根据传入的某个父节点ID,遍历该父节点的所有子节点 if (t.getParentId() == parentId) { recursionFn(list, t); returnList.add(t); } } return returnList; } /** * 递归列表 * * @param list 分类表 * @param t 子节点 */ private void recursionFn(List<SysMenu> list, SysMenu t) { // 得到子节点列表 List<SysMenu> childList = getChildList(list, t); t.setChildren(childList); for (SysMenu tChild : childList) { if (hasChild(list, tChild)) { recursionFn(list, tChild); } } } /** * 得到子节点列表 */ private List<SysMenu> getChildList(List<SysMenu> list, SysMenu t) { List<SysMenu> tlist = new ArrayList<SysMenu>(); Iterator<SysMenu> it = list.iterator(); while (it.hasNext()) { SysMenu n = (SysMenu) it.next(); if (n.getParentId().longValue() == t.getMenuId().longValue()) { tlist.add(n); } } return tlist; } /** * 判断是否有子节点 */ private boolean hasChild(List<SysMenu> list, SysMenu t) { return getChildList(list, t).size() > 0; } /** * 内链域名特殊字符替换 * * @return 替换后的内链域名 */ public String innerLinkReplaceEach(String path) { return StringUtils.replaceEach(path, new String[] { Constants.HTTP, Constants.HTTPS, Constants.WWW, ".", ":" }, new String[] { "", "", "", "/", "/" }); } }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java
Java
mit
15,619
package com.ruoyi.system.service.impl; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.system.domain.SysNotice; import com.ruoyi.system.mapper.SysNoticeMapper; import com.ruoyi.system.service.ISysNoticeService; /** * 公告 服务层实现 * * @author ruoyi */ @Service public class SysNoticeServiceImpl implements ISysNoticeService { @Autowired private SysNoticeMapper noticeMapper; /** * 查询公告信息 * * @param noticeId 公告ID * @return 公告信息 */ @Override public SysNotice selectNoticeById(Long noticeId) { return noticeMapper.selectNoticeById(noticeId); } /** * 查询公告列表 * * @param notice 公告信息 * @return 公告集合 */ @Override public List<SysNotice> selectNoticeList(SysNotice notice) { return noticeMapper.selectNoticeList(notice); } /** * 新增公告 * * @param notice 公告信息 * @return 结果 */ @Override public int insertNotice(SysNotice notice) { return noticeMapper.insertNotice(notice); } /** * 修改公告 * * @param notice 公告信息 * @return 结果 */ @Override public int updateNotice(SysNotice notice) { return noticeMapper.updateNotice(notice); } /** * 删除公告对象 * * @param noticeId 公告ID * @return 结果 */ @Override public int deleteNoticeById(Long noticeId) { return noticeMapper.deleteNoticeById(noticeId); } /** * 批量删除公告信息 * * @param noticeIds 需要删除的公告ID * @return 结果 */ @Override public int deleteNoticeByIds(Long[] noticeIds) { return noticeMapper.deleteNoticeByIds(noticeIds); } }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysNoticeServiceImpl.java
Java
mit
1,946
package com.ruoyi.system.service.impl; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.system.domain.SysOperLog; import com.ruoyi.system.mapper.SysOperLogMapper; import com.ruoyi.system.service.ISysOperLogService; /** * 操作日志 服务层处理 * * @author ruoyi */ @Service public class SysOperLogServiceImpl implements ISysOperLogService { @Autowired private SysOperLogMapper operLogMapper; /** * 新增操作日志 * * @param operLog 操作日志对象 */ @Override public void insertOperlog(SysOperLog operLog) { operLogMapper.insertOperlog(operLog); } /** * 查询系统操作日志集合 * * @param operLog 操作日志对象 * @return 操作日志集合 */ @Override public List<SysOperLog> selectOperLogList(SysOperLog operLog) { return operLogMapper.selectOperLogList(operLog); } /** * 批量删除系统操作日志 * * @param operIds 需要删除的操作日志ID * @return 结果 */ @Override public int deleteOperLogByIds(Long[] operIds) { return operLogMapper.deleteOperLogByIds(operIds); } /** * 查询操作日志详细 * * @param operId 操作ID * @return 操作日志对象 */ @Override public SysOperLog selectOperLogById(Long operId) { return operLogMapper.selectOperLogById(operId); } /** * 清空操作日志 */ @Override public void cleanOperLog() { operLogMapper.cleanOperLog(); } }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOperLogServiceImpl.java
Java
mit
1,682
package com.ruoyi.system.service.impl; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.domain.SysPost; import com.ruoyi.system.mapper.SysPostMapper; import com.ruoyi.system.mapper.SysUserPostMapper; import com.ruoyi.system.service.ISysPostService; /** * 岗位信息 服务层处理 * * @author ruoyi */ @Service public class SysPostServiceImpl implements ISysPostService { @Autowired private SysPostMapper postMapper; @Autowired private SysUserPostMapper userPostMapper; /** * 查询岗位信息集合 * * @param post 岗位信息 * @return 岗位信息集合 */ @Override public List<SysPost> selectPostList(SysPost post) { return postMapper.selectPostList(post); } /** * 查询所有岗位 * * @return 岗位列表 */ @Override public List<SysPost> selectPostAll() { return postMapper.selectPostAll(); } /** * 通过岗位ID查询岗位信息 * * @param postId 岗位ID * @return 角色对象信息 */ @Override public SysPost selectPostById(Long postId) { return postMapper.selectPostById(postId); } /** * 根据用户ID获取岗位选择框列表 * * @param userId 用户ID * @return 选中岗位ID列表 */ @Override public List<Long> selectPostListByUserId(Long userId) { return postMapper.selectPostListByUserId(userId); } /** * 校验岗位名称是否唯一 * * @param post 岗位信息 * @return 结果 */ @Override public boolean checkPostNameUnique(SysPost post) { Long postId = StringUtils.isNull(post.getPostId()) ? -1L : post.getPostId(); SysPost info = postMapper.checkPostNameUnique(post.getPostName()); if (StringUtils.isNotNull(info) && info.getPostId().longValue() != postId.longValue()) { return UserConstants.NOT_UNIQUE; } return UserConstants.UNIQUE; } /** * 校验岗位编码是否唯一 * * @param post 岗位信息 * @return 结果 */ @Override public boolean checkPostCodeUnique(SysPost post) { Long postId = StringUtils.isNull(post.getPostId()) ? -1L : post.getPostId(); SysPost info = postMapper.checkPostCodeUnique(post.getPostCode()); if (StringUtils.isNotNull(info) && info.getPostId().longValue() != postId.longValue()) { return UserConstants.NOT_UNIQUE; } return UserConstants.UNIQUE; } /** * 通过岗位ID查询岗位使用数量 * * @param postId 岗位ID * @return 结果 */ @Override public int countUserPostById(Long postId) { return userPostMapper.countUserPostById(postId); } /** * 删除岗位信息 * * @param postId 岗位ID * @return 结果 */ @Override public int deletePostById(Long postId) { return postMapper.deletePostById(postId); } /** * 批量删除岗位信息 * * @param postIds 需要删除的岗位ID * @return 结果 */ @Override public int deletePostByIds(Long[] postIds) { for (Long postId : postIds) { SysPost post = selectPostById(postId); if (countUserPostById(postId) > 0) { throw new ServiceException(String.format("%1$s已分配,不能删除", post.getPostName())); } } return postMapper.deletePostByIds(postIds); } /** * 新增保存岗位信息 * * @param post 岗位信息 * @return 结果 */ @Override public int insertPost(SysPost post) { return postMapper.insertPost(post); } /** * 修改保存岗位信息 * * @param post 岗位信息 * @return 结果 */ @Override public int updatePost(SysPost post) { return postMapper.updatePost(post); } }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPostServiceImpl.java
Java
mit
4,287
package com.ruoyi.system.service.impl; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.ruoyi.common.annotation.DataScope; import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.spring.SpringUtils; import com.ruoyi.system.domain.SysRoleDept; import com.ruoyi.system.domain.SysRoleMenu; import com.ruoyi.system.domain.SysUserRole; import com.ruoyi.system.mapper.SysRoleDeptMapper; import com.ruoyi.system.mapper.SysRoleMapper; import com.ruoyi.system.mapper.SysRoleMenuMapper; import com.ruoyi.system.mapper.SysUserRoleMapper; import com.ruoyi.system.service.ISysRoleService; /** * 角色 业务层处理 * * @author ruoyi */ @Service public class SysRoleServiceImpl implements ISysRoleService { @Autowired private SysRoleMapper roleMapper; @Autowired private SysRoleMenuMapper roleMenuMapper; @Autowired private SysUserRoleMapper userRoleMapper; @Autowired private SysRoleDeptMapper roleDeptMapper; /** * 根据条件分页查询角色数据 * * @param role 角色信息 * @return 角色数据集合信息 */ @Override @DataScope(deptAlias = "d") public List<SysRole> selectRoleList(SysRole role) { return roleMapper.selectRoleList(role); } /** * 根据用户ID查询角色 * * @param userId 用户ID * @return 角色列表 */ @Override public List<SysRole> selectRolesByUserId(Long userId) { List<SysRole> userRoles = roleMapper.selectRolePermissionByUserId(userId); List<SysRole> roles = selectRoleAll(); for (SysRole role : roles) { for (SysRole userRole : userRoles) { if (role.getRoleId().longValue() == userRole.getRoleId().longValue()) { role.setFlag(true); break; } } } return roles; } /** * 根据用户ID查询权限 * * @param userId 用户ID * @return 权限列表 */ @Override public Set<String> selectRolePermissionByUserId(Long userId) { List<SysRole> perms = roleMapper.selectRolePermissionByUserId(userId); Set<String> permsSet = new HashSet<>(); for (SysRole perm : perms) { if (StringUtils.isNotNull(perm)) { permsSet.addAll(Arrays.asList(perm.getRoleKey().trim().split(","))); } } return permsSet; } /** * 查询所有角色 * * @return 角色列表 */ @Override public List<SysRole> selectRoleAll() { return SpringUtils.getAopProxy(this).selectRoleList(new SysRole()); } /** * 根据用户ID获取角色选择框列表 * * @param userId 用户ID * @return 选中角色ID列表 */ @Override public List<Long> selectRoleListByUserId(Long userId) { return roleMapper.selectRoleListByUserId(userId); } /** * 通过角色ID查询角色 * * @param roleId 角色ID * @return 角色对象信息 */ @Override public SysRole selectRoleById(Long roleId) { return roleMapper.selectRoleById(roleId); } /** * 校验角色名称是否唯一 * * @param role 角色信息 * @return 结果 */ @Override public boolean checkRoleNameUnique(SysRole role) { Long roleId = StringUtils.isNull(role.getRoleId()) ? -1L : role.getRoleId(); SysRole info = roleMapper.checkRoleNameUnique(role.getRoleName()); if (StringUtils.isNotNull(info) && info.getRoleId().longValue() != roleId.longValue()) { return UserConstants.NOT_UNIQUE; } return UserConstants.UNIQUE; } /** * 校验角色权限是否唯一 * * @param role 角色信息 * @return 结果 */ @Override public boolean checkRoleKeyUnique(SysRole role) { Long roleId = StringUtils.isNull(role.getRoleId()) ? -1L : role.getRoleId(); SysRole info = roleMapper.checkRoleKeyUnique(role.getRoleKey()); if (StringUtils.isNotNull(info) && info.getRoleId().longValue() != roleId.longValue()) { return UserConstants.NOT_UNIQUE; } return UserConstants.UNIQUE; } /** * 校验角色是否允许操作 * * @param role 角色信息 */ @Override public void checkRoleAllowed(SysRole role) { if (StringUtils.isNotNull(role.getRoleId()) && role.isAdmin()) { throw new ServiceException("不允许操作超级管理员角色"); } } /** * 校验角色是否有数据权限 * * @param roleIds 角色id */ @Override public void checkRoleDataScope(Long... roleIds) { if (!SysUser.isAdmin(SecurityUtils.getUserId())) { for (Long roleId : roleIds) { SysRole role = new SysRole(); role.setRoleId(roleId); List<SysRole> roles = SpringUtils.getAopProxy(this).selectRoleList(role); if (StringUtils.isEmpty(roles)) { throw new ServiceException("没有权限访问角色数据!"); } } } } /** * 通过角色ID查询角色使用数量 * * @param roleId 角色ID * @return 结果 */ @Override public int countUserRoleByRoleId(Long roleId) { return userRoleMapper.countUserRoleByRoleId(roleId); } /** * 新增保存角色信息 * * @param role 角色信息 * @return 结果 */ @Override @Transactional public int insertRole(SysRole role) { // 新增角色信息 roleMapper.insertRole(role); return insertRoleMenu(role); } /** * 修改保存角色信息 * * @param role 角色信息 * @return 结果 */ @Override @Transactional public int updateRole(SysRole role) { // 修改角色信息 roleMapper.updateRole(role); // 删除角色与菜单关联 roleMenuMapper.deleteRoleMenuByRoleId(role.getRoleId()); return insertRoleMenu(role); } /** * 修改角色状态 * * @param role 角色信息 * @return 结果 */ @Override public int updateRoleStatus(SysRole role) { return roleMapper.updateRole(role); } /** * 修改数据权限信息 * * @param role 角色信息 * @return 结果 */ @Override @Transactional public int authDataScope(SysRole role) { // 修改角色信息 roleMapper.updateRole(role); // 删除角色与部门关联 roleDeptMapper.deleteRoleDeptByRoleId(role.getRoleId()); // 新增角色和部门信息(数据权限) return insertRoleDept(role); } /** * 新增角色菜单信息 * * @param role 角色对象 */ public int insertRoleMenu(SysRole role) { int rows = 1; // 新增用户与角色管理 List<SysRoleMenu> list = new ArrayList<SysRoleMenu>(); for (Long menuId : role.getMenuIds()) { SysRoleMenu rm = new SysRoleMenu(); rm.setRoleId(role.getRoleId()); rm.setMenuId(menuId); list.add(rm); } if (list.size() > 0) { rows = roleMenuMapper.batchRoleMenu(list); } return rows; } /** * 新增角色部门信息(数据权限) * * @param role 角色对象 */ public int insertRoleDept(SysRole role) { int rows = 1; // 新增角色与部门(数据权限)管理 List<SysRoleDept> list = new ArrayList<SysRoleDept>(); for (Long deptId : role.getDeptIds()) { SysRoleDept rd = new SysRoleDept(); rd.setRoleId(role.getRoleId()); rd.setDeptId(deptId); list.add(rd); } if (list.size() > 0) { rows = roleDeptMapper.batchRoleDept(list); } return rows; } /** * 通过角色ID删除角色 * * @param roleId 角色ID * @return 结果 */ @Override @Transactional public int deleteRoleById(Long roleId) { // 删除角色与菜单关联 roleMenuMapper.deleteRoleMenuByRoleId(roleId); // 删除角色与部门关联 roleDeptMapper.deleteRoleDeptByRoleId(roleId); return roleMapper.deleteRoleById(roleId); } /** * 批量删除角色信息 * * @param roleIds 需要删除的角色ID * @return 结果 */ @Override @Transactional public int deleteRoleByIds(Long[] roleIds) { for (Long roleId : roleIds) { checkRoleAllowed(new SysRole(roleId)); checkRoleDataScope(roleId); SysRole role = selectRoleById(roleId); if (countUserRoleByRoleId(roleId) > 0) { throw new ServiceException(String.format("%1$s已分配,不能删除", role.getRoleName())); } } // 删除角色与菜单关联 roleMenuMapper.deleteRoleMenu(roleIds); // 删除角色与部门关联 roleDeptMapper.deleteRoleDept(roleIds); return roleMapper.deleteRoleByIds(roleIds); } /** * 取消授权用户角色 * * @param userRole 用户和角色关联信息 * @return 结果 */ @Override public int deleteAuthUser(SysUserRole userRole) { return userRoleMapper.deleteUserRoleInfo(userRole); } /** * 批量取消授权用户角色 * * @param roleId 角色ID * @param userIds 需要取消授权的用户数据ID * @return 结果 */ @Override public int deleteAuthUsers(Long roleId, Long[] userIds) { return userRoleMapper.deleteUserRoleInfos(roleId, userIds); } /** * 批量选择授权用户角色 * * @param roleId 角色ID * @param userIds 需要授权的用户数据ID * @return 结果 */ @Override public int insertAuthUsers(Long roleId, Long[] userIds) { // 新增用户与角色管理 List<SysUserRole> list = new ArrayList<SysUserRole>(); for (Long userId : userIds) { SysUserRole ur = new SysUserRole(); ur.setUserId(userId); ur.setRoleId(roleId); list.add(ur); } return userRoleMapper.batchUserRole(list); } }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java
Java
mit
11,243
package com.ruoyi.system.service.impl; import org.springframework.stereotype.Service; import com.ruoyi.common.core.domain.model.LoginUser; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.domain.SysUserOnline; import com.ruoyi.system.service.ISysUserOnlineService; /** * 在线用户 服务层处理 * * @author ruoyi */ @Service public class SysUserOnlineServiceImpl implements ISysUserOnlineService { /** * 通过登录地址查询信息 * * @param ipaddr 登录地址 * @param user 用户信息 * @return 在线用户信息 */ @Override public SysUserOnline selectOnlineByIpaddr(String ipaddr, LoginUser user) { if (StringUtils.equals(ipaddr, user.getIpaddr())) { return loginUserToUserOnline(user); } return null; } /** * 通过用户名称查询信息 * * @param userName 用户名称 * @param user 用户信息 * @return 在线用户信息 */ @Override public SysUserOnline selectOnlineByUserName(String userName, LoginUser user) { if (StringUtils.equals(userName, user.getUsername())) { return loginUserToUserOnline(user); } return null; } /** * 通过登录地址/用户名称查询信息 * * @param ipaddr 登录地址 * @param userName 用户名称 * @param user 用户信息 * @return 在线用户信息 */ @Override public SysUserOnline selectOnlineByInfo(String ipaddr, String userName, LoginUser user) { if (StringUtils.equals(ipaddr, user.getIpaddr()) && StringUtils.equals(userName, user.getUsername())) { return loginUserToUserOnline(user); } return null; } /** * 设置在线用户信息 * * @param user 用户信息 * @return 在线用户 */ @Override public SysUserOnline loginUserToUserOnline(LoginUser user) { if (StringUtils.isNull(user) || StringUtils.isNull(user.getUser())) { return null; } SysUserOnline sysUserOnline = new SysUserOnline(); sysUserOnline.setTokenId(user.getToken()); sysUserOnline.setUserName(user.getUsername()); sysUserOnline.setIpaddr(user.getIpaddr()); sysUserOnline.setLoginLocation(user.getLoginLocation()); sysUserOnline.setBrowser(user.getBrowser()); sysUserOnline.setOs(user.getOs()); sysUserOnline.setLoginTime(user.getLoginTime()); if (StringUtils.isNotNull(user.getUser().getDept())) { sysUserOnline.setDeptName(user.getUser().getDept().getDeptName()); } return sysUserOnline; } }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserOnlineServiceImpl.java
Java
mit
2,745
package com.ruoyi.system.service.impl; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; import javax.validation.Validator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import com.ruoyi.common.annotation.DataScope; import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.bean.BeanValidators; import com.ruoyi.common.utils.spring.SpringUtils; import com.ruoyi.system.domain.SysPost; import com.ruoyi.system.domain.SysUserPost; import com.ruoyi.system.domain.SysUserRole; import com.ruoyi.system.mapper.SysPostMapper; import com.ruoyi.system.mapper.SysRoleMapper; import com.ruoyi.system.mapper.SysUserMapper; import com.ruoyi.system.mapper.SysUserPostMapper; import com.ruoyi.system.mapper.SysUserRoleMapper; import com.ruoyi.system.service.ISysConfigService; import com.ruoyi.system.service.ISysDeptService; import com.ruoyi.system.service.ISysUserService; /** * 用户 业务层处理 * * @author ruoyi */ @Service public class SysUserServiceImpl implements ISysUserService { private static final Logger log = LoggerFactory.getLogger(SysUserServiceImpl.class); @Autowired private SysUserMapper userMapper; @Autowired private SysRoleMapper roleMapper; @Autowired private SysPostMapper postMapper; @Autowired private SysUserRoleMapper userRoleMapper; @Autowired private SysUserPostMapper userPostMapper; @Autowired private ISysConfigService configService; @Autowired private ISysDeptService deptService; @Autowired protected Validator validator; /** * 根据条件分页查询用户列表 * * @param user 用户信息 * @return 用户信息集合信息 */ @Override @DataScope(deptAlias = "d", userAlias = "u") public List<SysUser> selectUserList(SysUser user) { return userMapper.selectUserList(user); } /** * 根据条件分页查询已分配用户角色列表 * * @param user 用户信息 * @return 用户信息集合信息 */ @Override @DataScope(deptAlias = "d", userAlias = "u") public List<SysUser> selectAllocatedList(SysUser user) { return userMapper.selectAllocatedList(user); } /** * 根据条件分页查询未分配用户角色列表 * * @param user 用户信息 * @return 用户信息集合信息 */ @Override @DataScope(deptAlias = "d", userAlias = "u") public List<SysUser> selectUnallocatedList(SysUser user) { return userMapper.selectUnallocatedList(user); } /** * 通过用户名查询用户 * * @param userName 用户名 * @return 用户对象信息 */ @Override public SysUser selectUserByUserName(String userName) { return userMapper.selectUserByUserName(userName); } /** * 通过用户ID查询用户 * * @param userId 用户ID * @return 用户对象信息 */ @Override public SysUser selectUserById(Long userId) { return userMapper.selectUserById(userId); } /** * 查询用户所属角色组 * * @param userName 用户名 * @return 结果 */ @Override public String selectUserRoleGroup(String userName) { List<SysRole> list = roleMapper.selectRolesByUserName(userName); if (CollectionUtils.isEmpty(list)) { return StringUtils.EMPTY; } return list.stream().map(SysRole::getRoleName).collect(Collectors.joining(",")); } /** * 查询用户所属岗位组 * * @param userName 用户名 * @return 结果 */ @Override public String selectUserPostGroup(String userName) { List<SysPost> list = postMapper.selectPostsByUserName(userName); if (CollectionUtils.isEmpty(list)) { return StringUtils.EMPTY; } return list.stream().map(SysPost::getPostName).collect(Collectors.joining(",")); } /** * 校验用户名称是否唯一 * * @param user 用户信息 * @return 结果 */ @Override public boolean checkUserNameUnique(SysUser user) { Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId(); SysUser info = userMapper.checkUserNameUnique(user.getUserName()); if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue()) { return UserConstants.NOT_UNIQUE; } return UserConstants.UNIQUE; } /** * 校验手机号码是否唯一 * * @param user 用户信息 * @return */ @Override public boolean checkPhoneUnique(SysUser user) { Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId(); SysUser info = userMapper.checkPhoneUnique(user.getPhonenumber()); if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue()) { return UserConstants.NOT_UNIQUE; } return UserConstants.UNIQUE; } /** * 校验email是否唯一 * * @param user 用户信息 * @return */ @Override public boolean checkEmailUnique(SysUser user) { Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId(); SysUser info = userMapper.checkEmailUnique(user.getEmail()); if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue()) { return UserConstants.NOT_UNIQUE; } return UserConstants.UNIQUE; } /** * 校验用户是否允许操作 * * @param user 用户信息 */ @Override public void checkUserAllowed(SysUser user) { if (StringUtils.isNotNull(user.getUserId()) && user.isAdmin()) { throw new ServiceException("不允许操作超级管理员用户"); } } /** * 校验用户是否有数据权限 * * @param userId 用户id */ @Override public void checkUserDataScope(Long userId) { if (!SysUser.isAdmin(SecurityUtils.getUserId())) { SysUser user = new SysUser(); user.setUserId(userId); List<SysUser> users = SpringUtils.getAopProxy(this).selectUserList(user); if (StringUtils.isEmpty(users)) { throw new ServiceException("没有权限访问用户数据!"); } } } /** * 新增保存用户信息 * * @param user 用户信息 * @return 结果 */ @Override @Transactional public int insertUser(SysUser user) { // 新增用户信息 int rows = userMapper.insertUser(user); // 新增用户岗位关联 insertUserPost(user); // 新增用户与角色管理 insertUserRole(user); return rows; } /** * 注册用户信息 * * @param user 用户信息 * @return 结果 */ @Override public boolean registerUser(SysUser user) { return userMapper.insertUser(user) > 0; } /** * 修改保存用户信息 * * @param user 用户信息 * @return 结果 */ @Override @Transactional public int updateUser(SysUser user) { Long userId = user.getUserId(); // 删除用户与角色关联 userRoleMapper.deleteUserRoleByUserId(userId); // 新增用户与角色管理 insertUserRole(user); // 删除用户与岗位关联 userPostMapper.deleteUserPostByUserId(userId); // 新增用户与岗位管理 insertUserPost(user); return userMapper.updateUser(user); } /** * 用户授权角色 * * @param userId 用户ID * @param roleIds 角色组 */ @Override @Transactional public void insertUserAuth(Long userId, Long[] roleIds) { userRoleMapper.deleteUserRoleByUserId(userId); insertUserRole(userId, roleIds); } /** * 修改用户状态 * * @param user 用户信息 * @return 结果 */ @Override public int updateUserStatus(SysUser user) { return userMapper.updateUser(user); } /** * 修改用户基本信息 * * @param user 用户信息 * @return 结果 */ @Override public int updateUserProfile(SysUser user) { return userMapper.updateUser(user); } /** * 修改用户头像 * * @param userName 用户名 * @param avatar 头像地址 * @return 结果 */ @Override public boolean updateUserAvatar(String userName, String avatar) { return userMapper.updateUserAvatar(userName, avatar) > 0; } /** * 重置用户密码 * * @param user 用户信息 * @return 结果 */ @Override public int resetPwd(SysUser user) { return userMapper.updateUser(user); } /** * 重置用户密码 * * @param userName 用户名 * @param password 密码 * @return 结果 */ @Override public int resetUserPwd(String userName, String password) { return userMapper.resetUserPwd(userName, password); } /** * 新增用户角色信息 * * @param user 用户对象 */ public void insertUserRole(SysUser user) { this.insertUserRole(user.getUserId(), user.getRoleIds()); } /** * 新增用户岗位信息 * * @param user 用户对象 */ public void insertUserPost(SysUser user) { Long[] posts = user.getPostIds(); if (StringUtils.isNotEmpty(posts)) { // 新增用户与岗位管理 List<SysUserPost> list = new ArrayList<SysUserPost>(posts.length); for (Long postId : posts) { SysUserPost up = new SysUserPost(); up.setUserId(user.getUserId()); up.setPostId(postId); list.add(up); } userPostMapper.batchUserPost(list); } } /** * 新增用户角色信息 * * @param userId 用户ID * @param roleIds 角色组 */ public void insertUserRole(Long userId, Long[] roleIds) { if (StringUtils.isNotEmpty(roleIds)) { // 新增用户与角色管理 List<SysUserRole> list = new ArrayList<SysUserRole>(roleIds.length); for (Long roleId : roleIds) { SysUserRole ur = new SysUserRole(); ur.setUserId(userId); ur.setRoleId(roleId); list.add(ur); } userRoleMapper.batchUserRole(list); } } /** * 通过用户ID删除用户 * * @param userId 用户ID * @return 结果 */ @Override @Transactional public int deleteUserById(Long userId) { // 删除用户与角色关联 userRoleMapper.deleteUserRoleByUserId(userId); // 删除用户与岗位表 userPostMapper.deleteUserPostByUserId(userId); return userMapper.deleteUserById(userId); } /** * 批量删除用户信息 * * @param userIds 需要删除的用户ID * @return 结果 */ @Override @Transactional public int deleteUserByIds(Long[] userIds) { for (Long userId : userIds) { checkUserAllowed(new SysUser(userId)); checkUserDataScope(userId); } // 删除用户与角色关联 userRoleMapper.deleteUserRole(userIds); // 删除用户与岗位关联 userPostMapper.deleteUserPost(userIds); return userMapper.deleteUserByIds(userIds); } /** * 导入用户数据 * * @param userList 用户数据列表 * @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据 * @param operName 操作用户 * @return 结果 */ @Override public String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName) { if (StringUtils.isNull(userList) || userList.size() == 0) { throw new ServiceException("导入用户数据不能为空!"); } int successNum = 0; int failureNum = 0; StringBuilder successMsg = new StringBuilder(); StringBuilder failureMsg = new StringBuilder(); for (SysUser user : userList) { try { // 验证是否存在这个用户 SysUser u = userMapper.selectUserByUserName(user.getUserName()); if (StringUtils.isNull(u)) { BeanValidators.validateWithException(validator, user); deptService.checkDeptDataScope(user.getDeptId()); String password = configService.selectConfigByKey("sys.user.initPassword"); user.setPassword(SecurityUtils.encryptPassword(password)); user.setCreateBy(operName); userMapper.insertUser(user); successNum++; successMsg.append("<br/>" + successNum + "、账号 " + user.getUserName() + " 导入成功"); } else if (isUpdateSupport) { BeanValidators.validateWithException(validator, user); checkUserAllowed(u); checkUserDataScope(u.getUserId()); deptService.checkDeptDataScope(user.getDeptId()); user.setUserId(u.getUserId()); user.setUpdateBy(operName); userMapper.updateUser(user); successNum++; successMsg.append("<br/>" + successNum + "、账号 " + user.getUserName() + " 更新成功"); } else { failureNum++; failureMsg.append("<br/>" + failureNum + "、账号 " + user.getUserName() + " 已存在"); } } catch (Exception e) { failureNum++; String msg = "<br/>" + failureNum + "、账号 " + user.getUserName() + " 导入失败:"; failureMsg.append(msg + e.getMessage()); log.error(msg, e); } } if (failureNum > 0) { failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:"); throw new ServiceException(failureMsg.toString()); } else { successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:"); } return successMsg.toString(); } }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
Java
mit
15,519
module.exports = { presets: [ // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app '@vue/cli-plugin-babel/preset' ], 'env': { 'development': { // babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require(). // This plugin can significantly increase the speed of hot updates, when you have a large number of pages. 'plugins': ['dynamic-import-node'] } } }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/babel.config.js
JavaScript
mit
462
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8" /> <title>请升级您的浏览器</title> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" > <meta name="renderer" content="webkit"> <base target="_blank" /> <style type="text/css"> html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}table{border-collapse:collapse;border-spacing:0} a{text-decoration:none;color:#0072c6;}a:hover{text-decoration:none;color:#004d8c;} body{width:960px;margin:0 auto;padding:10px;font-size:14px;line-height:24px;color:#454545;font-family:'Microsoft YaHei UI','Microsoft YaHei',DengXian,SimSun,'Segoe UI',Tahoma,Helvetica,sans-serif;overflow-y:scroll} h1{font-size:40px;line-height:80px;font-weight:100;margin-bottom:10px;} h2{font-size:20px;line-height:25px;font-weight:100;margin:10px 0;} em{color:red} p{margin-bottom:10px;} hr{margin:20px 0;border:0;border-top:1px solid #dadada} span{display:block;font-size:12px;line-height:12px;} .clean{clear:both;} .browser{padding:10px 10px;} .browser li{width:auto;padding:0 80px;margin-top:30px;height:34px;line-height:22px;float:left;list-style:none;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAADMCAYAAAAWCXEwAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi372/EAe/tt68ABxmkCZrcCjg/1xYW52rlKO58sEQjFu9+cj/seFf/2OKdHiNLFcLBWK8ViJuFAiTcd5uVKRRCHJleIS6X8y8R+W/QmTd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d2Hs91cyZl9v3k19lgLPaev15TV1NDR6Oz4/0vrC26ceYVhcL45X/GB4d2Eljf7Q+cJI9pHqiGPVqVeZd+wRZicOZ0bCvbyS9DAfpD3PnnNfUuO3ny9NVI2T+eVI8oVPGrUB2ZsfzX1HehJTtMK6FgyJZOYW0+gXf1EIz8wro9LhvKTn2lrugkMoFOS5n/7C0APXYK8tb3GepMrh5HB8Cmknz5JbXEpBSQVlFbVU2N0UlVWRW1RK1s95/JCQzMkzPyPLMpqm4ff7CQQChEIhJElCURQ0TcPsVOm6fn6tCT+oUOkq4bGE27n/qzv4KeMIwVCQQCBAbV0ttXW1VFRWkJ19lrS0DJKSj5F4NInk5OOcPHmK/Px8amtrcbvd1NTU4HQ6cbvdNDU1WTCyLKOqaguYDmvfgNzE4bIYdpWv4UT5EezuMkQl9B877PT/DQC7cLwx8LR3hQAAAABJRU5ErkJggg==) no-repeat;padding-left:40px} .browser .browser-firefox{background-position:0 -34px} .browser .browser-ie{background-position:0 -68px;margin-left:0px} .browser .browser-360{background-position:0 -170px;margin-left: -27px} </style> </head> <body style="margin-top:50px"> <h1>请升级您的浏览器,以便我们更好的为您提供服务!</h1> <p>您正在使用 Internet Explorer 的早期版本(IE11以下版本或使用该内核的浏览器)。这意味着在升级浏览器前,您将无法访问此网站。</p> <hr> <h2>请注意:微软公司对Windows XP 及 Internet Explorer 早期版本的支持已经结束</h2> <p>自 2016 年 1 月 12 日起,Microsoft 不再为 IE 11 以下版本提供相应支持和更新。没有关键的浏览器安全更新,您的电脑可能易受有害病毒、间谍软件和其他恶意软件的攻击,它们可以窃取或损害您的业务数据和信息。请参阅 <a href="https://www.microsoft.com/zh-cn/WindowsForBusiness/End-of-IE-support">微软对 Internet Explorer 早期版本的支持将于 2016 年 1 月 12 日结束的说明</a> 。</p> <hr> <h2>您可以选择更先进的浏览器</h2> <p>推荐使用以下浏览器的最新版本。如果您的电脑已有以下浏览器的最新版本则直接使用该浏览器访问即可。</p> <ul class="browser"> <li class="browser-chrome"><a href="https://www.google.cn/chrome/browser/desktop/index.html?hl=zh-CN&standalone=1"> 谷歌浏览器<span>Google Chrome</span></a></li> <li class="browser-firefox"><a href="https://www.mozilla.org/zh-CN/firefox/new/"> 火狐浏览器<span>Mozilla Firefox</span></a></li> <li class="browser-ie"><a href="https://windows.microsoft.com/zh-cn/internet-explorer/download-ie"> IE 11 浏览器<span>Internet Explorer</span></a></li> <li class="browser-360"><a href="http://se.360.cn/"> 360安全浏览器<span>360 Chrome</span></a></li> <div class="clean"></div> </ul> <hr> </body> </html>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/public/html/ie.html
HTML
mit
23,578
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="renderer" content="webkit"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <link rel="icon" href="<%= BASE_URL %>favicon.ico"> <title><%= webpackConfig.name %></title> <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]--> <style> html, body, #app { height: 100%; margin: 0px; padding: 0px; } .chromeframe { margin: 0.2em 0; background: #ccc; color: #000; padding: 0.2em 0; } #loader-wrapper { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 999999; } #loader { display: block; position: relative; left: 50%; top: 50%; width: 150px; height: 150px; margin: -75px 0 0 -75px; border-radius: 50%; border: 3px solid transparent; border-top-color: #FFF; -webkit-animation: spin 2s linear infinite; -ms-animation: spin 2s linear infinite; -moz-animation: spin 2s linear infinite; -o-animation: spin 2s linear infinite; animation: spin 2s linear infinite; z-index: 1001; } #loader:before { content: ""; position: absolute; top: 5px; left: 5px; right: 5px; bottom: 5px; border-radius: 50%; border: 3px solid transparent; border-top-color: #FFF; -webkit-animation: spin 3s linear infinite; -moz-animation: spin 3s linear infinite; -o-animation: spin 3s linear infinite; -ms-animation: spin 3s linear infinite; animation: spin 3s linear infinite; } #loader:after { content: ""; position: absolute; top: 15px; left: 15px; right: 15px; bottom: 15px; border-radius: 50%; border: 3px solid transparent; border-top-color: #FFF; -moz-animation: spin 1.5s linear infinite; -o-animation: spin 1.5s linear infinite; -ms-animation: spin 1.5s linear infinite; -webkit-animation: spin 1.5s linear infinite; animation: spin 1.5s linear infinite; } @-webkit-keyframes spin { 0% { -webkit-transform: rotate(0deg); -ms-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); -ms-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes spin { 0% { -webkit-transform: rotate(0deg); -ms-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); -ms-transform: rotate(360deg); transform: rotate(360deg); } } #loader-wrapper .loader-section { position: fixed; top: 0; width: 51%; height: 100%; background: #7171C6; z-index: 1000; -webkit-transform: translateX(0); -ms-transform: translateX(0); transform: translateX(0); } #loader-wrapper .loader-section.section-left { left: 0; } #loader-wrapper .loader-section.section-right { right: 0; } .loaded #loader-wrapper .loader-section.section-left { -webkit-transform: translateX(-100%); -ms-transform: translateX(-100%); transform: translateX(-100%); -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000); transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000); } .loaded #loader-wrapper .loader-section.section-right { -webkit-transform: translateX(100%); -ms-transform: translateX(100%); transform: translateX(100%); -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000); transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000); } .loaded #loader { opacity: 0; -webkit-transition: all 0.3s ease-out; transition: all 0.3s ease-out; } .loaded #loader-wrapper { visibility: hidden; -webkit-transform: translateY(-100%); -ms-transform: translateY(-100%); transform: translateY(-100%); -webkit-transition: all 0.3s 1s ease-out; transition: all 0.3s 1s ease-out; } .no-js #loader-wrapper { display: none; } .no-js h1 { color: #222222; } #loader-wrapper .load_title { font-family: 'Open Sans'; color: #FFF; font-size: 19px; width: 100%; text-align: center; z-index: 9999999999999; position: absolute; top: 60%; opacity: 1; line-height: 30px; } #loader-wrapper .load_title span { font-weight: normal; font-style: italic; font-size: 13px; color: #FFF; opacity: 0.5; } </style> </head> <body> <div id="app"> <div id="loader-wrapper"> <div id="loader"></div> <div class="loader-section section-left"></div> <div class="loader-section section-right"></div> <div class="load_title">正在加载系统资源,请耐心等待</div> </div> </div> </body> </html>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/public/index.html
HTML
mit
5,284
<template> <div id="app"> <router-view /> <theme-picker /> </div> </template> <script> import ThemePicker from "@/components/ThemePicker" export default { name: "App", components: { ThemePicker } } </script> <style scoped> #app .theme-picker { display: none; } </style>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/App.vue
Vue
mit
290
import request from '@/utils/request' // 登录方法 export function login(username, password, code, uuid) { const data = { username, password, code, uuid } return request({ url: '/login', headers: { isToken: false, repeatSubmit: false }, method: 'post', data: data }) } // 注册方法 export function register(data) { return request({ url: '/register', headers: { isToken: false }, method: 'post', data: data }) } // 获取用户详细信息 export function getInfo() { return request({ url: '/getInfo', method: 'get' }) } // 退出方法 export function logout() { return request({ url: '/logout', method: 'post' }) } // 获取验证码 export function getCodeImg() { return request({ url: '/captchaImage', headers: { isToken: false }, method: 'get', timeout: 20000 }) }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/api/login.js
JavaScript
mit
919
import request from '@/utils/request' // 获取路由 export const getRouters = () => { return request({ url: '/getRouters', method: 'get' }) }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/api/menu.js
JavaScript
mit
156
import request from '@/utils/request' // 查询缓存详细 export function getCache() { return request({ url: '/monitor/cache', method: 'get' }) } // 查询缓存名称列表 export function listCacheName() { return request({ url: '/monitor/cache/getNames', method: 'get' }) } // 查询缓存键名列表 export function listCacheKey(cacheName) { return request({ url: '/monitor/cache/getKeys/' + cacheName, method: 'get' }) } // 查询缓存内容 export function getCacheValue(cacheName, cacheKey) { return request({ url: '/monitor/cache/getValue/' + cacheName + '/' + cacheKey, method: 'get' }) } // 清理指定名称缓存 export function clearCacheName(cacheName) { return request({ url: '/monitor/cache/clearCacheName/' + cacheName, method: 'delete' }) } // 清理指定键名缓存 export function clearCacheKey(cacheKey) { return request({ url: '/monitor/cache/clearCacheKey/' + cacheKey, method: 'delete' }) } // 清理全部缓存 export function clearCacheAll() { return request({ url: '/monitor/cache/clearCacheAll', method: 'delete' }) }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/api/monitor/cache.js
JavaScript
mit
1,144
import request from '@/utils/request' // 查询定时任务调度列表 export function listJob(query) { return request({ url: '/monitor/job/list', method: 'get', params: query }) } // 查询定时任务调度详细 export function getJob(jobId) { return request({ url: '/monitor/job/' + jobId, method: 'get' }) } // 新增定时任务调度 export function addJob(data) { return request({ url: '/monitor/job', method: 'post', data: data }) } // 修改定时任务调度 export function updateJob(data) { return request({ url: '/monitor/job', method: 'put', data: data }) } // 删除定时任务调度 export function delJob(jobId) { return request({ url: '/monitor/job/' + jobId, method: 'delete' }) } // 任务状态修改 export function changeJobStatus(jobId, status) { const data = { jobId, status } return request({ url: '/monitor/job/changeStatus', method: 'put', data: data }) } // 定时任务立即执行一次 export function runJob(jobId, jobGroup) { const data = { jobId, jobGroup } return request({ url: '/monitor/job/run', method: 'put', data: data }) }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/api/monitor/job.js
JavaScript
mit
1,204
import request from '@/utils/request' // 查询调度日志列表 export function listJobLog(query) { return request({ url: '/monitor/jobLog/list', method: 'get', params: query }) } // 删除调度日志 export function delJobLog(jobLogId) { return request({ url: '/monitor/jobLog/' + jobLogId, method: 'delete' }) } // 清空调度日志 export function cleanJobLog() { return request({ url: '/monitor/jobLog/clean', method: 'delete' }) }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/api/monitor/jobLog.js
JavaScript
mit
483
import request from '@/utils/request' // 查询登录日志列表 export function list(query) { return request({ url: '/monitor/logininfor/list', method: 'get', params: query }) } // 删除登录日志 export function delLogininfor(infoId) { return request({ url: '/monitor/logininfor/' + infoId, method: 'delete' }) } // 解锁用户登录状态 export function unlockLogininfor(userName) { return request({ url: '/monitor/logininfor/unlock/' + userName, method: 'get' }) } // 清空登录日志 export function cleanLogininfor() { return request({ url: '/monitor/logininfor/clean', method: 'delete' }) }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/api/monitor/logininfor.js
JavaScript
mit
662
import request from '@/utils/request' // 查询在线用户列表 export function list(query) { return request({ url: '/monitor/online/list', method: 'get', params: query }) } // 强退用户 export function forceLogout(tokenId) { return request({ url: '/monitor/online/' + tokenId, method: 'delete' }) }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/api/monitor/online.js
JavaScript
mit
335
import request from '@/utils/request' // 查询操作日志列表 export function list(query) { return request({ url: '/monitor/operlog/list', method: 'get', params: query }) } // 删除操作日志 export function delOperlog(operId) { return request({ url: '/monitor/operlog/' + operId, method: 'delete' }) } // 清空操作日志 export function cleanOperlog() { return request({ url: '/monitor/operlog/clean', method: 'delete' }) }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/api/monitor/operlog.js
JavaScript
mit
478
import request from '@/utils/request' // 获取服务信息 export function getServer() { return request({ url: '/monitor/server', method: 'get' }) }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/api/monitor/server.js
JavaScript
mit
162
import request from '@/utils/request' // 查询参数列表 export function listConfig(query) { return request({ url: '/system/config/list', method: 'get', params: query }) } // 查询参数详细 export function getConfig(configId) { return request({ url: '/system/config/' + configId, method: 'get' }) } // 根据参数键名查询参数值 export function getConfigKey(configKey) { return request({ url: '/system/config/configKey/' + configKey, method: 'get' }) } // 新增参数配置 export function addConfig(data) { return request({ url: '/system/config', method: 'post', data: data }) } // 修改参数配置 export function updateConfig(data) { return request({ url: '/system/config', method: 'put', data: data }) } // 删除参数配置 export function delConfig(configId) { return request({ url: '/system/config/' + configId, method: 'delete' }) } // 刷新参数缓存 export function refreshCache() { return request({ url: '/system/config/refreshCache', method: 'delete' }) }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/api/system/config.js
JavaScript
mit
1,092
import request from '@/utils/request' // 查询部门列表 export function listDept(query) { return request({ url: '/system/dept/list', method: 'get', params: query }) } // 查询部门列表(排除节点) export function listDeptExcludeChild(deptId) { return request({ url: '/system/dept/list/exclude/' + deptId, method: 'get' }) } // 查询部门详细 export function getDept(deptId) { return request({ url: '/system/dept/' + deptId, method: 'get' }) } // 新增部门 export function addDept(data) { return request({ url: '/system/dept', method: 'post', data: data }) } // 修改部门 export function updateDept(data) { return request({ url: '/system/dept', method: 'put', data: data }) } // 删除部门 export function delDept(deptId) { return request({ url: '/system/dept/' + deptId, method: 'delete' }) }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/api/system/dept.js
JavaScript
mit
908
import request from '@/utils/request' // 查询字典数据列表 export function listData(query) { return request({ url: '/system/dict/data/list', method: 'get', params: query }) } // 查询字典数据详细 export function getData(dictCode) { return request({ url: '/system/dict/data/' + dictCode, method: 'get' }) } // 根据字典类型查询字典数据信息 export function getDicts(dictType) { return request({ url: '/system/dict/data/type/' + dictType, method: 'get' }) } // 新增字典数据 export function addData(data) { return request({ url: '/system/dict/data', method: 'post', data: data }) } // 修改字典数据 export function updateData(data) { return request({ url: '/system/dict/data', method: 'put', data: data }) } // 删除字典数据 export function delData(dictCode) { return request({ url: '/system/dict/data/' + dictCode, method: 'delete' }) }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/api/system/dict/data.js
JavaScript
mit
967
import request from '@/utils/request' // 查询字典类型列表 export function listType(query) { return request({ url: '/system/dict/type/list', method: 'get', params: query }) } // 查询字典类型详细 export function getType(dictId) { return request({ url: '/system/dict/type/' + dictId, method: 'get' }) } // 新增字典类型 export function addType(data) { return request({ url: '/system/dict/type', method: 'post', data: data }) } // 修改字典类型 export function updateType(data) { return request({ url: '/system/dict/type', method: 'put', data: data }) } // 删除字典类型 export function delType(dictId) { return request({ url: '/system/dict/type/' + dictId, method: 'delete' }) } // 刷新字典缓存 export function refreshCache() { return request({ url: '/system/dict/type/refreshCache', method: 'delete' }) } // 获取字典选择框列表 export function optionselect() { return request({ url: '/system/dict/type/optionselect', method: 'get' }) }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/api/system/dict/type.js
JavaScript
mit
1,081
import request from '@/utils/request' // 查询菜单列表 export function listMenu(query) { return request({ url: '/system/menu/list', method: 'get', params: query }) } // 查询菜单详细 export function getMenu(menuId) { return request({ url: '/system/menu/' + menuId, method: 'get' }) } // 查询菜单下拉树结构 export function treeselect() { return request({ url: '/system/menu/treeselect', method: 'get' }) } // 根据角色ID查询菜单下拉树结构 export function roleMenuTreeselect(roleId) { return request({ url: '/system/menu/roleMenuTreeselect/' + roleId, method: 'get' }) } // 新增菜单 export function addMenu(data) { return request({ url: '/system/menu', method: 'post', data: data }) } // 修改菜单 export function updateMenu(data) { return request({ url: '/system/menu', method: 'put', data: data }) } // 删除菜单 export function delMenu(menuId) { return request({ url: '/system/menu/' + menuId, method: 'delete' }) }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/api/system/menu.js
JavaScript
mit
1,060
import request from '@/utils/request' // 查询公告列表 export function listNotice(query) { return request({ url: '/system/notice/list', method: 'get', params: query }) } // 查询公告详细 export function getNotice(noticeId) { return request({ url: '/system/notice/' + noticeId, method: 'get' }) } // 新增公告 export function addNotice(data) { return request({ url: '/system/notice', method: 'post', data: data }) } // 修改公告 export function updateNotice(data) { return request({ url: '/system/notice', method: 'put', data: data }) } // 删除公告 export function delNotice(noticeId) { return request({ url: '/system/notice/' + noticeId, method: 'delete' }) }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/api/system/notice.js
JavaScript
mit
756
import request from '@/utils/request' // 查询岗位列表 export function listPost(query) { return request({ url: '/system/post/list', method: 'get', params: query }) } // 查询岗位详细 export function getPost(postId) { return request({ url: '/system/post/' + postId, method: 'get' }) } // 新增岗位 export function addPost(data) { return request({ url: '/system/post', method: 'post', data: data }) } // 修改岗位 export function updatePost(data) { return request({ url: '/system/post', method: 'put', data: data }) } // 删除岗位 export function delPost(postId) { return request({ url: '/system/post/' + postId, method: 'delete' }) }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/api/system/post.js
JavaScript
mit
729
import request from '@/utils/request' // 查询角色列表 export function listRole(query) { return request({ url: '/system/role/list', method: 'get', params: query }) } // 查询角色详细 export function getRole(roleId) { return request({ url: '/system/role/' + roleId, method: 'get' }) } // 新增角色 export function addRole(data) { return request({ url: '/system/role', method: 'post', data: data }) } // 修改角色 export function updateRole(data) { return request({ url: '/system/role', method: 'put', data: data }) } // 角色数据权限 export function dataScope(data) { return request({ url: '/system/role/dataScope', method: 'put', data: data }) } // 角色状态修改 export function changeRoleStatus(roleId, status) { const data = { roleId, status } return request({ url: '/system/role/changeStatus', method: 'put', data: data }) } // 删除角色 export function delRole(roleId) { return request({ url: '/system/role/' + roleId, method: 'delete' }) } // 查询角色已授权用户列表 export function allocatedUserList(query) { return request({ url: '/system/role/authUser/allocatedList', method: 'get', params: query }) } // 查询角色未授权用户列表 export function unallocatedUserList(query) { return request({ url: '/system/role/authUser/unallocatedList', method: 'get', params: query }) } // 取消用户授权角色 export function authUserCancel(data) { return request({ url: '/system/role/authUser/cancel', method: 'put', data: data }) } // 批量取消用户授权角色 export function authUserCancelAll(data) { return request({ url: '/system/role/authUser/cancelAll', method: 'put', params: data }) } // 授权用户选择 export function authUserSelectAll(data) { return request({ url: '/system/role/authUser/selectAll', method: 'put', params: data }) } // 根据角色ID查询部门树结构 export function deptTreeSelect(roleId) { return request({ url: '/system/role/deptTree/' + roleId, method: 'get' }) }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/api/system/role.js
JavaScript
mit
2,177
import request from '@/utils/request' import { parseStrEmpty } from "@/utils/ruoyi"; // 查询用户列表 export function listUser(query) { return request({ url: '/system/user/list', method: 'get', params: query }) } // 查询用户详细 export function getUser(userId) { return request({ url: '/system/user/' + parseStrEmpty(userId), method: 'get' }) } // 新增用户 export function addUser(data) { return request({ url: '/system/user', method: 'post', data: data }) } // 修改用户 export function updateUser(data) { return request({ url: '/system/user', method: 'put', data: data }) } // 删除用户 export function delUser(userId) { return request({ url: '/system/user/' + userId, method: 'delete' }) } // 用户密码重置 export function resetUserPwd(userId, password) { const data = { userId, password } return request({ url: '/system/user/resetPwd', method: 'put', data: data }) } // 用户状态修改 export function changeUserStatus(userId, status) { const data = { userId, status } return request({ url: '/system/user/changeStatus', method: 'put', data: data }) } // 查询用户个人信息 export function getUserProfile() { return request({ url: '/system/user/profile', method: 'get' }) } // 修改用户个人信息 export function updateUserProfile(data) { return request({ url: '/system/user/profile', method: 'put', data: data }) } // 用户密码重置 export function updateUserPwd(oldPassword, newPassword) { const data = { oldPassword, newPassword } return request({ url: '/system/user/profile/updatePwd', method: 'put', data: data }) } // 用户头像上传 export function uploadAvatar(data) { return request({ url: '/system/user/profile/avatar', method: 'post', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, data: data }) } // 查询授权角色 export function getAuthRole(userId) { return request({ url: '/system/user/authRole/' + userId, method: 'get' }) } // 保存授权角色 export function updateAuthRole(data) { return request({ url: '/system/user/authRole', method: 'put', params: data }) } // 查询部门下拉树结构 export function deptTreeSelect() { return request({ url: '/system/user/deptTree', method: 'get' }) }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/api/system/user.js
JavaScript
mit
2,445
import request from '@/utils/request' // 查询生成表数据 export function listTable(query) { return request({ url: '/tool/gen/list', method: 'get', params: query }) } // 查询db数据库列表 export function listDbTable(query) { return request({ url: '/tool/gen/db/list', method: 'get', params: query }) } // 查询表详细信息 export function getGenTable(tableId) { return request({ url: '/tool/gen/' + tableId, method: 'get' }) } // 修改代码生成信息 export function updateGenTable(data) { return request({ url: '/tool/gen', method: 'put', data: data }) } // 导入表 export function importTable(data) { return request({ url: '/tool/gen/importTable', method: 'post', params: data }) } // 创建表 export function createTable(data) { return request({ url: '/tool/gen/createTable', method: 'post', params: data }) } // 预览生成代码 export function previewTable(tableId) { return request({ url: '/tool/gen/preview/' + tableId, method: 'get' }) } // 删除表数据 export function delTable(tableId) { return request({ url: '/tool/gen/' + tableId, method: 'delete' }) } // 生成代码(自定义路径) export function genCode(tableName) { return request({ url: '/tool/gen/genCode/' + tableName, method: 'get' }) } // 同步数据库 export function synchDb(tableName) { return request({ url: '/tool/gen/synchDb/' + tableName, method: 'get' }) }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/api/tool/gen.js
JavaScript
mit
1,522
import Vue from 'vue' import SvgIcon from '@/components/SvgIcon'// svg component // register globally Vue.component('svg-icon', SvgIcon) const req = require.context('./svg', false, /\.svg$/) const requireAll = requireContext => requireContext.keys().map(requireContext) requireAll(req)
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/assets/icons/index.js
JavaScript
mit
288
@import './variables.scss'; @mixin colorBtn($color) { background: $color; &:hover { color: $color; &:before, &:after { background: $color; } } } .blue-btn { @include colorBtn($blue) } .light-blue-btn { @include colorBtn($light-blue) } .red-btn { @include colorBtn($red) } .pink-btn { @include colorBtn($pink) } .green-btn { @include colorBtn($green) } .tiffany-btn { @include colorBtn($tiffany) } .yellow-btn { @include colorBtn($yellow) } .pan-btn { font-size: 14px; color: #fff; padding: 14px 36px; border-radius: 8px; border: none; outline: none; transition: 600ms ease all; position: relative; display: inline-block; &:hover { background: #fff; &:before, &:after { width: 100%; transition: 600ms ease all; } } &:before, &:after { content: ''; position: absolute; top: 0; right: 0; height: 2px; width: 0; transition: 400ms ease all; } &::after { right: inherit; top: inherit; left: 0; bottom: 0; } } .custom-button { display: inline-block; line-height: 1; white-space: nowrap; cursor: pointer; background: #fff; color: #fff; -webkit-appearance: none; text-align: center; box-sizing: border-box; outline: 0; margin: 0; padding: 10px 15px; font-size: 14px; border-radius: 4px; }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/assets/styles/btn.scss
SCSS
mit
1,370
// cover some element-ui styles .el-breadcrumb__inner, .el-breadcrumb__inner a { font-weight: 400 !important; } .el-upload { input[type="file"] { display: none !important; } } .el-upload__input { display: none; } .cell { .el-tag { margin-right: 0px; } } .small-padding { .cell { padding-left: 5px; padding-right: 5px; } } .fixed-width { .el-button--mini { padding: 7px 10px; width: 60px; } } .status-col { .cell { padding: 0 10px; text-align: center; .el-tag { margin-right: 0px; } } } // to fixed https://github.com/ElemeFE/element/issues/2461 .el-dialog { transform: none; left: 0; position: relative; margin: 0 auto; } // refine element ui upload .upload-container { .el-upload { width: 100%; .el-upload-dragger { width: 100%; height: 200px; } } } // dropdown .el-dropdown-menu { a { display: block } } // fix date-picker ui bug in filter-item .el-range-editor.el-input__inner { display: inline-flex !important; } // to fix el-date-picker css style .el-range-separator { box-sizing: content-box; } .el-menu--collapse > div > .el-submenu > .el-submenu__title .el-submenu__icon-arrow { display: none; }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/assets/styles/element-ui.scss
SCSS
mit
1,246
/** * I think element-ui's default theme color is too light for long-term use. * So I modified the default color and you can modify it to your liking. **/ /* theme color */ $--color-primary: #1890ff; $--color-success: #13ce66; $--color-warning: #ffba00; $--color-danger: #ff4949; // $--color-info: #1E1E1E; $--button-font-weight: 400; // $--color-text-regular: #1f2d3d; $--border-color-light: #dfe4ed; $--border-color-lighter: #e6ebf5; $--table-border: 1px solid #dfe6ec; /* icon font path, required */ $--font-path: '~element-ui/lib/theme-chalk/fonts'; @import "~element-ui/packages/theme-chalk/src/index"; // the :export directive is the magic sauce for webpack // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass :export { theme: $--color-primary; }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/assets/styles/element-variables.scss
SCSS
mit
790
@import './variables.scss'; @import './mixin.scss'; @import './transition.scss'; @import './element-ui.scss'; @import './sidebar.scss'; @import './btn.scss'; body { height: 100%; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif; } label { font-weight: 700; } html { height: 100%; box-sizing: border-box; } #app { height: 100%; } *, *:before, *:after { box-sizing: inherit; } .no-padding { padding: 0px !important; } .padding-content { padding: 4px 0; } a:focus, a:active { outline: none; } a, a:focus, a:hover { cursor: pointer; color: inherit; text-decoration: none; } div:focus { outline: none; } .fr { float: right; } .fl { float: left; } .pr-5 { padding-right: 5px; } .pl-5 { padding-left: 5px; } .block { display: block; } .pointer { cursor: pointer; } .inlineBlock { display: block; } .clearfix { &:after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; } } aside { background: #eef1f6; padding: 8px 24px; margin-bottom: 20px; border-radius: 2px; display: block; line-height: 32px; font-size: 16px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; color: #2c3e50; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; a { color: #337ab7; cursor: pointer; &:hover { color: rgb(32, 160, 255); } } } //main-container全局样式 .app-container { padding: 20px; } .components-container { margin: 30px 50px; position: relative; } .text-center { text-align: center } .sub-navbar { height: 50px; line-height: 50px; position: relative; width: 100%; text-align: right; padding-right: 20px; transition: 600ms ease position; background: linear-gradient(90deg, rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%, rgba(33, 120, 241, 1) 100%, rgba(33, 120, 241, 1) 100%); .subtitle { font-size: 20px; color: #fff; } &.draft { background: #d0d0d0; } &.deleted { background: #d0d0d0; } } .link-type, .link-type:focus { color: #337ab7; cursor: pointer; &:hover { color: rgb(32, 160, 255); } } .filter-container { padding-bottom: 10px; .filter-item { display: inline-block; vertical-align: middle; margin-bottom: 10px; } }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/assets/styles/index.scss
SCSS
mit
2,578
@mixin clearfix { &:after { content: ""; display: table; clear: both; } } @mixin scrollBar { &::-webkit-scrollbar-track-piece { background: #d3dce6; } &::-webkit-scrollbar { width: 6px; } &::-webkit-scrollbar-thumb { background: #99a9bf; border-radius: 20px; } } @mixin relative { position: relative; width: 100%; height: 100%; } @mixin pct($pct) { width: #{$pct}; position: relative; margin: 0 auto; } @mixin triangle($width, $height, $color, $direction) { $width: $width/2; $color-border-style: $height solid $color; $transparent-border-style: $width solid transparent; height: 0; width: 0; @if $direction==up { border-bottom: $color-border-style; border-left: $transparent-border-style; border-right: $transparent-border-style; } @else if $direction==right { border-left: $color-border-style; border-top: $transparent-border-style; border-bottom: $transparent-border-style; } @else if $direction==down { border-top: $color-border-style; border-left: $transparent-border-style; border-right: $transparent-border-style; } @else if $direction==left { border-right: $color-border-style; border-top: $transparent-border-style; border-bottom: $transparent-border-style; } }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/assets/styles/mixin.scss
SCSS
mit
1,311
/** * 通用css样式布局处理 * Copyright (c) 2019 ruoyi */ /** 基础通用 **/ .pt5 { padding-top: 5px; } .pr5 { padding-right: 5px; } .pb5 { padding-bottom: 5px; } .mt5 { margin-top: 5px; } .mr5 { margin-right: 5px; } .mb5 { margin-bottom: 5px; } .mb8 { margin-bottom: 8px; } .ml5 { margin-left: 5px; } .mt10 { margin-top: 10px; } .mr10 { margin-right: 10px; } .mb10 { margin-bottom: 10px; } .ml10 { margin-left: 10px; } .mt20 { margin-top: 20px; } .mr20 { margin-right: 20px; } .mb20 { margin-bottom: 20px; } .ml20 { margin-left: 20px; } .h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 { font-family: inherit; font-weight: 500; line-height: 1.1; color: inherit; } .el-message-box__status + .el-message-box__message{ word-break: break-word; } .el-dialog:not(.is-fullscreen) { margin-top: 6vh !important; } .el-dialog__wrapper.scrollbar .el-dialog .el-dialog__body { overflow: auto; overflow-x: hidden; max-height: 70vh; padding: 10px 20px 0; } .el-table { .el-table__header-wrapper, .el-table__fixed-header-wrapper { th { word-break: break-word; background-color: #f8f8f9; color: #515a6e; height: 40px; font-size: 13px; } } .el-table__body-wrapper { .el-button [class*="el-icon-"] + span { margin-left: 1px; } } } /** 表单布局 **/ .form-header { font-size: 15px; color: #6379bb; border-bottom: 1px solid #ddd; margin: 8px 10px 25px 10px; padding-bottom: 5px } /** 表格布局 **/ .pagination-container { display: flex; justify-content: flex-end; margin-top: 20px; } /* tree border */ .tree-border { margin-top: 5px; border: 1px solid #e5e6e7; background: #FFFFFF none; border-radius: 4px; } @media (max-width: 768px) { .pagination-container .el-pagination > .el-pagination__jump { display: none !important; } .pagination-container .el-pagination > .el-pagination__sizes { display: none !important; } } .el-table .fixed-width .el-button--mini { padding-left: 0; padding-right: 0; width: inherit; } /** 表格更多操作下拉样式 */ .el-table .el-dropdown-link,.el-table .el-dropdown-selfdefine { cursor: pointer; margin-left: 5px; } .el-table .el-dropdown, .el-icon-arrow-down { font-size: 12px; } .el-tree-node__content > .el-checkbox { margin-right: 8px; } .list-group-striped > .list-group-item { border-left: 0; border-right: 0; border-radius: 0; padding-left: 0; padding-right: 0; } .list-group { padding-left: 0px; list-style: none; } .list-group-item { border-bottom: 1px solid #e7eaec; border-top: 1px solid #e7eaec; margin-bottom: -1px; padding: 11px 0px; font-size: 13px; } .pull-right { float: right !important; } .el-card__header { padding: 14px 15px 7px; min-height: 40px; } .el-card__body { padding: 15px 20px 20px 20px; } .card-box { margin-bottom: 10px; } /* button color */ .el-button--cyan.is-active, .el-button--cyan:active { background: #20B2AA; border-color: #20B2AA; color: #FFFFFF; } .el-button--cyan:focus, .el-button--cyan:hover { background: #48D1CC; border-color: #48D1CC; color: #FFFFFF; } .el-button--cyan { background-color: #20B2AA; border-color: #20B2AA; color: #FFFFFF; } /* text color */ .text-navy { color: #1ab394; } .text-primary { color: inherit; } .text-success { color: #1c84c6; } .text-info { color: #23c6c8; } .text-warning { color: #f8ac59; } .text-danger { color: #ed5565; } .text-muted { color: #888888; } /* image */ .img-circle { border-radius: 50%; } .img-lg { width: 120px; height: 120px; } .avatar-upload-preview { position: relative; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 200px; height: 200px; border-radius: 50%; box-shadow: 0 0 4px #ccc; overflow: hidden; } /* 拖拽列样式 */ .sortable-ghost { opacity: .8; color: #fff !important; background: #42b983 !important; } .top-right-btn { position: relative; float: right; } /* 分割面板样式 */ .splitpanes.default-theme .splitpanes__pane { background-color: #fff!important; }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/assets/styles/ruoyi.scss
SCSS
mit
4,141
#app { .main-container { height: 100%; transition: margin-left .28s; margin-left: $base-sidebar-width; position: relative; } .sidebarHide { margin-left: 0!important; } .sidebar-container { -webkit-transition: width .28s; transition: width 0.28s; width: $base-sidebar-width !important; background-color: $base-menu-background; height: 100%; position: fixed; font-size: 0px; top: 0; bottom: 0; left: 0; z-index: 1001; overflow: hidden; -webkit-box-shadow: 2px 0 6px rgba(0,21,41,.35); box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1); // reset element-ui css .horizontal-collapse-transition { transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out; } .scrollbar-wrapper { overflow-x: hidden !important; } .el-scrollbar__bar.is-vertical { right: 0px; } .el-scrollbar { height: 100%; } &.has-logo { .el-scrollbar { height: calc(100% - 50px); } } .is-horizontal { display: none; } a { display: inline-block; width: 100%; overflow: hidden; } .svg-icon { margin-right: 16px; } .el-menu { border: none; height: 100%; width: 100% !important; } .el-menu-item, .el-submenu__title { overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; } // menu hover .submenu-title-noDropdown, .el-submenu__title { &:hover { background-color: rgba(0, 0, 0, 0.06) !important; } } & .theme-dark .is-active > .el-submenu__title { color: $base-menu-color-active !important; } & .nest-menu .el-submenu>.el-submenu__title, & .el-submenu .el-menu-item { min-width: $base-sidebar-width !important; &:hover { background-color: rgba(0, 0, 0, 0.06) !important; } } & .theme-dark .nest-menu .el-submenu>.el-submenu__title, & .theme-dark .el-submenu .el-menu-item { background-color: $base-sub-menu-background !important; &:hover { background-color: $base-sub-menu-hover !important; } } } .hideSidebar { .sidebar-container { width: 54px !important; } .main-container { margin-left: 54px; } .submenu-title-noDropdown { padding: 0 !important; position: relative; .el-tooltip { padding: 0 !important; .svg-icon { margin-left: 20px; } } } .el-submenu { overflow: hidden; &>.el-submenu__title { padding: 0 !important; .svg-icon { margin-left: 20px; } } } .el-menu--collapse { .el-submenu { &>.el-submenu__title { &>span { height: 0; width: 0; overflow: hidden; visibility: hidden; display: inline-block; } } } } } .el-menu--collapse .el-menu .el-submenu { min-width: $base-sidebar-width !important; } // mobile responsive .mobile { .main-container { margin-left: 0px; } .sidebar-container { transition: transform .28s; width: $base-sidebar-width !important; } &.hideSidebar { .sidebar-container { pointer-events: none; transition-duration: 0.3s; transform: translate3d(-$base-sidebar-width, 0, 0); } } } .withoutAnimation { .main-container, .sidebar-container { transition: none; } } } // when menu collapsed .el-menu--vertical { &>.el-menu { .svg-icon { margin-right: 16px; } } .nest-menu .el-submenu>.el-submenu__title, .el-menu-item { &:hover { // you can use $subMenuHover background-color: rgba(0, 0, 0, 0.06) !important; } } // the scroll bar appears when the subMenu is too long >.el-menu--popup { max-height: 100vh; overflow-y: auto; &::-webkit-scrollbar-track-piece { background: #d3dce6; } &::-webkit-scrollbar { width: 6px; } &::-webkit-scrollbar-thumb { background: #99a9bf; border-radius: 20px; } } }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/assets/styles/sidebar.scss
SCSS
mit
4,291
// global transition css /* fade */ .fade-enter-active, .fade-leave-active { transition: opacity 0.28s; } .fade-enter, .fade-leave-active { opacity: 0; } /* fade-transform */ .fade-transform--move, .fade-transform-leave-active, .fade-transform-enter-active { transition: all .5s; } .fade-transform-enter { opacity: 0; transform: translateX(-30px); } .fade-transform-leave-to { opacity: 0; transform: translateX(30px); } /* breadcrumb transition */ .breadcrumb-enter-active, .breadcrumb-leave-active { transition: all .5s; } .breadcrumb-enter, .breadcrumb-leave-active { opacity: 0; transform: translateX(20px); } .breadcrumb-move { transition: all .5s; } .breadcrumb-leave-active { position: absolute; }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/assets/styles/transition.scss
SCSS
mit
737
// base color $blue:#324157; $light-blue:#3A71A8; $red:#C03639; $pink: #E65D6E; $green: #30B08F; $tiffany: #4AB7BD; $yellow:#FEC171; $panGreen: #30B08F; // 默认菜单主题风格 $base-menu-color:#bfcbd9; $base-menu-color-active:#f4f4f5; $base-menu-background:#304156; $base-logo-title-color: #ffffff; $base-menu-light-color:rgba(0,0,0,.70); $base-menu-light-background:#ffffff; $base-logo-light-title-color: #001529; $base-sub-menu-background:#1f2d3d; $base-sub-menu-hover:#001528; // 自定义暗色菜单风格 /** $base-menu-color:hsla(0,0%,100%,.65); $base-menu-color-active:#fff; $base-menu-background:#001529; $base-logo-title-color: #ffffff; $base-menu-light-color:rgba(0,0,0,.70); $base-menu-light-background:#ffffff; $base-logo-light-title-color: #001529; $base-sub-menu-background:#000c17; $base-sub-menu-hover:#001528; */ $base-sidebar-width: 200px; // the :export directive is the magic sauce for webpack // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass :export { menuColor: $base-menu-color; menuLightColor: $base-menu-light-color; menuColorActive: $base-menu-color-active; menuBackground: $base-menu-background; menuLightBackground: $base-menu-light-background; subMenuBackground: $base-sub-menu-background; subMenuHover: $base-sub-menu-hover; sideBarWidth: $base-sidebar-width; logoTitleColor: $base-logo-title-color; logoLightTitleColor: $base-logo-light-title-color }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/assets/styles/variables.scss
SCSS
mit
1,446
<template> <el-breadcrumb class="app-breadcrumb" separator="/"> <transition-group name="breadcrumb"> <el-breadcrumb-item v-for="(item, index) in levelList" :key="item.path"> <span v-if="item.redirect === 'noRedirect' || index == levelList.length - 1" class="no-redirect">{{ item.meta.title }}</span> <a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a> </el-breadcrumb-item> </transition-group> </el-breadcrumb> </template> <script> export default { data() { return { levelList: null } }, watch: { $route(route) { // if you go to the redirect page, do not update the breadcrumbs if (route.path.startsWith('/redirect/')) { return } this.getBreadcrumb() } }, created() { this.getBreadcrumb() }, methods: { getBreadcrumb() { // only show routes with meta.title let matched = [] const router = this.$route const pathNum = this.findPathNum(router.path) // multi-level menu if (pathNum > 2) { const reg = /\/\w+/gi const pathList = router.path.match(reg).map((item, index) => { if (index !== 0) item = item.slice(1) return item }) this.getMatched(pathList, this.$store.getters.defaultRoutes, matched) } else { matched = router.matched.filter(item => item.meta && item.meta.title) } // 判断是否为首页 if (!this.isDashboard(matched[0])) { matched = [{ path: "/index", meta: { title: "首页" } }].concat(matched) } this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false) }, findPathNum(str, char = "/") { let index = str.indexOf(char) let num = 0 while (index !== -1) { num++ index = str.indexOf(char, index + 1) } return num }, getMatched(pathList, routeList, matched) { let data = routeList.find(item => item.path == pathList[0] || (item.name += '').toLowerCase() == pathList[0]) if (data) { matched.push(data) if (data.children && pathList.length) { pathList.shift() this.getMatched(pathList, data.children, matched) } } }, isDashboard(route) { const name = route && route.name if (!name) { return false } return name.trim() === 'Index' }, handleLink(item) { const { redirect, path } = item if (redirect) { this.$router.push(redirect) return } this.$router.push(path) } } } </script> <style lang="scss" scoped> .app-breadcrumb.el-breadcrumb { display: inline-block; font-size: 14px; line-height: 50px; margin-left: 8px; .no-redirect { color: #97a8be; cursor: text; } } </style>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/Breadcrumb/index.vue
Vue
mit
2,841
<template> <el-form size="small"> <el-form-item> <el-radio v-model='radioValue' :label="1"> 日,允许的通配符[, - * ? / L W] </el-radio> </el-form-item> <el-form-item> <el-radio v-model='radioValue' :label="2"> 不指定 </el-radio> </el-form-item> <el-form-item> <el-radio v-model='radioValue' :label="3"> 周期从 <el-input-number v-model='cycle01' :min="1" :max="30" /> - <el-input-number v-model='cycle02' :min="cycle01 ? cycle01 + 1 : 2" :max="31" /> 日 </el-radio> </el-form-item> <el-form-item> <el-radio v-model='radioValue' :label="4"> 从 <el-input-number v-model='average01' :min="1" :max="30" /> 号开始,每 <el-input-number v-model='average02' :min="1" :max="31 - average01 || 1" /> 日执行一次 </el-radio> </el-form-item> <el-form-item> <el-radio v-model='radioValue' :label="5"> 每月 <el-input-number v-model='workday' :min="1" :max="31" /> 号最近的那个工作日 </el-radio> </el-form-item> <el-form-item> <el-radio v-model='radioValue' :label="6"> 本月最后一天 </el-radio> </el-form-item> <el-form-item> <el-radio v-model='radioValue' :label="7"> 指定 <el-select clearable v-model="checkboxList" placeholder="可多选" multiple style="width:100%"> <el-option v-for="item in 31" :key="item" :value="item">{{item}}</el-option> </el-select> </el-radio> </el-form-item> </el-form> </template> <script> export default { data() { return { radioValue: 1, workday: 1, cycle01: 1, cycle02: 2, average01: 1, average02: 1, checkboxList: [], checkNum: this.$options.propsData.check } }, name: 'crontab-day', props: ['check', 'cron'], methods: { // 单选按钮值变化时 radioChange() { ('day rachange') if (this.radioValue !== 2 && this.cron.week !== '?') { this.$emit('update', 'week', '?', 'day') } switch (this.radioValue) { case 1: this.$emit('update', 'day', '*') break case 2: this.$emit('update', 'day', '?') break case 3: this.$emit('update', 'day', this.cycleTotal) break case 4: this.$emit('update', 'day', this.averageTotal) break case 5: this.$emit('update', 'day', this.workday + 'W') break case 6: this.$emit('update', 'day', 'L') break case 7: this.$emit('update', 'day', this.checkboxString) break } ('day rachange end') }, // 周期两个值变化时 cycleChange() { if (this.radioValue == '3') { this.$emit('update', 'day', this.cycleTotal) } }, // 平均两个值变化时 averageChange() { if (this.radioValue == '4') { this.$emit('update', 'day', this.averageTotal) } }, // 最近工作日值变化时 workdayChange() { if (this.radioValue == '5') { this.$emit('update', 'day', this.workdayCheck + 'W') } }, // checkbox值变化时 checkboxChange() { if (this.radioValue == '7') { this.$emit('update', 'day', this.checkboxString) } } }, watch: { 'radioValue': 'radioChange', 'cycleTotal': 'cycleChange', 'averageTotal': 'averageChange', 'workdayCheck': 'workdayChange', 'checkboxString': 'checkboxChange', }, computed: { // 计算两个周期值 cycleTotal: function () { const cycle01 = this.checkNum(this.cycle01, 1, 30) const cycle02 = this.checkNum(this.cycle02, cycle01 ? cycle01 + 1 : 2, 31, 31) return cycle01 + '-' + cycle02 }, // 计算平均用到的值 averageTotal: function () { const average01 = this.checkNum(this.average01, 1, 30) const average02 = this.checkNum(this.average02, 1, 31 - average01 || 0) return average01 + '/' + average02 }, // 计算工作日格式 workdayCheck: function () { const workday = this.checkNum(this.workday, 1, 31) return workday }, // 计算勾选的checkbox值合集 checkboxString: function () { let str = this.checkboxList.join() return str == '' ? '*' : str } } } </script>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/Crontab/day.vue
Vue
mit
4,020
<template> <el-form size="small"> <el-form-item> <el-radio v-model='radioValue' :label="1"> 小时,允许的通配符[, - * /] </el-radio> </el-form-item> <el-form-item> <el-radio v-model='radioValue' :label="2"> 周期从 <el-input-number v-model='cycle01' :min="0" :max="22" /> - <el-input-number v-model='cycle02' :min="cycle01 ? cycle01 + 1 : 1" :max="23" /> 小时 </el-radio> </el-form-item> <el-form-item> <el-radio v-model='radioValue' :label="3"> 从 <el-input-number v-model='average01' :min="0" :max="22" /> 小时开始,每 <el-input-number v-model='average02' :min="1" :max="23 - average01 || 0" /> 小时执行一次 </el-radio> </el-form-item> <el-form-item> <el-radio v-model='radioValue' :label="4"> 指定 <el-select clearable v-model="checkboxList" placeholder="可多选" multiple style="width:100%"> <el-option v-for="item in 24" :key="item" :value="item-1">{{item-1}}</el-option> </el-select> </el-radio> </el-form-item> </el-form> </template> <script> export default { data() { return { radioValue: 1, cycle01: 0, cycle02: 1, average01: 0, average02: 1, checkboxList: [], checkNum: this.$options.propsData.check } }, name: 'crontab-hour', props: ['check', 'cron'], methods: { // 单选按钮值变化时 radioChange() { if (this.cron.min === '*') { this.$emit('update', 'min', '0', 'hour') } if (this.cron.second === '*') { this.$emit('update', 'second', '0', 'hour') } switch (this.radioValue) { case 1: this.$emit('update', 'hour', '*') break case 2: this.$emit('update', 'hour', this.cycleTotal) break case 3: this.$emit('update', 'hour', this.averageTotal) break case 4: this.$emit('update', 'hour', this.checkboxString) break } }, // 周期两个值变化时 cycleChange() { if (this.radioValue == '2') { this.$emit('update', 'hour', this.cycleTotal) } }, // 平均两个值变化时 averageChange() { if (this.radioValue == '3') { this.$emit('update', 'hour', this.averageTotal) } }, // checkbox值变化时 checkboxChange() { if (this.radioValue == '4') { this.$emit('update', 'hour', this.checkboxString) } } }, watch: { 'radioValue': 'radioChange', 'cycleTotal': 'cycleChange', 'averageTotal': 'averageChange', 'checkboxString': 'checkboxChange' }, computed: { // 计算两个周期值 cycleTotal: function () { const cycle01 = this.checkNum(this.cycle01, 0, 22) const cycle02 = this.checkNum(this.cycle02, cycle01 ? cycle01 + 1 : 1, 23) return cycle01 + '-' + cycle02 }, // 计算平均用到的值 averageTotal: function () { const average01 = this.checkNum(this.average01, 0, 22) const average02 = this.checkNum(this.average02, 1, 23 - average01 || 0) return average01 + '/' + average02 }, // 计算勾选的checkbox值合集 checkboxString: function () { let str = this.checkboxList.join() return str == '' ? '*' : str } } } </script>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/Crontab/hour.vue
Vue
mit
3,093
<template> <div> <el-tabs type="border-card"> <el-tab-pane label="秒" v-if="shouldHide('second')"> <CrontabSecond @update="updateCrontabValue" :check="checkNumber" :cron="crontabValueObj" ref="cronsecond" /> </el-tab-pane> <el-tab-pane label="分钟" v-if="shouldHide('min')"> <CrontabMin @update="updateCrontabValue" :check="checkNumber" :cron="crontabValueObj" ref="cronmin" /> </el-tab-pane> <el-tab-pane label="小时" v-if="shouldHide('hour')"> <CrontabHour @update="updateCrontabValue" :check="checkNumber" :cron="crontabValueObj" ref="cronhour" /> </el-tab-pane> <el-tab-pane label="日" v-if="shouldHide('day')"> <CrontabDay @update="updateCrontabValue" :check="checkNumber" :cron="crontabValueObj" ref="cronday" /> </el-tab-pane> <el-tab-pane label="月" v-if="shouldHide('month')"> <CrontabMonth @update="updateCrontabValue" :check="checkNumber" :cron="crontabValueObj" ref="cronmonth" /> </el-tab-pane> <el-tab-pane label="周" v-if="shouldHide('week')"> <CrontabWeek @update="updateCrontabValue" :check="checkNumber" :cron="crontabValueObj" ref="cronweek" /> </el-tab-pane> <el-tab-pane label="年" v-if="shouldHide('year')"> <CrontabYear @update="updateCrontabValue" :check="checkNumber" :cron="crontabValueObj" ref="cronyear" /> </el-tab-pane> </el-tabs> <div class="popup-main"> <div class="popup-result"> <p class="title">时间表达式</p> <table> <thead> <th v-for="item of tabTitles" width="40" :key="item">{{item}}</th> <th>Cron 表达式</th> </thead> <tbody> <td> <span>{{crontabValueObj.second}}</span> </td> <td> <span>{{crontabValueObj.min}}</span> </td> <td> <span>{{crontabValueObj.hour}}</span> </td> <td> <span>{{crontabValueObj.day}}</span> </td> <td> <span>{{crontabValueObj.month}}</span> </td> <td> <span>{{crontabValueObj.week}}</span> </td> <td> <span>{{crontabValueObj.year}}</span> </td> <td> <span>{{crontabValueString}}</span> </td> </tbody> </table> </div> <CrontabResult :ex="crontabValueString"></CrontabResult> <div class="pop_btn"> <el-button size="small" type="primary" @click="submitFill">确定</el-button> <el-button size="small" type="warning" @click="clearCron">重置</el-button> <el-button size="small" @click="hidePopup">取消</el-button> </div> </div> </div> </template> <script> import CrontabSecond from "./second.vue" import CrontabMin from "./min.vue" import CrontabHour from "./hour.vue" import CrontabDay from "./day.vue" import CrontabMonth from "./month.vue" import CrontabWeek from "./week.vue" import CrontabYear from "./year.vue" import CrontabResult from "./result.vue" export default { data() { return { tabTitles: ["秒", "分钟", "小时", "日", "月", "周", "年"], tabActive: 0, myindex: 0, crontabValueObj: { second: "*", min: "*", hour: "*", day: "*", month: "*", week: "?", year: "", }, } }, name: "vcrontab", props: ["expression", "hideComponent"], methods: { shouldHide(key) { if (this.hideComponent && this.hideComponent.includes(key)) return false return true }, resolveExp() { // 反解析 表达式 if (this.expression) { let arr = this.expression.split(" ") if (arr.length >= 6) { //6 位以上是合法表达式 let obj = { second: arr[0], min: arr[1], hour: arr[2], day: arr[3], month: arr[4], week: arr[5], year: arr[6] ? arr[6] : "", } this.crontabValueObj = { ...obj, } for (let i in obj) { if (obj[i]) this.changeRadio(i, obj[i]) } } } else { // 没有传入的表达式 则还原 this.clearCron() } }, // tab切换值 tabCheck(index) { this.tabActive = index }, // 由子组件触发,更改表达式组成的字段值 updateCrontabValue(name, value, from) { "updateCrontabValue", name, value, from this.crontabValueObj[name] = value if (from && from !== name) { console.log(`来自组件 ${from} 改变了 ${name} ${value}`) this.changeRadio(name, value) } }, // 赋值到组件 changeRadio(name, value) { let arr = ["second", "min", "hour", "month"], refName = "cron" + name, insValue if (!this.$refs[refName]) return if (arr.includes(name)) { if (value === "*") { insValue = 1 } else if (value.indexOf("-") > -1) { let indexArr = value.split("-") isNaN(indexArr[0]) ? (this.$refs[refName].cycle01 = 0) : (this.$refs[refName].cycle01 = indexArr[0]) this.$refs[refName].cycle02 = indexArr[1] insValue = 2 } else if (value.indexOf("/") > -1) { let indexArr = value.split("/") isNaN(indexArr[0]) ? (this.$refs[refName].average01 = 0) : (this.$refs[refName].average01 = indexArr[0]) this.$refs[refName].average02 = indexArr[1] insValue = 3 } else { insValue = 4 this.$refs[refName].checkboxList = value.split(",") } } else if (name == "day") { if (value === "*") { insValue = 1 } else if (value == "?") { insValue = 2 } else if (value.indexOf("-") > -1) { let indexArr = value.split("-") isNaN(indexArr[0]) ? (this.$refs[refName].cycle01 = 0) : (this.$refs[refName].cycle01 = indexArr[0]) this.$refs[refName].cycle02 = indexArr[1] insValue = 3 } else if (value.indexOf("/") > -1) { let indexArr = value.split("/") isNaN(indexArr[0]) ? (this.$refs[refName].average01 = 0) : (this.$refs[refName].average01 = indexArr[0]) this.$refs[refName].average02 = indexArr[1] insValue = 4 } else if (value.indexOf("W") > -1) { let indexArr = value.split("W") isNaN(indexArr[0]) ? (this.$refs[refName].workday = 0) : (this.$refs[refName].workday = indexArr[0]) insValue = 5 } else if (value === "L") { insValue = 6 } else { this.$refs[refName].checkboxList = value.split(",") insValue = 7 } } else if (name == "week") { if (value === "*") { insValue = 1 } else if (value == "?") { insValue = 2 } else if (value.indexOf("-") > -1) { let indexArr = value.split("-") isNaN(indexArr[0]) ? (this.$refs[refName].cycle01 = 0) : (this.$refs[refName].cycle01 = indexArr[0]) this.$refs[refName].cycle02 = indexArr[1] insValue = 3 } else if (value.indexOf("#") > -1) { let indexArr = value.split("#") isNaN(indexArr[0]) ? (this.$refs[refName].average01 = 1) : (this.$refs[refName].average01 = indexArr[0]) this.$refs[refName].average02 = indexArr[1] insValue = 4 } else if (value.indexOf("L") > -1) { let indexArr = value.split("L") isNaN(indexArr[0]) ? (this.$refs[refName].weekday = 1) : (this.$refs[refName].weekday = indexArr[0]) insValue = 5 } else { this.$refs[refName].checkboxList = value.split(",") insValue = 6 } } else if (name == "year") { if (value == "") { insValue = 1 } else if (value == "*") { insValue = 2 } else if (value.indexOf("-") > -1) { insValue = 3 } else if (value.indexOf("/") > -1) { insValue = 4 } else { this.$refs[refName].checkboxList = value.split(",") insValue = 5 } } this.$refs[refName].radioValue = insValue }, // 表单选项的子组件校验数字格式(通过-props传递) checkNumber(value, minLimit, maxLimit) { // 检查必须为整数 value = Math.floor(value) if (value < minLimit) { value = minLimit } else if (value > maxLimit) { value = maxLimit } return value }, // 隐藏弹窗 hidePopup() { this.$emit("hide") }, // 填充表达式 submitFill() { this.$emit("fill", this.crontabValueString) this.hidePopup() }, clearCron() { // 还原选择项 ("准备还原") this.crontabValueObj = { second: "*", min: "*", hour: "*", day: "*", month: "*", week: "?", year: "", } for (let j in this.crontabValueObj) { this.changeRadio(j, this.crontabValueObj[j]) } }, }, computed: { crontabValueString: function() { let obj = this.crontabValueObj let str = obj.second + " " + obj.min + " " + obj.hour + " " + obj.day + " " + obj.month + " " + obj.week + (obj.year == "" ? "" : " " + obj.year) return str }, }, components: { CrontabSecond, CrontabMin, CrontabHour, CrontabDay, CrontabMonth, CrontabWeek, CrontabYear, CrontabResult, }, watch: { expression: "resolveExp", hideComponent(value) { // 隐藏部分组件 }, }, mounted: function() { this.resolveExp() }, } </script> <style scoped> .pop_btn { text-align: center; margin-top: 20px; } .popup-main { position: relative; margin: 10px auto; background: #fff; border-radius: 5px; font-size: 12px; overflow: hidden; } .popup-title { overflow: hidden; line-height: 34px; padding-top: 6px; background: #f2f2f2; } .popup-result { box-sizing: border-box; line-height: 24px; margin: 25px auto; padding: 15px 10px 10px; border: 1px solid #ccc; position: relative; } .popup-result .title { position: absolute; top: -28px; left: 50%; width: 140px; font-size: 14px; margin-left: -70px; text-align: center; line-height: 30px; background: #fff; } .popup-result table { text-align: center; width: 100%; margin: 0 auto; } .popup-result table span { display: block; width: 100%; font-family: arial; line-height: 30px; height: 30px; white-space: nowrap; overflow: hidden; border: 1px solid #e8e8e8; } .popup-result-scroll { font-size: 12px; line-height: 24px; height: 10em; overflow-y: auto; } </style>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/Crontab/index.vue
Vue
mit
11,495
<template> <el-form size="small"> <el-form-item> <el-radio v-model='radioValue' :label="1"> 分钟,允许的通配符[, - * /] </el-radio> </el-form-item> <el-form-item> <el-radio v-model='radioValue' :label="2"> 周期从 <el-input-number v-model='cycle01' :min="0" :max="58" /> - <el-input-number v-model='cycle02' :min="cycle01 ? cycle01 + 1 : 1" :max="59" /> 分钟 </el-radio> </el-form-item> <el-form-item> <el-radio v-model='radioValue' :label="3"> 从 <el-input-number v-model='average01' :min="0" :max="58" /> 分钟开始,每 <el-input-number v-model='average02' :min="1" :max="59 - average01 || 0" /> 分钟执行一次 </el-radio> </el-form-item> <el-form-item> <el-radio v-model='radioValue' :label="4"> 指定 <el-select clearable v-model="checkboxList" placeholder="可多选" multiple style="width:100%"> <el-option v-for="item in 60" :key="item" :value="item-1">{{item-1}}</el-option> </el-select> </el-radio> </el-form-item> </el-form> </template> <script> export default { data() { return { radioValue: 1, cycle01: 1, cycle02: 2, average01: 0, average02: 1, checkboxList: [], checkNum: this.$options.propsData.check } }, name: 'crontab-min', props: ['check', 'cron'], methods: { // 单选按钮值变化时 radioChange() { switch (this.radioValue) { case 1: this.$emit('update', 'min', '*', 'min') break case 2: this.$emit('update', 'min', this.cycleTotal, 'min') break case 3: this.$emit('update', 'min', this.averageTotal, 'min') break case 4: this.$emit('update', 'min', this.checkboxString, 'min') break } }, // 周期两个值变化时 cycleChange() { if (this.radioValue == '2') { this.$emit('update', 'min', this.cycleTotal, 'min') } }, // 平均两个值变化时 averageChange() { if (this.radioValue == '3') { this.$emit('update', 'min', this.averageTotal, 'min') } }, // checkbox值变化时 checkboxChange() { if (this.radioValue == '4') { this.$emit('update', 'min', this.checkboxString, 'min') } }, }, watch: { 'radioValue': 'radioChange', 'cycleTotal': 'cycleChange', 'averageTotal': 'averageChange', 'checkboxString': 'checkboxChange', }, computed: { // 计算两个周期值 cycleTotal: function () { const cycle01 = this.checkNum(this.cycle01, 0, 58) const cycle02 = this.checkNum(this.cycle02, cycle01 ? cycle01 + 1 : 1, 59) return cycle01 + '-' + cycle02 }, // 计算平均用到的值 averageTotal: function () { const average01 = this.checkNum(this.average01, 0, 58) const average02 = this.checkNum(this.average02, 1, 59 - average01 || 0) return average01 + '/' + average02 }, // 计算勾选的checkbox值合集 checkboxString: function () { let str = this.checkboxList.join() return str == '' ? '*' : str } } } </script>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/Crontab/min.vue
Vue
mit
2,961
<template> <el-form size='small'> <el-form-item> <el-radio v-model='radioValue' :label="1"> 月,允许的通配符[, - * /] </el-radio> </el-form-item> <el-form-item> <el-radio v-model='radioValue' :label="2"> 周期从 <el-input-number v-model='cycle01' :min="1" :max="11" /> - <el-input-number v-model='cycle02' :min="cycle01 ? cycle01 + 1 : 2" :max="12" /> 月 </el-radio> </el-form-item> <el-form-item> <el-radio v-model='radioValue' :label="3"> 从 <el-input-number v-model='average01' :min="1" :max="11" /> 月开始,每 <el-input-number v-model='average02' :min="1" :max="12 - average01 || 0" /> 月月执行一次 </el-radio> </el-form-item> <el-form-item> <el-radio v-model='radioValue' :label="4"> 指定 <el-select clearable v-model="checkboxList" placeholder="可多选" multiple style="width:100%"> <el-option v-for="item in 12" :key="item" :value="item">{{item}}</el-option> </el-select> </el-radio> </el-form-item> </el-form> </template> <script> export default { data() { return { radioValue: 1, cycle01: 1, cycle02: 2, average01: 1, average02: 1, checkboxList: [], checkNum: this.check } }, name: 'crontab-month', props: ['check', 'cron'], methods: { // 单选按钮值变化时 radioChange() { switch (this.radioValue) { case 1: this.$emit('update', 'month', '*') break case 2: this.$emit('update', 'month', this.cycleTotal) break case 3: this.$emit('update', 'month', this.averageTotal) break case 4: this.$emit('update', 'month', this.checkboxString) break } }, // 周期两个值变化时 cycleChange() { if (this.radioValue == '2') { this.$emit('update', 'month', this.cycleTotal) } }, // 平均两个值变化时 averageChange() { if (this.radioValue == '3') { this.$emit('update', 'month', this.averageTotal) } }, // checkbox值变化时 checkboxChange() { if (this.radioValue == '4') { this.$emit('update', 'month', this.checkboxString) } } }, watch: { 'radioValue': 'radioChange', 'cycleTotal': 'cycleChange', 'averageTotal': 'averageChange', 'checkboxString': 'checkboxChange' }, computed: { // 计算两个周期值 cycleTotal: function () { const cycle01 = this.checkNum(this.cycle01, 1, 11) const cycle02 = this.checkNum(this.cycle02, cycle01 ? cycle01 + 1 : 2, 12) return cycle01 + '-' + cycle02 }, // 计算平均用到的值 averageTotal: function () { const average01 = this.checkNum(this.average01, 1, 11) const average02 = this.checkNum(this.average02, 1, 12 - average01 || 0) return average01 + '/' + average02 }, // 计算勾选的checkbox值合集 checkboxString: function () { let str = this.checkboxList.join() return str == '' ? '*' : str } } } </script>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/Crontab/month.vue
Vue
mit
2,893
<template> <div class="popup-result"> <p class="title">最近5次运行时间</p> <ul class="popup-result-scroll"> <template v-if='isShow'> <li v-for='item in resultList' :key="item">{{item}}</li> </template> <li v-else>计算结果中...</li> </ul> </div> </template> <script> export default { data() { return { dayRule: '', dayRuleSup: '', dateArr: [], resultList: [], isShow: false } }, name: 'crontab-result', methods: { // 表达式值变化时,开始去计算结果 expressionChange() { // 计算开始-隐藏结果 this.isShow = false // 获取规则数组[0秒、1分、2时、3日、4月、5星期、6年] let ruleArr = this.$options.propsData.ex.split(' ') // 用于记录进入循环的次数 let nums = 0 // 用于暂时存符号时间规则结果的数组 let resultArr = [] // 获取当前时间精确至[年、月、日、时、分、秒] let nTime = new Date() let nYear = nTime.getFullYear() let nMonth = nTime.getMonth() + 1 let nDay = nTime.getDate() let nHour = nTime.getHours() let nMin = nTime.getMinutes() let nSecond = nTime.getSeconds() // 根据规则获取到近100年可能年数组、月数组等等 this.getSecondArr(ruleArr[0]) this.getMinArr(ruleArr[1]) this.getHourArr(ruleArr[2]) this.getDayArr(ruleArr[3]) this.getMonthArr(ruleArr[4]) this.getWeekArr(ruleArr[5]) this.getYearArr(ruleArr[6], nYear) // 将获取到的数组赋值-方便使用 let sDate = this.dateArr[0] let mDate = this.dateArr[1] let hDate = this.dateArr[2] let DDate = this.dateArr[3] let MDate = this.dateArr[4] let YDate = this.dateArr[5] // 获取当前时间在数组中的索引 let sIdx = this.getIndex(sDate, nSecond) let mIdx = this.getIndex(mDate, nMin) let hIdx = this.getIndex(hDate, nHour) let DIdx = this.getIndex(DDate, nDay) let MIdx = this.getIndex(MDate, nMonth) let YIdx = this.getIndex(YDate, nYear) // 重置月日时分秒的函数(后面用的比较多) const resetSecond = function () { sIdx = 0 nSecond = sDate[sIdx] } const resetMin = function () { mIdx = 0 nMin = mDate[mIdx] resetSecond() } const resetHour = function () { hIdx = 0 nHour = hDate[hIdx] resetMin() } const resetDay = function () { DIdx = 0 nDay = DDate[DIdx] resetHour() } const resetMonth = function () { MIdx = 0 nMonth = MDate[MIdx] resetDay() } // 如果当前年份不为数组中当前值 if (nYear !== YDate[YIdx]) { resetMonth() } // 如果当前月份不为数组中当前值 if (nMonth !== MDate[MIdx]) { resetDay() } // 如果当前“日”不为数组中当前值 if (nDay !== DDate[DIdx]) { resetHour() } // 如果当前“时”不为数组中当前值 if (nHour !== hDate[hIdx]) { resetMin() } // 如果当前“分”不为数组中当前值 if (nMin !== mDate[mIdx]) { resetSecond() } // 循环年份数组 goYear: for (let Yi = YIdx; Yi < YDate.length; Yi++) { let YY = YDate[Yi] // 如果到达最大值时 if (nMonth > MDate[MDate.length - 1]) { resetMonth() continue } // 循环月份数组 goMonth: for (let Mi = MIdx; Mi < MDate.length; Mi++) { // 赋值、方便后面运算 let MM = MDate[Mi]; MM = MM < 10 ? '0' + MM : MM // 如果到达最大值时 if (nDay > DDate[DDate.length - 1]) { resetDay() if (Mi == MDate.length - 1) { resetMonth() continue goYear } continue } // 循环日期数组 goDay: for (let Di = DIdx; Di < DDate.length; Di++) { // 赋值、方便后面运算 let DD = DDate[Di] let thisDD = DD < 10 ? '0' + DD : DD // 如果到达最大值时 if (nHour > hDate[hDate.length - 1]) { resetHour() if (Di == DDate.length - 1) { resetDay() if (Mi == MDate.length - 1) { resetMonth() continue goYear } continue goMonth } continue } // 判断日期的合法性,不合法的话也是跳出当前循环 if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true && this.dayRule !== 'workDay' && this.dayRule !== 'lastWeek' && this.dayRule !== 'lastDay') { resetDay() continue goMonth } // 如果日期规则中有值时 if (this.dayRule == 'lastDay') { // 如果不是合法日期则需要将前将日期调到合法日期即月末最后一天 if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) { while (DD > 0 && this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) { DD-- thisDD = DD < 10 ? '0' + DD : DD } } } else if (this.dayRule == 'workDay') { // 校验并调整如果是2月30号这种日期传进来时需调整至正常月底 if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) { while (DD > 0 && this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) { DD-- thisDD = DD < 10 ? '0' + DD : DD } } // 获取达到条件的日期是星期X let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + thisDD + ' 00:00:00'), 'week') // 当星期日时 if (thisWeek == 1) { // 先找下一个日,并判断是否为月底 DD++ thisDD = DD < 10 ? '0' + DD : DD // 判断下一日已经不是合法日期 if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) { DD -= 3 } } else if (thisWeek == 7) { // 当星期6时只需判断不是1号就可进行操作 if (this.dayRuleSup !== 1) { DD-- } else { DD += 2 } } } else if (this.dayRule == 'weekDay') { // 如果指定了是星期几 // 获取当前日期是属于星期几 let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + DD + ' 00:00:00'), 'week') // 校验当前星期是否在星期池(dayRuleSup)中 if (this.dayRuleSup.indexOf(thisWeek) < 0) { // 如果到达最大值时 if (Di == DDate.length - 1) { resetDay() if (Mi == MDate.length - 1) { resetMonth() continue goYear } continue goMonth } continue } } else if (this.dayRule == 'assWeek') { // 如果指定了是第几周的星期几 // 获取每月1号是属于星期几 let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + DD + ' 00:00:00'), 'week') if (this.dayRuleSup[1] >= thisWeek) { DD = (this.dayRuleSup[0] - 1) * 7 + this.dayRuleSup[1] - thisWeek + 1 } else { DD = this.dayRuleSup[0] * 7 + this.dayRuleSup[1] - thisWeek + 1 } } else if (this.dayRule == 'lastWeek') { // 如果指定了每月最后一个星期几 // 校验并调整如果是2月30号这种日期传进来时需调整至正常月底 if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) { while (DD > 0 && this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) { DD-- thisDD = DD < 10 ? '0' + DD : DD } } // 获取月末最后一天是星期几 let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + thisDD + ' 00:00:00'), 'week') // 找到要求中最近的那个星期几 if (this.dayRuleSup < thisWeek) { DD -= thisWeek - this.dayRuleSup } else if (this.dayRuleSup > thisWeek) { DD -= 7 - (this.dayRuleSup - thisWeek) } } // 判断时间值是否小于10置换成“05”这种格式 DD = DD < 10 ? '0' + DD : DD // 循环“时”数组 goHour: for (let hi = hIdx; hi < hDate.length; hi++) { let hh = hDate[hi] < 10 ? '0' + hDate[hi] : hDate[hi] // 如果到达最大值时 if (nMin > mDate[mDate.length - 1]) { resetMin() if (hi == hDate.length - 1) { resetHour() if (Di == DDate.length - 1) { resetDay() if (Mi == MDate.length - 1) { resetMonth() continue goYear } continue goMonth } continue goDay } continue } // 循环"分"数组 goMin: for (let mi = mIdx; mi < mDate.length; mi++) { let mm = mDate[mi] < 10 ? '0' + mDate[mi] : mDate[mi] // 如果到达最大值时 if (nSecond > sDate[sDate.length - 1]) { resetSecond() if (mi == mDate.length - 1) { resetMin() if (hi == hDate.length - 1) { resetHour() if (Di == DDate.length - 1) { resetDay() if (Mi == MDate.length - 1) { resetMonth() continue goYear } continue goMonth } continue goDay } continue goHour } continue } // 循环"秒"数组 goSecond: for (let si = sIdx; si <= sDate.length - 1; si++) { let ss = sDate[si] < 10 ? '0' + sDate[si] : sDate[si] // 添加当前时间(时间合法性在日期循环时已经判断) if (MM !== '00' && DD !== '00') { resultArr.push(YY + '-' + MM + '-' + DD + ' ' + hh + ':' + mm + ':' + ss) nums++ } // 如果条数满了就退出循环 if (nums == 5) break goYear // 如果到达最大值时 if (si == sDate.length - 1) { resetSecond() if (mi == mDate.length - 1) { resetMin() if (hi == hDate.length - 1) { resetHour() if (Di == DDate.length - 1) { resetDay() if (Mi == MDate.length - 1) { resetMonth() continue goYear } continue goMonth } continue goDay } continue goHour } continue goMin } } //goSecond } //goMin }//goHour }//goDay }//goMonth } // 判断100年内的结果条数 if (resultArr.length == 0) { this.resultList = ['没有达到条件的结果!'] } else { this.resultList = resultArr if (resultArr.length !== 5) { this.resultList.push('最近100年内只有上面' + resultArr.length + '条结果!') } } // 计算完成-显示结果 this.isShow = true }, // 用于计算某位数字在数组中的索引 getIndex(arr, value) { if (value <= arr[0] || value > arr[arr.length - 1]) { return 0 } else { for (let i = 0; i < arr.length - 1; i++) { if (value > arr[i] && value <= arr[i + 1]) { return i + 1 } } } }, // 获取"年"数组 getYearArr(rule, year) { this.dateArr[5] = this.getOrderArr(year, year + 100) if (rule !== undefined) { if (rule.indexOf('-') >= 0) { this.dateArr[5] = this.getCycleArr(rule, year + 100, false) } else if (rule.indexOf('/') >= 0) { this.dateArr[5] = this.getAverageArr(rule, year + 100) } else if (rule !== '*') { this.dateArr[5] = this.getAssignArr(rule) } } }, // 获取"月"数组 getMonthArr(rule) { this.dateArr[4] = this.getOrderArr(1, 12) if (rule.indexOf('-') >= 0) { this.dateArr[4] = this.getCycleArr(rule, 12, false) } else if (rule.indexOf('/') >= 0) { this.dateArr[4] = this.getAverageArr(rule, 12) } else if (rule !== '*') { this.dateArr[4] = this.getAssignArr(rule) } }, // 获取"日"数组-主要为日期规则 getWeekArr(rule) { // 只有当日期规则的两个值均为“”时则表达日期是有选项的 if (this.dayRule == '' && this.dayRuleSup == '') { if (rule.indexOf('-') >= 0) { this.dayRule = 'weekDay' this.dayRuleSup = this.getCycleArr(rule, 7, false) } else if (rule.indexOf('#') >= 0) { this.dayRule = 'assWeek' let matchRule = rule.match(/[0-9]{1}/g) this.dayRuleSup = [Number(matchRule[1]), Number(matchRule[0])] this.dateArr[3] = [1] if (this.dayRuleSup[1] == 7) { this.dayRuleSup[1] = 0 } } else if (rule.indexOf('L') >= 0) { this.dayRule = 'lastWeek' this.dayRuleSup = Number(rule.match(/[0-9]{1,2}/g)[0]) this.dateArr[3] = [31] if (this.dayRuleSup == 7) { this.dayRuleSup = 0 } } else if (rule !== '*' && rule !== '?') { this.dayRule = 'weekDay' this.dayRuleSup = this.getAssignArr(rule) } } }, // 获取"日"数组-少量为日期规则 getDayArr(rule) { this.dateArr[3] = this.getOrderArr(1, 31) this.dayRule = '' this.dayRuleSup = '' if (rule.indexOf('-') >= 0) { this.dateArr[3] = this.getCycleArr(rule, 31, false) this.dayRuleSup = 'null' } else if (rule.indexOf('/') >= 0) { this.dateArr[3] = this.getAverageArr(rule, 31) this.dayRuleSup = 'null' } else if (rule.indexOf('W') >= 0) { this.dayRule = 'workDay' this.dayRuleSup = Number(rule.match(/[0-9]{1,2}/g)[0]) this.dateArr[3] = [this.dayRuleSup] } else if (rule.indexOf('L') >= 0) { this.dayRule = 'lastDay' this.dayRuleSup = 'null' this.dateArr[3] = [31] } else if (rule !== '*' && rule !== '?') { this.dateArr[3] = this.getAssignArr(rule) this.dayRuleSup = 'null' } else if (rule == '*') { this.dayRuleSup = 'null' } }, // 获取"时"数组 getHourArr(rule) { this.dateArr[2] = this.getOrderArr(0, 23) if (rule.indexOf('-') >= 0) { this.dateArr[2] = this.getCycleArr(rule, 24, true) } else if (rule.indexOf('/') >= 0) { this.dateArr[2] = this.getAverageArr(rule, 23) } else if (rule !== '*') { this.dateArr[2] = this.getAssignArr(rule) } }, // 获取"分"数组 getMinArr(rule) { this.dateArr[1] = this.getOrderArr(0, 59) if (rule.indexOf('-') >= 0) { this.dateArr[1] = this.getCycleArr(rule, 60, true) } else if (rule.indexOf('/') >= 0) { this.dateArr[1] = this.getAverageArr(rule, 59) } else if (rule !== '*') { this.dateArr[1] = this.getAssignArr(rule) } }, // 获取"秒"数组 getSecondArr(rule) { this.dateArr[0] = this.getOrderArr(0, 59) if (rule.indexOf('-') >= 0) { this.dateArr[0] = this.getCycleArr(rule, 60, true) } else if (rule.indexOf('/') >= 0) { this.dateArr[0] = this.getAverageArr(rule, 59) } else if (rule !== '*') { this.dateArr[0] = this.getAssignArr(rule) } }, // 根据传进来的min-max返回一个顺序的数组 getOrderArr(min, max) { let arr = [] for (let i = min; i <= max; i++) { arr.push(i) } return arr }, // 根据规则中指定的零散值返回一个数组 getAssignArr(rule) { let arr = [] let assiginArr = rule.split(',') for (let i = 0; i < assiginArr.length; i++) { arr[i] = Number(assiginArr[i]) } arr.sort(this.compare) return arr }, // 根据一定算术规则计算返回一个数组 getAverageArr(rule, limit) { let arr = [] let agArr = rule.split('/') let min = Number(agArr[0]) let step = Number(agArr[1]) while (min <= limit) { arr.push(min) min += step } return arr }, // 根据规则返回一个具有周期性的数组 getCycleArr(rule, limit, status) { // status--表示是否从0开始(则从1开始) let arr = [] let cycleArr = rule.split('-') let min = Number(cycleArr[0]) let max = Number(cycleArr[1]) if (min > max) { max += limit } for (let i = min; i <= max; i++) { let add = 0 if (status == false && i % limit == 0) { add = limit } arr.push(Math.round(i % limit + add)) } arr.sort(this.compare) return arr }, // 比较数字大小(用于Array.sort) compare(value1, value2) { if (value2 - value1 > 0) { return -1 } else { return 1 } }, // 格式化日期格式如:2017-9-19 18:04:33 formatDate(value, type) { // 计算日期相关值 let time = typeof value == 'number' ? new Date(value) : value let Y = time.getFullYear() let M = time.getMonth() + 1 let D = time.getDate() let h = time.getHours() let m = time.getMinutes() let s = time.getSeconds() let week = time.getDay() // 如果传递了type的话 if (type == undefined) { return Y + '-' + (M < 10 ? '0' + M : M) + '-' + (D < 10 ? '0' + D : D) + ' ' + (h < 10 ? '0' + h : h) + ':' + (m < 10 ? '0' + m : m) + ':' + (s < 10 ? '0' + s : s) } else if (type == 'week') { // 在quartz中 1为星期日 return week + 1 } }, // 检查日期是否存在 checkDate(value) { let time = new Date(value) let format = this.formatDate(time) return value === format } }, watch: { 'ex': 'expressionChange' }, props: ['ex'], mounted: function () { // 初始化 获取一次结果 this.expressionChange() } } </script>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/Crontab/result.vue
Vue
mit
17,094
<template> <el-form size="small"> <el-form-item> <el-radio v-model='radioValue' :label="1"> 秒,允许的通配符[, - * /] </el-radio> </el-form-item> <el-form-item> <el-radio v-model='radioValue' :label="2"> 周期从 <el-input-number v-model='cycle01' :min="0" :max="58" /> - <el-input-number v-model='cycle02' :min="cycle01 ? cycle01 + 1 : 1" :max="59" /> 秒 </el-radio> </el-form-item> <el-form-item> <el-radio v-model='radioValue' :label="3"> 从 <el-input-number v-model='average01' :min="0" :max="58" /> 秒开始,每 <el-input-number v-model='average02' :min="1" :max="59 - average01 || 0" /> 秒执行一次 </el-radio> </el-form-item> <el-form-item> <el-radio v-model='radioValue' :label="4"> 指定 <el-select clearable v-model="checkboxList" placeholder="可多选" multiple style="width:100%"> <el-option v-for="item in 60" :key="item" :value="item-1">{{item-1}}</el-option> </el-select> </el-radio> </el-form-item> </el-form> </template> <script> export default { data() { return { radioValue: 1, cycle01: 1, cycle02: 2, average01: 0, average02: 1, checkboxList: [], checkNum: this.$options.propsData.check } }, name: 'crontab-second', props: ['check', 'radioParent'], methods: { // 单选按钮值变化时 radioChange() { switch (this.radioValue) { case 1: this.$emit('update', 'second', '*', 'second') break case 2: this.$emit('update', 'second', this.cycleTotal) break case 3: this.$emit('update', 'second', this.averageTotal) break case 4: this.$emit('update', 'second', this.checkboxString) break } }, // 周期两个值变化时 cycleChange() { if (this.radioValue == '2') { this.$emit('update', 'second', this.cycleTotal) } }, // 平均两个值变化时 averageChange() { if (this.radioValue == '3') { this.$emit('update', 'second', this.averageTotal) } }, // checkbox值变化时 checkboxChange() { if (this.radioValue == '4') { this.$emit('update', 'second', this.checkboxString) } } }, watch: { 'radioValue': 'radioChange', 'cycleTotal': 'cycleChange', 'averageTotal': 'averageChange', 'checkboxString': 'checkboxChange', radioParent() { this.radioValue = this.radioParent } }, computed: { // 计算两个周期值 cycleTotal: function () { const cycle01 = this.checkNum(this.cycle01, 0, 58) const cycle02 = this.checkNum(this.cycle02, cycle01 ? cycle01 + 1 : 1, 59) return cycle01 + '-' + cycle02 }, // 计算平均用到的值 averageTotal: function () { const average01 = this.checkNum(this.average01, 0, 58) const average02 = this.checkNum(this.average02, 1, 59 - average01 || 0) return average01 + '/' + average02 }, // 计算勾选的checkbox值合集 checkboxString: function () { let str = this.checkboxList.join() return str == '' ? '*' : str } } } </script>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/Crontab/second.vue
Vue
mit
2,999
<template> <el-form size='small'> <el-form-item> <el-radio v-model='radioValue' :label="1"> 周,允许的通配符[, - * ? / L #] </el-radio> </el-form-item> <el-form-item> <el-radio v-model='radioValue' :label="2"> 不指定 </el-radio> </el-form-item> <el-form-item> <el-radio v-model='radioValue' :label="3"> 周期从星期 <el-select clearable v-model="cycle01"> <el-option v-for="(item,index) of weekList" :key="index" :label="item.value" :value="item.key" :disabled="item.key === 1" >{{item.value}}</el-option> </el-select> - <el-select clearable v-model="cycle02"> <el-option v-for="(item,index) of weekList" :key="index" :label="item.value" :value="item.key" :disabled="item.key < cycle01 && item.key !== 1" >{{item.value}}</el-option> </el-select> </el-radio> </el-form-item> <el-form-item> <el-radio v-model='radioValue' :label="4"> 第 <el-input-number v-model='average01' :min="1" :max="4" /> 周的星期 <el-select clearable v-model="average02"> <el-option v-for="(item,index) of weekList" :key="index" :label="item.value" :value="item.key">{{item.value}}</el-option> </el-select> </el-radio> </el-form-item> <el-form-item> <el-radio v-model='radioValue' :label="5"> 本月最后一个星期 <el-select clearable v-model="weekday"> <el-option v-for="(item,index) of weekList" :key="index" :label="item.value" :value="item.key">{{item.value}}</el-option> </el-select> </el-radio> </el-form-item> <el-form-item> <el-radio v-model='radioValue' :label="6"> 指定 <el-select clearable v-model="checkboxList" placeholder="可多选" multiple style="width:100%"> <el-option v-for="(item,index) of weekList" :key="index" :label="item.value" :value="String(item.key)">{{item.value}}</el-option> </el-select> </el-radio> </el-form-item> </el-form> </template> <script> export default { data() { return { radioValue: 2, weekday: 2, cycle01: 2, cycle02: 3, average01: 1, average02: 2, checkboxList: [], weekList: [ { key: 2, value: '星期一' }, { key: 3, value: '星期二' }, { key: 4, value: '星期三' }, { key: 5, value: '星期四' }, { key: 6, value: '星期五' }, { key: 7, value: '星期六' }, { key: 1, value: '星期日' } ], checkNum: this.$options.propsData.check } }, name: 'crontab-week', props: ['check', 'cron'], methods: { // 单选按钮值变化时 radioChange() { if (this.radioValue !== 2 && this.cron.day !== '?') { this.$emit('update', 'day', '?', 'week') } switch (this.radioValue) { case 1: this.$emit('update', 'week', '*') break case 2: this.$emit('update', 'week', '?') break case 3: this.$emit('update', 'week', this.cycleTotal) break case 4: this.$emit('update', 'week', this.averageTotal) break case 5: this.$emit('update', 'week', this.weekdayCheck + 'L') break case 6: this.$emit('update', 'week', this.checkboxString) break } }, // 周期两个值变化时 cycleChange() { if (this.radioValue == '3') { this.$emit('update', 'week', this.cycleTotal) } }, // 平均两个值变化时 averageChange() { if (this.radioValue == '4') { this.$emit('update', 'week', this.averageTotal) } }, // 最近工作日值变化时 weekdayChange() { if (this.radioValue == '5') { this.$emit('update', 'week', this.weekday + 'L') } }, // checkbox值变化时 checkboxChange() { if (this.radioValue == '6') { this.$emit('update', 'week', this.checkboxString) } }, }, watch: { 'radioValue': 'radioChange', 'cycleTotal': 'cycleChange', 'averageTotal': 'averageChange', 'weekdayCheck': 'weekdayChange', 'checkboxString': 'checkboxChange', }, computed: { // 计算两个周期值 cycleTotal: function () { this.cycle01 = this.checkNum(this.cycle01, 1, 7) this.cycle02 = this.checkNum(this.cycle02, 1, 7) return this.cycle01 + '-' + this.cycle02 }, // 计算平均用到的值 averageTotal: function () { this.average01 = this.checkNum(this.average01, 1, 4) this.average02 = this.checkNum(this.average02, 1, 7) return this.average02 + '#' + this.average01 }, // 最近的工作日(格式) weekdayCheck: function () { this.weekday = this.checkNum(this.weekday, 1, 7) return this.weekday }, // 计算勾选的checkbox值合集 checkboxString: function () { let str = this.checkboxList.join() return str == '' ? '*' : str } } } </script>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/Crontab/week.vue
Vue
mit
4,800
<template> <el-form size="small"> <el-form-item> <el-radio :label="1" v-model='radioValue'> 不填,允许的通配符[, - * /] </el-radio> </el-form-item> <el-form-item> <el-radio :label="2" v-model='radioValue'> 每年 </el-radio> </el-form-item> <el-form-item> <el-radio :label="3" v-model='radioValue'> 周期从 <el-input-number v-model='cycle01' :min='fullYear' :max="2098" /> - <el-input-number v-model='cycle02' :min="cycle01 ? cycle01 + 1 : fullYear + 1" :max="2099" /> </el-radio> </el-form-item> <el-form-item> <el-radio :label="4" v-model='radioValue'> 从 <el-input-number v-model='average01' :min='fullYear' :max="2098"/> 年开始,每 <el-input-number v-model='average02' :min="1" :max="2099 - average01 || fullYear" /> 年执行一次 </el-radio> </el-form-item> <el-form-item> <el-radio :label="5" v-model='radioValue'> 指定 <el-select clearable v-model="checkboxList" placeholder="可多选" multiple> <el-option v-for="item in 9" :key="item" :value="item - 1 + fullYear" :label="item -1 + fullYear" /> </el-select> </el-radio> </el-form-item> </el-form> </template> <script> export default { data() { return { fullYear: 0, radioValue: 1, cycle01: 0, cycle02: 0, average01: 0, average02: 1, checkboxList: [], checkNum: this.$options.propsData.check } }, name: 'crontab-year', props: ['check', 'month', 'cron'], methods: { // 单选按钮值变化时 radioChange() { switch (this.radioValue) { case 1: this.$emit('update', 'year', '') break case 2: this.$emit('update', 'year', '*') break case 3: this.$emit('update', 'year', this.cycleTotal) break case 4: this.$emit('update', 'year', this.averageTotal) break case 5: this.$emit('update', 'year', this.checkboxString) break } }, // 周期两个值变化时 cycleChange() { if (this.radioValue == '3') { this.$emit('update', 'year', this.cycleTotal) } }, // 平均两个值变化时 averageChange() { if (this.radioValue == '4') { this.$emit('update', 'year', this.averageTotal) } }, // checkbox值变化时 checkboxChange() { if (this.radioValue == '5') { this.$emit('update', 'year', this.checkboxString) } } }, watch: { 'radioValue': 'radioChange', 'cycleTotal': 'cycleChange', 'averageTotal': 'averageChange', 'checkboxString': 'checkboxChange' }, computed: { // 计算两个周期值 cycleTotal: function () { const cycle01 = this.checkNum(this.cycle01, this.fullYear, 2098) const cycle02 = this.checkNum(this.cycle02, cycle01 ? cycle01 + 1 : this.fullYear + 1, 2099) return cycle01 + '-' + cycle02 }, // 计算平均用到的值 averageTotal: function () { const average01 = this.checkNum(this.average01, this.fullYear, 2098) const average02 = this.checkNum(this.average02, 1, 2099 - average01 || this.fullYear) return average01 + '/' + average02 }, // 计算勾选的checkbox值合集 checkboxString: function () { let str = this.checkboxList.join() return str } }, mounted: function () { // 仅获取当前年份 this.fullYear = Number(new Date().getFullYear()) this.cycle01 = this.fullYear this.average01 = this.fullYear } } </script>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/Crontab/year.vue
Vue
mit
3,351
import Vue from 'vue' import store from '@/store' import DataDict from '@/utils/dict' import { getDicts as getDicts } from '@/api/system/dict/data' function searchDictByKey(dict, key) { if (key == null && key == "") { return null } try { for (let i = 0; i < dict.length; i++) { if (dict[i].key == key) { return dict[i].value } } } catch (e) { return null } } function install() { Vue.use(DataDict, { metas: { '*': { labelField: 'dictLabel', valueField: 'dictValue', request(dictMeta) { const storeDict = searchDictByKey(store.getters.dict, dictMeta.type) if (storeDict) { return new Promise(resolve => { resolve(storeDict) }) } else { return new Promise((resolve, reject) => { getDicts(dictMeta.type).then(res => { store.dispatch('dict/setDict', { key: dictMeta.type, value: res.data }) resolve(res.data) }).catch(error => { reject(error) }) }) } }, }, }, }) } export default { install, }
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/DictData/index.js
JavaScript
mit
1,161
<template> <div> <template v-for="(item, index) in options"> <template v-if="values.includes(item.value)"> <span v-if="(item.raw.listClass == 'default' || item.raw.listClass == '') && (item.raw.cssClass == '' || item.raw.cssClass == null)" :key="item.value" :index="index" :class="item.raw.cssClass" >{{ item.label + ' ' }}</span > <el-tag v-else :disable-transitions="true" :key="item.value" :index="index" :type="item.raw.listClass == 'primary' ? '' : item.raw.listClass" :class="item.raw.cssClass" > {{ item.label + ' ' }} </el-tag> </template> </template> <template v-if="unmatch && showValue"> {{ unmatchArray | handleArray }} </template> </div> </template> <script> export default { name: "DictTag", props: { options: { type: Array, default: null, }, value: [Number, String, Array], // 当未找到匹配的数据时,显示value showValue: { type: Boolean, default: true, }, separator: { type: String, default: "," } }, data() { return { unmatchArray: [], // 记录未匹配的项 } }, computed: { values() { if (this.value === null || typeof this.value === 'undefined' || this.value === '') return [] return Array.isArray(this.value) ? this.value.map(item => '' + item) : String(this.value).split(this.separator) }, unmatch() { this.unmatchArray = [] // 没有value不显示 if (this.value === null || typeof this.value === 'undefined' || this.value === '' || this.options.length === 0) return false // 传入值为数组 let unmatch = false // 添加一个标志来判断是否有未匹配项 this.values.forEach(item => { if (!this.options.some(v => v.value === item)) { this.unmatchArray.push(item) unmatch = true // 如果有未匹配项,将标志设置为true } }) return unmatch // 返回标志的值 }, }, filters: { handleArray(array) { if (array.length === 0) return '' return array.reduce((pre, cur) => { return pre + ' ' + cur }) }, } } </script> <style scoped> .el-tag + .el-tag { margin-left: 10px; } </style>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/DictTag/index.vue
Vue
mit
2,382
<template> <div> <el-upload :action="uploadUrl" :before-upload="handleBeforeUpload" :on-success="handleUploadSuccess" :on-error="handleUploadError" name="file" :show-file-list="false" :headers="headers" style="display: none" ref="upload" v-if="this.type == 'url'" > </el-upload> <div class="editor" ref="editor" :style="styles"></div> </div> </template> <script> import axios from "axios" import Quill from "quill" import "quill/dist/quill.core.css" import "quill/dist/quill.snow.css" import "quill/dist/quill.bubble.css" import { getToken } from "@/utils/auth" export default { name: "Editor", props: { /* 编辑器的内容 */ value: { type: String, default: "", }, /* 高度 */ height: { type: Number, default: null, }, /* 最小高度 */ minHeight: { type: Number, default: null, }, /* 只读 */ readOnly: { type: Boolean, default: false, }, /* 上传文件大小限制(MB) */ fileSize: { type: Number, default: 5, }, /* 类型(base64格式、url格式) */ type: { type: String, default: "url", } }, data() { return { uploadUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址 headers: { Authorization: "Bearer " + getToken() }, Quill: null, currentValue: "", options: { theme: "snow", bounds: document.body, debug: "warn", modules: { // 工具栏配置 toolbar: [ ["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线 ["blockquote", "code-block"], // 引用 代码块 [{ list: "ordered" }, { list: "bullet" }], // 有序、无序列表 [{ indent: "-1" }, { indent: "+1" }], // 缩进 [{ size: ["small", false, "large", "huge"] }], // 字体大小 [{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题 [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色 [{ align: [] }], // 对齐方式 ["clean"], // 清除文本格式 ["link", "image", "video"] // 链接、图片、视频 ], }, placeholder: "请输入内容", readOnly: this.readOnly, }, } }, computed: { styles() { let style = {} if (this.minHeight) { style.minHeight = `${this.minHeight}px` } if (this.height) { style.height = `${this.height}px` } return style } }, watch: { value: { handler(val) { if (val !== this.currentValue) { this.currentValue = val === null ? "" : val if (this.Quill) { this.Quill.clipboard.dangerouslyPasteHTML(this.currentValue) } } }, immediate: true, }, }, mounted() { this.init() }, beforeDestroy() { this.Quill = null }, methods: { init() { const editor = this.$refs.editor this.Quill = new Quill(editor, this.options) // 如果设置了上传地址则自定义图片上传事件 if (this.type == 'url') { let toolbar = this.Quill.getModule("toolbar") toolbar.addHandler("image", (value) => { if (value) { this.$refs.upload.$children[0].$refs.input.click() } else { this.quill.format("image", false) } }) this.Quill.root.addEventListener('paste', this.handlePasteCapture, true) } this.Quill.clipboard.dangerouslyPasteHTML(this.currentValue) this.Quill.on("text-change", (delta, oldDelta, source) => { const html = this.$refs.editor.children[0].innerHTML const text = this.Quill.getText() const quill = this.Quill this.currentValue = html this.$emit("input", html) this.$emit("on-change", { html, text, quill }) }) this.Quill.on("text-change", (delta, oldDelta, source) => { this.$emit("on-text-change", delta, oldDelta, source) }) this.Quill.on("selection-change", (range, oldRange, source) => { this.$emit("on-selection-change", range, oldRange, source) }) this.Quill.on("editor-change", (eventName, ...args) => { this.$emit("on-editor-change", eventName, ...args) }) }, // 上传前校检格式和大小 handleBeforeUpload(file) { const type = ["image/jpeg", "image/jpg", "image/png", "image/svg"] const isJPG = type.includes(file.type) // 检验文件格式 if (!isJPG) { this.$message.error(`图片格式错误!`) return false } // 校检文件大小 if (this.fileSize) { const isLt = file.size / 1024 / 1024 < this.fileSize if (!isLt) { this.$message.error(`上传文件大小不能超过 ${this.fileSize} MB!`) return false } } return true }, handleUploadSuccess(res, file) { // 如果上传成功 if (res.code == 200) { // 获取富文本组件实例 let quill = this.Quill // 获取光标所在位置 let length = quill.getSelection().index // 插入图片 res.url为服务器返回的图片地址 quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName) // 调整光标到最后 quill.setSelection(length + 1) } else { this.$message.error("图片插入失败") } }, handleUploadError() { this.$message.error("图片插入失败") }, // 复制粘贴图片处理 handlePasteCapture(e) { const clipboard = e.clipboardData || window.clipboardData if (clipboard && clipboard.items) { for (let i = 0; i < clipboard.items.length; i++) { const item = clipboard.items[i] if (item.type.indexOf('image') !== -1) { e.preventDefault() const file = item.getAsFile() this.insertImage(file) } } } }, insertImage(file) { const formData = new FormData() formData.append("file", file) axios.post(this.uploadUrl, formData, { headers: { "Content-Type": "multipart/form-data", Authorization: this.headers.Authorization } }).then(res => { this.handleUploadSuccess(res.data) }) } } } </script> <style> .editor, .ql-toolbar { white-space: pre-wrap !important; line-height: normal !important; } .quill-img { display: none; } .ql-snow .ql-tooltip[data-mode="link"]::before { content: "请输入链接地址:"; } .ql-snow .ql-tooltip.ql-editing a.ql-action::after { border-right: 0px; content: "保存"; padding-right: 0px; } .ql-snow .ql-tooltip[data-mode="video"]::before { content: "请输入视频地址:"; } .ql-snow .ql-picker.ql-size .ql-picker-label::before, .ql-snow .ql-picker.ql-size .ql-picker-item::before { content: "14px"; } .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before, .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before { content: "10px"; } .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before, .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before { content: "18px"; } .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before, .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before { content: "32px"; } .ql-snow .ql-picker.ql-header .ql-picker-label::before, .ql-snow .ql-picker.ql-header .ql-picker-item::before { content: "文本"; } .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before, .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before { content: "标题1"; } .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before, .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { content: "标题2"; } .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before, .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { content: "标题3"; } .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before, .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before { content: "标题4"; } .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before, .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before { content: "标题5"; } .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before, .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before { content: "标题6"; } .ql-snow .ql-picker.ql-font .ql-picker-label::before, .ql-snow .ql-picker.ql-font .ql-picker-item::before { content: "标准字体"; } .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before { content: "衬线字体"; } .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before { content: "等宽字体"; } </style>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/Editor/index.vue
Vue
mit
9,368
<template> <div class="upload-file"> <el-upload multiple :action="uploadFileUrl" :before-upload="handleBeforeUpload" :file-list="fileList" :data="data" :limit="limit" :on-error="handleUploadError" :on-exceed="handleExceed" :on-success="handleUploadSuccess" :show-file-list="false" :headers="headers" class="upload-file-uploader" ref="fileUpload" v-if="!disabled" > <!-- 上传按钮 --> <el-button size="mini" type="primary">选取文件</el-button> <!-- 上传提示 --> <div class="el-upload__tip" slot="tip" v-if="showTip"> 请上传 <template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b> </template> <template v-if="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template> 的文件 </div> </el-upload> <!-- 文件列表 --> <transition-group ref="uploadFileList" class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul"> <li :key="file.url" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList"> <el-link :href="`${baseUrl}${file.url}`" :underline="false" target="_blank"> <span class="el-icon-document"> {{ getFileName(file.name) }} </span> </el-link> <div class="ele-upload-list__item-content-action"> <el-link :underline="false" @click="handleDelete(index)" type="danger" v-if="!disabled">删除</el-link> </div> </li> </transition-group> </div> </template> <script> import { getToken } from "@/utils/auth" import Sortable from 'sortablejs' export default { name: "FileUpload", props: { // 值 value: [String, Object, Array], // 上传接口地址 action: { type: String, default: "/common/upload" }, // 上传携带的参数 data: { type: Object }, // 数量限制 limit: { type: Number, default: 5 }, // 大小限制(MB) fileSize: { type: Number, default: 5 }, // 文件类型, 例如['png', 'jpg', 'jpeg'] fileType: { type: Array, default: () => ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "txt", "pdf"] }, // 是否显示提示 isShowTip: { type: Boolean, default: true }, // 禁用组件(仅查看文件) disabled: { type: Boolean, default: false }, // 拖动排序 drag: { type: Boolean, default: true } }, data() { return { number: 0, uploadList: [], baseUrl: process.env.VUE_APP_BASE_API, uploadFileUrl: process.env.VUE_APP_BASE_API + this.action, // 上传文件服务器地址 headers: { Authorization: "Bearer " + getToken(), }, fileList: [] } }, mounted() { if (this.drag && !this.disabled) { this.$nextTick(() => { const element = this.$refs.uploadFileList?.$el || this.$refs.uploadFileList Sortable.create(element, { ghostClass: 'file-upload-darg', onEnd: (evt) => { const movedItem = this.fileList.splice(evt.oldIndex, 1)[0] this.fileList.splice(evt.newIndex, 0, movedItem) this.$emit("input", this.listToString(this.fileList)) } }) }) } }, watch: { value: { handler(val) { if (val) { let temp = 1 // 首先将值转为数组 const list = Array.isArray(val) ? val : this.value.split(',') // 然后将数组转为对象数组 this.fileList = list.map(item => { if (typeof item === "string") { item = { name: item, url: item } } item.uid = item.uid || new Date().getTime() + temp++ return item }) } else { this.fileList = [] return [] } }, deep: true, immediate: true } }, computed: { // 是否显示提示 showTip() { return this.isShowTip && (this.fileType || this.fileSize) }, }, methods: { // 上传前校检格式和大小 handleBeforeUpload(file) { // 校检文件类型 if (this.fileType) { const fileName = file.name.split('.') const fileExt = fileName[fileName.length - 1] const isTypeOk = this.fileType.indexOf(fileExt) >= 0 if (!isTypeOk) { this.$modal.msgError(`文件格式不正确,请上传${this.fileType.join("/")}格式文件!`) return false } } // 校检文件名是否包含特殊字符 if (file.name.includes(',')) { this.$modal.msgError('文件名不正确,不能包含英文逗号!') return false } // 校检文件大小 if (this.fileSize) { const isLt = file.size / 1024 / 1024 < this.fileSize if (!isLt) { this.$modal.msgError(`上传文件大小不能超过 ${this.fileSize} MB!`) return false } } this.$modal.loading("正在上传文件,请稍候...") this.number++ return true }, // 文件个数超出 handleExceed() { this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`) }, // 上传失败 handleUploadError(err) { this.$modal.msgError("上传文件失败,请重试") this.$modal.closeLoading() }, // 上传成功回调 handleUploadSuccess(res, file) { if (res.code === 200) { this.uploadList.push({ name: res.fileName, url: res.fileName }) this.uploadedSuccessfully() } else { this.number-- this.$modal.closeLoading() this.$modal.msgError(res.msg) this.$refs.fileUpload.handleRemove(file) this.uploadedSuccessfully() } }, // 删除文件 handleDelete(index) { this.fileList.splice(index, 1) this.$emit("input", this.listToString(this.fileList)) }, // 上传结束处理 uploadedSuccessfully() { if (this.number > 0 && this.uploadList.length === this.number) { this.fileList = this.fileList.concat(this.uploadList) this.uploadList = [] this.number = 0 this.$emit("input", this.listToString(this.fileList)) this.$modal.closeLoading() } }, // 获取文件名称 getFileName(name) { // 如果是url那么取最后的名字 如果不是直接返回 if (name.lastIndexOf("/") > -1) { return name.slice(name.lastIndexOf("/") + 1) } else { return name } }, // 对象转成指定字符串分隔 listToString(list, separator) { let strs = "" separator = separator || "," for (let i in list) { strs += list[i].url + separator } return strs != '' ? strs.substr(0, strs.length - 1) : '' } } } </script> <style scoped lang="scss"> .file-upload-darg { opacity: 0.5; background: #c8ebfb; } .upload-file-uploader { margin-bottom: 5px; } .upload-file-list .el-upload-list__item { border: 1px solid #e4e7ed; line-height: 2; margin-bottom: 10px; position: relative; } .upload-file-list .ele-upload-list__item-content { display: flex; justify-content: space-between; align-items: center; color: inherit; } .ele-upload-list__item-content-action .el-link { margin-right: 10px; } </style>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/FileUpload/index.vue
Vue
mit
7,486
<template> <div style="padding: 0 15px;" @click="toggleClick"> <svg :class="{'is-active':isActive}" class="hamburger" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="64" height="64" > <path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z" /> </svg> </div> </template> <script> export default { name: 'Hamburger', props: { isActive: { type: Boolean, default: false } }, methods: { toggleClick() { this.$emit('toggleClick') } } } </script> <style scoped> .hamburger { display: inline-block; vertical-align: middle; width: 20px; height: 20px; } .hamburger.is-active { transform: rotate(180deg); } </style>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/Hamburger/index.vue
Vue
mit
1,156
<template> <div class="header-search"> <svg-icon class-name="search-icon" icon-class="search" @click.stop="click" /> <el-dialog :visible.sync="show" width="600px" @close="close" :show-close="false" append-to-body > <el-input v-model="search" ref="headerSearchSelectRef" size="large" @input="querySearch" prefix-icon="el-icon-search" placeholder="菜单搜索,支持标题、URL模糊查询" clearable @keyup.enter.native="selectActiveResult" @keydown.up.native="navigateResult('up')" @keydown.down.native="navigateResult('down')" > </el-input> <el-scrollbar wrap-class="right-scrollbar-wrapper"> <div class="result-wrap"> <div class="search-item" v-for="(item, index) in options" :key="item.path" :style="activeStyle(index)" @mouseenter="activeIndex = index" @mouseleave="activeIndex = -1"> <div class="left"> <svg-icon class="menu-icon" :icon-class="item.icon" /> </div> <div class="search-info" @click="change(item)"> <div class="menu-title"> {{ item.title.join(" / ") }} </div> <div class="menu-path"> {{ item.path }} </div> </div> <svg-icon icon-class="enter" v-show="index === activeIndex"/> </div> </div> </el-scrollbar> </el-dialog> </div> </template> <script> import Fuse from 'fuse.js/dist/fuse.min.js' import path from 'path' import { isHttp } from '@/utils/validate' export default { name: 'HeaderSearch', data() { return { search: '', options: [], searchPool: [], activeIndex: -1, show: false, fuse: undefined } }, computed: { theme() { return this.$store.state.settings.theme }, routes() { return this.$store.getters.defaultRoutes } }, watch: { routes() { this.searchPool = this.generateRoutes(this.routes) }, searchPool(list) { this.initFuse(list) } }, mounted() { this.searchPool = this.generateRoutes(this.routes) }, methods: { click() { this.show = !this.show if (this.show) { this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.focus() this.options = this.searchPool } }, close() { this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.blur() this.search = '' this.options = [] this.show = false this.activeIndex = -1 }, change(val) { const path = val.path const query = val.query if(isHttp(val.path)) { // http(s):// 路径新窗口打开 const pindex = path.indexOf("http") window.open(path.substr(pindex, path.length), "_blank") } else { if (query) { this.$router.push({ path: path, query: JSON.parse(query) }) } else { this.$router.push(path) } } this.search = '' this.options = [] this.$nextTick(() => { this.show = false }) }, initFuse(list) { this.fuse = new Fuse(list, { shouldSort: true, threshold: 0.4, location: 0, distance: 100, minMatchCharLength: 1, keys: [{ name: 'title', weight: 0.7 }, { name: 'path', weight: 0.3 }] }) }, // Filter out the routes that can be displayed in the sidebar // And generate the internationalized title generateRoutes(routes, basePath = '/', prefixTitle = []) { let res = [] for (const router of routes) { // skip hidden router if (router.hidden) { continue } const data = { path: !isHttp(router.path) ? path.resolve(basePath, router.path) : router.path, title: [...prefixTitle], icon: '' } if (router.meta && router.meta.title) { data.title = [...data.title, router.meta.title] data.icon = router.meta.icon if (router.redirect !== 'noRedirect') { // only push the routes with title // special case: need to exclude parent router without redirect res.push(data) } } if (router.query) { data.query = router.query } // recursive child routes if (router.children) { const tempRoutes = this.generateRoutes(router.children, data.path, data.title) if (tempRoutes.length >= 1) { res = [...res, ...tempRoutes] } } } return res }, querySearch(query) { this.activeIndex = -1 if (query !== '') { this.options = this.fuse.search(query).map((item) => item.item) ?? this.searchPool } else { this.options = this.searchPool } }, activeStyle(index) { if (index !== this.activeIndex) return {} return { "background-color": this.theme, "color": "#fff" } }, navigateResult(direction) { if (direction === "up") { this.activeIndex = this.activeIndex <= 0 ? this.options.length - 1 : this.activeIndex - 1 } else if (direction === "down") { this.activeIndex = this.activeIndex >= this.options.length - 1 ? 0 : this.activeIndex + 1 } }, selectActiveResult() { if (this.options.length > 0 && this.activeIndex >= 0) { this.change(this.options[this.activeIndex]) } } } } </script> <style lang='scss' scoped> ::v-deep { .el-dialog__header { padding: 0 !important; } } .header-search { .search-icon { cursor: pointer; font-size: 18px; vertical-align: middle; } } .result-wrap { height: 280px; margin: 6px 0; .search-item { display: flex; height: 48px; align-items: center; padding-right: 10px; .left { width: 60px; text-align: center; .menu-icon { width: 18px; height: 18px; } } .search-info { padding-left: 5px; margin-top: 10px; width: 100%; display: flex; flex-direction: column; justify-content: flex-start; flex: 1; .menu-title, .menu-path { height: 20px; } .menu-path { color: #ccc; font-size: 10px; } } } .search-item:hover { cursor: pointer; } } </style>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/HeaderSearch/index.vue
Vue
mit
6,513
<!-- @author zhengjie --> <template> <div class="icon-body"> <el-input v-model="name" class="icon-search" clearable placeholder="请输入图标名称" @clear="filterIcons" @input="filterIcons"> <i slot="suffix" class="el-icon-search el-input__icon" /> </el-input> <div class="icon-list"> <div class="list-container"> <div v-for="(item, index) in iconList" class="icon-item-wrapper" :key="index" @click="selectedIcon(item)"> <div :class="['icon-item', { active: activeIcon === item }]"> <svg-icon :icon-class="item" class-name="icon" style="height: 25px;width: 16px;"/> <span>{{ item }}</span> </div> </div> </div> </div> </div> </template> <script> import icons from './requireIcons' export default { name: 'IconSelect', props: { activeIcon: { type: String } }, data() { return { name: '', iconList: icons } }, methods: { filterIcons() { this.iconList = icons if (this.name) { this.iconList = this.iconList.filter(item => item.includes(this.name)) } }, selectedIcon(name) { this.$emit('selected', name) document.body.click() }, reset() { this.name = '' this.iconList = icons } } } </script> <style rel="stylesheet/scss" lang="scss" scoped> .icon-body { width: 100%; padding: 10px; .icon-search { position: relative; margin-bottom: 5px; } .icon-list { height: 200px; overflow: auto; .list-container { display: flex; flex-wrap: wrap; .icon-item-wrapper { width: calc(100% / 3); height: 25px; line-height: 25px; cursor: pointer; display: flex; .icon-item { display: flex; max-width: 100%; height: 100%; padding: 0 5px; &:hover { background: #ececec; border-radius: 5px; } .icon { flex-shrink: 0; } span { display: inline-block; vertical-align: -0.15em; fill: currentColor; padding-left: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } } .icon-item.active { background: #ececec; border-radius: 5px; } } } } } </style>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/IconSelect/index.vue
Vue
mit
2,530
const req = require.context('../../assets/icons/svg', false, /\.svg$/) const requireAll = requireContext => requireContext.keys() const re = /\.\/(.*)\.svg/ const icons = requireAll(req).map(i => { return i.match(re)[1] }) export default icons
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/IconSelect/requireIcons.js
JavaScript
mit
250
<template> <el-image :src="`${realSrc}`" fit="cover" :style="`width:${realWidth};height:${realHeight};`" :preview-src-list="realSrcList" > <div slot="error" class="image-slot"> <i class="el-icon-picture-outline"></i> </div> </el-image> </template> <script> import { isExternal } from "@/utils/validate" export default { name: "ImagePreview", props: { src: { type: String, default: "" }, width: { type: [Number, String], default: "" }, height: { type: [Number, String], default: "" } }, computed: { realSrc() { if (!this.src) { return } let real_src = this.src.split(",")[0] if (isExternal(real_src)) { return real_src } return process.env.VUE_APP_BASE_API + real_src }, realSrcList() { if (!this.src) { return } let real_src_list = this.src.split(",") let srcList = [] real_src_list.forEach(item => { if (isExternal(item)) { return srcList.push(item) } return srcList.push(process.env.VUE_APP_BASE_API + item) }) return srcList }, realWidth() { return typeof this.width == "string" ? this.width : `${this.width}px` }, realHeight() { return typeof this.height == "string" ? this.height : `${this.height}px` } } } </script> <style lang="scss" scoped> .el-image { border-radius: 5px; background-color: #ebeef5; box-shadow: 0 0 5px 1px #ccc; ::v-deep .el-image__inner { transition: all 0.3s; cursor: pointer; &:hover { transform: scale(1.2); } } ::v-deep .image-slot { display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; color: #909399; font-size: 30px; } } </style>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/ImagePreview/index.vue
Vue
mit
1,852
<template> <div class="component-upload-image"> <el-upload multiple :disabled="disabled" :action="uploadImgUrl" list-type="picture-card" :on-success="handleUploadSuccess" :before-upload="handleBeforeUpload" :data="data" :limit="limit" :on-error="handleUploadError" :on-exceed="handleExceed" ref="imageUpload" :on-remove="handleDelete" :show-file-list="true" :headers="headers" :file-list="fileList" :on-preview="handlePictureCardPreview" :class="{hide: this.fileList.length >= this.limit}" > <i class="el-icon-plus"></i> </el-upload> <!-- 上传提示 --> <div class="el-upload__tip" slot="tip" v-if="showTip && !disabled"> 请上传 <template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b> </template> <template v-if="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template> 的文件 </div> <el-dialog :visible.sync="dialogVisible" title="预览" width="800" append-to-body > <img :src="dialogImageUrl" style="display: block; max-width: 100%; margin: 0 auto" /> </el-dialog> </div> </template> <script> import { getToken } from "@/utils/auth" import { isExternal } from "@/utils/validate" import Sortable from 'sortablejs' export default { props: { value: [String, Object, Array], // 上传接口地址 action: { type: String, default: "/common/upload" }, // 上传携带的参数 data: { type: Object }, // 图片数量限制 limit: { type: Number, default: 5 }, // 大小限制(MB) fileSize: { type: Number, default: 5 }, // 文件类型, 例如['png', 'jpg', 'jpeg'] fileType: { type: Array, default: () => ["png", "jpg", "jpeg"] }, // 是否显示提示 isShowTip: { type: Boolean, default: true }, // 禁用组件(仅查看图片) disabled: { type: Boolean, default: false }, // 拖动排序 drag: { type: Boolean, default: true } }, data() { return { number: 0, uploadList: [], dialogImageUrl: "", dialogVisible: false, hideUpload: false, baseUrl: process.env.VUE_APP_BASE_API, uploadImgUrl: process.env.VUE_APP_BASE_API + this.action, // 上传的图片服务器地址 headers: { Authorization: "Bearer " + getToken(), }, fileList: [] } }, mounted() { if (this.drag && !this.disabled) { this.$nextTick(() => { const element = this.$refs.imageUpload?.$el?.querySelector('.el-upload-list') Sortable.create(element, { onEnd: (evt) => { const movedItem = this.fileList.splice(evt.oldIndex, 1)[0] this.fileList.splice(evt.newIndex, 0, movedItem) this.$emit("input", this.listToString(this.fileList)) } }) }) } }, watch: { value: { handler(val) { if (val) { // 首先将值转为数组 const list = Array.isArray(val) ? val : this.value.split(',') // 然后将数组转为对象数组 this.fileList = list.map(item => { if (typeof item === "string") { if (item.indexOf(this.baseUrl) === -1 && !isExternal(item)) { item = { name: this.baseUrl + item, url: this.baseUrl + item } } else { item = { name: item, url: item } } } return item }) } else { this.fileList = [] return [] } }, deep: true, immediate: true } }, computed: { // 是否显示提示 showTip() { return this.isShowTip && (this.fileType || this.fileSize) }, }, methods: { // 上传前loading加载 handleBeforeUpload(file) { let isImg = false if (this.fileType.length) { let fileExtension = "" if (file.name.lastIndexOf(".") > -1) { fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1) } isImg = this.fileType.some(type => { if (file.type.indexOf(type) > -1) return true if (fileExtension && fileExtension.indexOf(type) > -1) return true return false }) } else { isImg = file.type.indexOf("image") > -1 } if (!isImg) { this.$modal.msgError(`文件格式不正确,请上传${this.fileType.join("/")}图片格式文件!`) return false } if (file.name.includes(',')) { this.$modal.msgError('文件名不正确,不能包含英文逗号!') return false } if (this.fileSize) { const isLt = file.size / 1024 / 1024 < this.fileSize if (!isLt) { this.$modal.msgError(`上传头像图片大小不能超过 ${this.fileSize} MB!`) return false } } this.$modal.loading("正在上传图片,请稍候...") this.number++ }, // 文件个数超出 handleExceed() { this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`) }, // 上传成功回调 handleUploadSuccess(res, file) { if (res.code === 200) { this.uploadList.push({ name: res.fileName, url: res.fileName }) this.uploadedSuccessfully() } else { this.number-- this.$modal.closeLoading() this.$modal.msgError(res.msg) this.$refs.imageUpload.handleRemove(file) this.uploadedSuccessfully() } }, // 删除图片 handleDelete(file) { const findex = this.fileList.map(f => f.name).indexOf(file.name) if (findex > -1) { this.fileList.splice(findex, 1) this.$emit("input", this.listToString(this.fileList)) } }, // 上传失败 handleUploadError() { this.$modal.msgError("上传图片失败,请重试") this.$modal.closeLoading() }, // 上传结束处理 uploadedSuccessfully() { if (this.number > 0 && this.uploadList.length === this.number) { this.fileList = this.fileList.concat(this.uploadList) this.uploadList = [] this.number = 0 this.$emit("input", this.listToString(this.fileList)) this.$modal.closeLoading() } }, // 预览 handlePictureCardPreview(file) { this.dialogImageUrl = file.url this.dialogVisible = true }, // 对象转成指定字符串分隔 listToString(list, separator) { let strs = "" separator = separator || "," for (let i in list) { if (list[i].url) { strs += list[i].url.replace(this.baseUrl, "") + separator } } return strs != '' ? strs.substr(0, strs.length - 1) : '' } } } </script> <style scoped lang="scss"> // .el-upload--picture-card 控制加号部分 ::v-deep.hide .el-upload--picture-card { display: none; } ::v-deep .el-upload-list--picture-card.is-disabled + .el-upload--picture-card { display: none !important; } // 去掉动画效果 ::v-deep .el-list-enter-active, ::v-deep .el-list-leave-active { transition: all 0s; } ::v-deep .el-list-enter, .el-list-leave-active { opacity: 0; transform: translateY(0); } </style>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/ImageUpload/index.vue
Vue
mit
7,434
<template> <div :class="{'hidden':hidden}" class="pagination-container"> <el-pagination :background="background" :current-page.sync="currentPage" :page-size.sync="pageSize" :layout="layout" :page-sizes="pageSizes" :pager-count="pagerCount" :total="total" v-bind="$attrs" @size-change="handleSizeChange" @current-change="handleCurrentChange" /> </div> </template> <script> import { scrollTo } from '@/utils/scroll-to' export default { name: 'Pagination', props: { total: { required: true, type: Number }, page: { type: Number, default: 1 }, limit: { type: Number, default: 20 }, pageSizes: { type: Array, default() { return [10, 20, 30, 50] } }, // 移动端页码按钮的数量端默认值5 pagerCount: { type: Number, default: document.body.clientWidth < 992 ? 5 : 7 }, layout: { type: String, default: 'total, sizes, prev, pager, next, jumper' }, background: { type: Boolean, default: true }, autoScroll: { type: Boolean, default: true }, hidden: { type: Boolean, default: false } }, data() { return { } }, computed: { currentPage: { get() { return this.page }, set(val) { this.$emit('update:page', val) } }, pageSize: { get() { return this.limit }, set(val) { this.$emit('update:limit', val) } } }, methods: { handleSizeChange(val) { if (this.currentPage * val > this.total) { this.currentPage = 1 } this.$emit('pagination', { page: this.currentPage, limit: val }) if (this.autoScroll) { scrollTo(0, 800) } }, handleCurrentChange(val) { this.$emit('pagination', { page: val, limit: this.pageSize }) if (this.autoScroll) { scrollTo(0, 800) } } } } </script> <style scoped> .pagination-container { background: #fff; } .pagination-container.hidden { display: none; } </style>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/Pagination/index.vue
Vue
mit
2,164
<template> <div :style="{zIndex:zIndex,height:height,width:width}" class="pan-item"> <div class="pan-info"> <div class="pan-info-roles-container"> <slot /> </div> </div> <div :style="{backgroundImage: `url(${image})`}" class="pan-thumb"></div> </div> </template> <script> export default { name: 'PanThumb', props: { image: { type: String, required: true }, zIndex: { type: Number, default: 1 }, width: { type: String, default: '150px' }, height: { type: String, default: '150px' } } } </script> <style scoped> .pan-item { width: 200px; height: 200px; border-radius: 50%; display: inline-block; position: relative; cursor: default; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); } .pan-info-roles-container { padding: 20px; text-align: center; } .pan-thumb { width: 100%; height: 100%; background-position: center center; background-size: cover; border-radius: 50%; overflow: hidden; position: absolute; transform-origin: 95% 40%; transition: all 0.3s ease-in-out; } /* .pan-thumb:after { content: ''; width: 8px; height: 8px; position: absolute; border-radius: 50%; top: 40%; left: 95%; margin: -4px 0 0 -4px; background: radial-gradient(ellipse at center, rgba(14, 14, 14, 1) 0%, rgba(125, 126, 125, 1) 100%); box-shadow: 0 0 1px rgba(255, 255, 255, 0.9); } */ .pan-info { position: absolute; width: inherit; height: inherit; border-radius: 50%; overflow: hidden; box-shadow: inset 0 0 0 5px rgba(0, 0, 0, 0.05); } .pan-info h3 { color: #fff; text-transform: uppercase; position: relative; letter-spacing: 2px; font-size: 18px; margin: 0 60px; padding: 22px 0 0 0; height: 85px; font-family: 'Open Sans', Arial, sans-serif; text-shadow: 0 0 1px #fff, 0 1px 2px rgba(0, 0, 0, 0.3); } .pan-info p { color: #fff; padding: 10px 5px; font-style: italic; margin: 0 30px; font-size: 12px; border-top: 1px solid rgba(255, 255, 255, 0.5); } .pan-info p a { display: block; color: #333; width: 80px; height: 80px; background: rgba(255, 255, 255, 0.3); border-radius: 50%; color: #fff; font-style: normal; font-weight: 700; text-transform: uppercase; font-size: 9px; letter-spacing: 1px; padding-top: 24px; margin: 7px auto 0; font-family: 'Open Sans', Arial, sans-serif; opacity: 0; transition: transform 0.3s ease-in-out 0.2s, opacity 0.3s ease-in-out 0.2s, background 0.2s linear 0s; transform: translateX(60px) rotate(90deg); } .pan-info p a:hover { background: rgba(255, 255, 255, 0.5); } .pan-item:hover .pan-thumb { transform: rotate(-110deg); } .pan-item:hover .pan-info p a { opacity: 1; transform: translateX(0px) rotate(0deg); } </style>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/PanThumb/index.vue
Vue
mit
2,812
<template > <router-view /> </template>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/ParentView/index.vue
Vue
mit
42
<template> <div class="top-right-btn" :style="style"> <el-row> <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top" v-if="search"> <el-button size="mini" circle icon="el-icon-search" @click="toggleSearch()" /> </el-tooltip> <el-tooltip class="item" effect="dark" content="刷新" placement="top"> <el-button size="mini" circle icon="el-icon-refresh" @click="refresh()" /> </el-tooltip> <el-tooltip class="item" effect="dark" content="显隐列" placement="top" v-if="columns"> <el-button size="mini" circle icon="el-icon-menu" @click="showColumn()" v-if="showColumnsType == 'transfer'"/> <el-dropdown trigger="click" :hide-on-click="false" style="padding-left: 12px" v-if="showColumnsType == 'checkbox'"> <el-button size="mini" circle icon="el-icon-menu" /> <el-dropdown-menu slot="dropdown"> <!-- 全选/反选 按钮 --> <el-dropdown-item> <el-checkbox :indeterminate="isIndeterminate" v-model="isChecked" @change="toggleCheckAll"> 列展示 </el-checkbox> </el-dropdown-item> <div class="check-line"></div> <template v-for="item in columns"> <el-dropdown-item :key="item.key"> <el-checkbox v-model="item.visible" @change="checkboxChange($event, item.label)" :label="item.label" /> </el-dropdown-item> </template> </el-dropdown-menu> </el-dropdown> </el-tooltip> </el-row> <el-dialog :title="title" :visible.sync="open" append-to-body> <el-transfer :titles="['显示', '隐藏']" v-model="value" :data="columns" @change="dataChange" ></el-transfer> </el-dialog> </div> </template> <script> export default { name: "RightToolbar", data() { return { // 显隐数据 value: [], // 弹出层标题 title: "显示/隐藏", // 是否显示弹出层 open: false } }, props: { /* 是否显示检索条件 */ showSearch: { type: Boolean, default: true }, /* 显隐列信息 */ columns: { type: Array }, /* 是否显示检索图标 */ search: { type: Boolean, default: true }, /* 显隐列类型(transfer穿梭框、checkbox复选框) */ showColumnsType: { type: String, default: "checkbox" }, /* 右外边距 */ gutter: { type: Number, default: 10 }, }, computed: { style() { const ret = {} if (this.gutter) { ret.marginRight = `${this.gutter / 2}px` } return ret }, isChecked: { get() { return this.columns.every((col) => col.visible) }, set() {} }, isIndeterminate() { return this.columns.some((col) => col.visible) && !this.isChecked } }, created() { if (this.showColumnsType == 'transfer') { // 显隐列初始默认隐藏列 for (let item in this.columns) { if (this.columns[item].visible === false) { this.value.push(parseInt(item)) } } } }, methods: { // 搜索 toggleSearch() { this.$emit("update:showSearch", !this.showSearch) }, // 刷新 refresh() { this.$emit("queryTable") }, // 右侧列表元素变化 dataChange(data) { for (let item in this.columns) { const key = this.columns[item].key this.columns[item].visible = !data.includes(key) } }, // 打开显隐列dialog showColumn() { this.open = true }, // 单勾选 checkboxChange(event, label) { this.columns.filter(item => item.label == label)[0].visible = event }, // 切换全选/反选 toggleCheckAll() { const newValue = !this.isChecked this.columns.forEach((col) => (col.visible = newValue)) } }, } </script> <style lang="scss" scoped> ::v-deep .el-transfer__button { border-radius: 50%; padding: 12px; display: block; margin-left: 0px; } ::v-deep .el-transfer__button:first-child { margin-bottom: 10px; } .check-line { width: 90%; height: 1px; background-color: #ccc; margin: 3px auto; } </style>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/RightToolbar/index.vue
Vue
mit
4,298
<template> <div> <svg-icon icon-class="question" @click="goto" /> </div> </template> <script> export default { name: 'RuoYiDoc', data() { return { url: 'http://doc.ruoyi.vip/ruoyi-vue' } }, methods: { goto() { window.open(this.url) } } } </script>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/RuoYi/Doc/index.vue
Vue
mit
294
<template> <div> <svg-icon icon-class="github" @click="goto" /> </div> </template> <script> export default { name: 'RuoYiGit', data() { return { url: 'https://gitee.com/y_project/RuoYi-Vue' } }, methods: { goto() { window.open(this.url) } } } </script>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/RuoYi/Git/index.vue
Vue
mit
299
<template> <div> <svg-icon :icon-class="isFullscreen?'exit-fullscreen':'fullscreen'" @click="click" /> </div> </template> <script> import screenfull from 'screenfull' export default { name: 'Screenfull', data() { return { isFullscreen: false } }, mounted() { this.init() }, beforeDestroy() { this.destroy() }, methods: { click() { if (!screenfull.isEnabled) { this.$message({ message: '你的浏览器不支持全屏', type: 'warning' }) return false } screenfull.toggle() }, change() { this.isFullscreen = screenfull.isFullscreen }, init() { if (screenfull.isEnabled) { screenfull.on('change', this.change) } }, destroy() { if (screenfull.isEnabled) { screenfull.off('change', this.change) } } } } </script> <style scoped> .screenfull-svg { display: inline-block; cursor: pointer; fill: #5a5e66;; width: 20px; height: 20px; vertical-align: 10px; } </style>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/Screenfull/index.vue
Vue
mit
1,033
<template> <el-dropdown trigger="click" @command="handleSetSize"> <div> <svg-icon class-name="size-icon" icon-class="size" /> </div> <el-dropdown-menu slot="dropdown"> <el-dropdown-item v-for="item of sizeOptions" :key="item.value" :disabled="size===item.value" :command="item.value"> {{ item.label }} </el-dropdown-item> </el-dropdown-menu> </el-dropdown> </template> <script> export default { data() { return { sizeOptions: [ { label: 'Default', value: 'default' }, { label: 'Medium', value: 'medium' }, { label: 'Small', value: 'small' }, { label: 'Mini', value: 'mini' } ] } }, computed: { size() { return this.$store.getters.size } }, methods: { handleSetSize(size) { this.$ELEMENT.size = size this.$store.dispatch('app/setSize', size) this.refreshView() this.$message({ message: 'Switch Size Success', type: 'success' }) }, refreshView() { // In order to make the cached page re-rendered this.$store.dispatch('tagsView/delAllCachedViews', this.$route) const { fullPath } = this.$route this.$nextTick(() => { this.$router.replace({ path: '/redirect' + fullPath }) }) } } } </script>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/SizeSelect/index.vue
Vue
mit
1,333
<template> <div v-if="isExternal" :style="styleExternalIcon" class="svg-external-icon svg-icon" v-on="$listeners" /> <svg v-else :class="svgClass" aria-hidden="true" v-on="$listeners"> <use :xlink:href="iconName" /> </svg> </template> <script> import { isExternal } from '@/utils/validate' export default { name: 'SvgIcon', props: { iconClass: { type: String, required: true }, className: { type: String, default: '' } }, computed: { isExternal() { return isExternal(this.iconClass) }, iconName() { return `#icon-${this.iconClass}` }, svgClass() { if (this.className) { return 'svg-icon ' + this.className } else { return 'svg-icon' } }, styleExternalIcon() { return { mask: `url(${this.iconClass}) no-repeat 50% 50%`, '-webkit-mask': `url(${this.iconClass}) no-repeat 50% 50%` } } } } </script> <style scoped> .svg-icon { width: 1em; height: 1em; vertical-align: -0.15em; fill: currentColor; overflow: hidden; } .svg-external-icon { background-color: currentColor; mask-size: cover!important; display: inline-block; } </style>
2302_81121971/tan
梁嘉文/9、源代码/ruoyi-ui/src/components/SvgIcon/index.vue
Vue
mit
1,214