diff --git a/API文档.txt b/API文档.txt new file mode 100644 index 0000000..7b45f58 --- /dev/null +++ b/API文档.txt @@ -0,0 +1,1176 @@ +======================================== +瑞来兹医助管理系统 - API接口文档 +======================================== + +一、基本信息 +----------- +项目名称:瑞来兹医助管理系统 +API版本:3.8.3 +基础路径:http://localhost:8039 +请求前缀:/dev-api(Swagger配置) +认证方式:JWT Token(Header: Authorization) +文档生成时间:2024年 + +二、通用说明 +----------- +1. 请求格式:JSON +2. 响应格式:JSON +3. 认证Token:在请求头中添加 Authorization: Bearer {token} +4. 分页参数:pageNum(页码)、pageSize(每页数量) +5. 统一响应格式: + { + "code": 200, // 状态码,200表示成功 + "msg": "操作成功", // 提示信息 + "data": {} // 返回数据 + } + +三、API接口列表 +----------- + +【1. 登录认证模块】 + +1.1 获取验证码 + URL: GET /captchaImage + 说明: 获取登录验证码图片 + 参数: 无 + 返回: { + "uuid": "验证码唯一标识", + "img": "Base64编码的图片", + "captchaOnOff": true/false + } + +1.2 用户登录 + URL: POST /login + 说明: 系统用户登录 + 参数: { + "username": "用户名", + "password": "密码", + "code": "验证码", + "uuid": "验证码UUID" + } + 返回: { + "token": "JWT令牌" + } + +1.3 APP登录 + URL: POST /appLogin + 说明: 移动端APP登录 + 参数: { + "username": "用户名", + "password": "密码" + } + 返回: { + "userId": "用户ID", + "userName": "用户名", + "nickName": "昵称", + "phonenumber": "手机号", + "headimage": "头像URL", + "leijijine": "累计收益", + "yue": "余额", + "token": "JWT令牌" + } + +1.4 短信登录 + URL: POST /smsLogin + 说明: 通过手机验证码登录 + 参数: { + "phoneNumber": "手机号", + "code": "验证码" + } + 返回: { + "userId": "用户ID", + "userName": "用户名", + "nickName": "昵称", + "phonenumber": "手机号", + "headimage": "头像URL", + "leijijine": "累计收益", + "yue": "余额", + "token": "JWT令牌" + } + +1.5 微信登录 + URL: POST /weixinLogin + 说明: 微信小程序登录 + 参数: { + "wxcode": "微信code", + "encryptedData": "加密数据", + "iv": "初始向量" + } + 返回: { + "userId": "用户ID", + "token": "JWT令牌", + "phoneNumber": "手机号" + } + +1.6 获取用户信息 + URL: GET /getInfo + 说明: 获取当前登录用户信息 + 认证: 需要Token + 返回: { + "user": "用户信息", + "roles": ["角色列表"], + "permissions": ["权限列表"] + } + +1.7 获取路由信息 + URL: GET /getRouters + 说明: 获取用户菜单路由 + 认证: 需要Token + 返回: 菜单路由树结构 + +1.8 获取用户Token + URL: GET /getUserToken + 说明: 根据用户信息获取Token + 参数: { + "phonenumber": "手机号" + } + 返回: { + "token": "JWT令牌", + "userId": "用户ID" + } + +1.9 用户注册 + URL: POST /register + 说明: 新用户注册 + 参数: { + "username": "用户名", + "password": "密码", + "phonenumber": "手机号", + ... + } + 返回: 注册结果 + +【2. 用户管理模块】 + +2.1 获取用户列表 + URL: GET /system/user/list + 说明: 分页查询用户列表 + 认证: 需要Token + 参数: { + "userName": "用户名(可选)", + "phonenumber": "手机号(可选)", + "status": "状态(可选)", + "pageNum": 1, + "pageSize": 10 + } + 返回: 分页用户列表 + +2.2 导出用户数据 + URL: POST /system/user/export + 说明: 导出用户数据为Excel + 认证: 需要Token + 参数: { + "userName": "用户名(可选)", + ... + } + 返回: Excel文件流 + +2.3 导入用户数据 + URL: POST /system/user/importData + 说明: 从Excel导入用户数据 + 认证: 需要Token + 参数: { + "file": "Excel文件", + "updateSupport": true/false + } + 返回: 导入结果 + +2.4 下载导入模板 + URL: POST /system/user/importTemplate + 说明: 下载用户导入模板 + 认证: 需要Token + 返回: Excel模板文件 + +2.5 获取用户详情 + URL: GET /system/user/{userId} + 说明: 根据用户ID获取用户详细信息 + 认证: 需要Token + 参数: userId(路径参数) + 返回: 用户详细信息 + +2.6 新增用户 + URL: POST /system/user + 说明: 新增用户 + 认证: 需要Token + 参数: { + "userName": "用户名", + "nickName": "昵称", + "email": "邮箱", + "phonenumber": "手机号", + "sex": "性别", + "password": "密码", + "deptId": "部门ID", + "postIds": [岗位ID数组], + "roleIds": [角色ID数组] + } + 返回: 操作结果 + +2.7 修改用户 + URL: PUT /system/user + 说明: 修改用户信息 + 认证: 需要Token + 参数: { + "userId": "用户ID", + "userName": "用户名", + ... + } + 返回: 操作结果 + +2.8 完善用户信息 + URL: POST /system/user/perfectUserInfo + 说明: 完善用户详细信息 + 认证: 需要Token + 参数: 用户信息对象 + 返回: 操作结果 + +2.9 删除用户 + URL: DELETE /system/user/{userIds} + 说明: 批量删除用户 + 认证: 需要Token + 参数: userIds(路径参数,多个用逗号分隔) + 返回: 操作结果 + +2.10 重置密码 + URL: PUT /system/user/resetPwd + 说明: 重置用户密码 + 认证: 需要Token + 参数: { + "userId": "用户ID", + "password": "新密码" + } + 返回: 操作结果 + +2.11 注销用户 + URL: POST /system/user/zhuxiao + 说明: 注销用户账号 + 认证: 需要Token + 参数: { + "userId": "用户ID" + } + 返回: 操作结果 + +2.12 修改用户状态 + URL: PUT /system/user/changeStatus + 说明: 修改用户启用/禁用状态 + 认证: 需要Token + 参数: { + "userId": "用户ID", + "status": "0正常/1停用" + } + 返回: 操作结果 + +2.13 分配角色 + URL: GET /system/user/authRole/{userId} + 说明: 获取用户角色分配信息 + 认证: 需要Token + 参数: userId(路径参数) + 返回: 角色分配信息 + +2.14 保存角色分配 + URL: PUT /system/user/authRole + 说明: 保存用户角色分配 + 认证: 需要Token + 参数: { + "userId": "用户ID", + "roleIds": [角色ID数组] + } + 返回: 操作结果 + +2.15 获取认证Token + URL: GET /system/user/getAuthToken + 说明: 获取用户认证Token + 认证: 需要Token + 返回: Token信息 + +2.16 获取APP用户信息 + URL: GET /system/user/getAppUserInfo + 说明: 获取移动端用户信息 + 认证: 需要Token + 返回: 用户详细信息 + +2.17 获取APP首页信息 + URL: GET /system/user/getAppIndexInfo + 说明: 获取移动端首页数据 + 认证: 需要Token + 返回: 首页数据 + +【3. 角色管理模块】 + +3.1 获取角色列表 + URL: GET /system/role/list + 说明: 分页查询角色列表 + 认证: 需要Token + 参数: { + "roleName": "角色名称(可选)", + "status": "状态(可选)", + "pageNum": 1, + "pageSize": 10 + } + 返回: 分页角色列表 + +3.2 导出角色数据 + URL: POST /system/role/export + 说明: 导出角色数据为Excel + 认证: 需要Token + 返回: Excel文件流 + +3.3 获取角色详情 + URL: GET /system/role/{roleId} + 说明: 根据角色ID获取详细信息 + 认证: 需要Token + 参数: roleId(路径参数) + 返回: 角色详细信息 + +3.4 新增角色 + URL: POST /system/role + 说明: 新增角色 + 认证: 需要Token + 参数: { + "roleName": "角色名称", + "roleKey": "角色权限", + "roleSort": "显示顺序", + "status": "状态", + "menuIds": [菜单ID数组], + "remark": "备注" + } + 返回: 操作结果 + +3.5 修改角色 + URL: PUT /system/role + 说明: 修改角色信息 + 认证: 需要Token + 参数: 角色信息对象 + 返回: 操作结果 + +3.6 数据权限分配 + URL: PUT /system/role/dataScope + 说明: 分配角色数据权限 + 认证: 需要Token + 参数: { + "roleId": "角色ID", + "dataScope": "数据范围", + "deptIds": [部门ID数组] + } + 返回: 操作结果 + +3.7 修改角色状态 + URL: PUT /system/role/changeStatus + 说明: 修改角色启用/禁用状态 + 认证: 需要Token + 参数: { + "roleId": "角色ID", + "status": "0正常/1停用" + } + 返回: 操作结果 + +3.8 删除角色 + URL: DELETE /system/role/{roleIds} + 说明: 批量删除角色 + 认证: 需要Token + 参数: roleIds(路径参数,多个用逗号分隔) + 返回: 操作结果 + +3.9 获取角色选项 + URL: GET /system/role/optionselect + 说明: 获取角色下拉选项 + 认证: 需要Token + 返回: 角色选项列表 + +3.10 查询已分配用户 + URL: GET /system/role/authUser/allocatedList + 说明: 查询已分配角色的用户列表 + 认证: 需要Token + 参数: { + "roleId": "角色ID", + "userName": "用户名(可选)", + "pageNum": 1, + "pageSize": 10 + } + 返回: 用户列表 + +3.11 查询未分配用户 + URL: GET /system/role/authUser/unallocatedList + 说明: 查询未分配角色的用户列表 + 认证: 需要Token + 参数: { + "roleId": "角色ID", + "userName": "用户名(可选)", + "pageNum": 1, + "pageSize": 10 + } + 返回: 用户列表 + +3.12 取消用户授权 + URL: PUT /system/role/authUser/cancel + 说明: 取消用户角色授权 + 认证: 需要Token + 参数: { + "roleId": "角色ID", + "userId": "用户ID" + } + 返回: 操作结果 + +3.13 批量取消授权 + URL: PUT /system/role/authUser/cancelAll + 说明: 批量取消用户角色授权 + 认证: 需要Token + 参数: { + "roleId": "角色ID", + "userIds": "用户ID字符串,逗号分隔" + } + 返回: 操作结果 + +3.14 批量选择授权 + URL: PUT /system/role/authUser/selectAll + 说明: 批量选择用户授权 + 认证: 需要Token + 参数: { + "roleId": "角色ID", + "userIds": "用户ID字符串,逗号分隔" + } + 返回: 操作结果 + +【4. 菜单管理模块】 + +4.1 获取菜单列表 + URL: GET /system/menu/list + 说明: 获取菜单列表 + 认证: 需要Token + 参数: { + "menuName": "菜单名称(可选)", + "status": "状态(可选)" + } + 返回: 菜单列表 + +4.2 获取菜单详情 + URL: GET /system/menu/{menuId} + 说明: 根据菜单ID获取详细信息 + 认证: 需要Token + 参数: menuId(路径参数) + 返回: 菜单详细信息 + +4.3 获取菜单树 + URL: GET /system/menu/treeselect + 说明: 获取菜单下拉树列表 + 认证: 需要Token + 返回: 菜单树结构 + +4.4 获取角色菜单树 + URL: GET /system/menu/roleMenuTreeselect/{roleId} + 说明: 加载对应角色菜单列表树 + 认证: 需要Token + 参数: roleId(路径参数) + 返回: { + "menus": "菜单树", + "checkedKeys": [已选中的菜单ID数组] + } + +4.5 新增菜单 + URL: POST /system/menu + 说明: 新增菜单 + 认证: 需要Token + 参数: { + "menuName": "菜单名称", + "parentId": "父菜单ID", + "orderNum": "显示顺序", + "path": "路由地址", + "component": "组件路径", + "menuType": "菜单类型", + "visible": "是否显示", + "perms": "权限标识", + "icon": "菜单图标", + ... + } + 返回: 操作结果 + +4.6 修改菜单 + URL: PUT /system/menu + 说明: 修改菜单信息 + 认证: 需要Token + 参数: 菜单信息对象 + 返回: 操作结果 + +4.7 删除菜单 + URL: DELETE /system/menu/{menuId} + 说明: 删除菜单 + 认证: 需要Token + 参数: menuId(路径参数) + 返回: 操作结果 + +【5. 部门管理模块】 + +5.1 获取部门列表 + URL: GET /system/dept/list + 说明: 获取部门列表 + 认证: 需要Token + 参数: { + "deptName": "部门名称(可选)", + "status": "状态(可选)" + } + 返回: 部门列表 + +5.2 排除指定部门 + URL: GET /system/dept/list/exclude/{deptId} + 说明: 获取部门列表(排除指定部门) + 认证: 需要Token + 参数: deptId(路径参数) + 返回: 部门列表 + +5.3 获取部门详情 + URL: GET /system/dept/{deptId} + 说明: 根据部门ID获取详细信息 + 认证: 需要Token + 参数: deptId(路径参数) + 返回: 部门详细信息 + +5.4 获取部门树 + URL: GET /system/dept/treeselect + 说明: 获取部门下拉树列表 + 认证: 需要Token + 返回: 部门树结构 + +5.5 获取角色部门树 + URL: GET /system/dept/roleDeptTreeselect/{roleId} + 说明: 加载对应角色部门列表树 + 认证: 需要Token + 参数: roleId(路径参数) + 返回: { + "depts": "部门树", + "checkedKeys": [已选中的部门ID数组] + } + +5.6 新增部门 + URL: POST /system/dept + 说明: 新增部门 + 认证: 需要Token + 参数: { + "parentId": "父部门ID", + "deptName": "部门名称", + "orderNum": "显示顺序", + "leader": "负责人", + "phone": "联系电话", + "email": "邮箱", + "status": "状态" + } + 返回: 操作结果 + +5.7 修改部门 + URL: PUT /system/dept + 说明: 修改部门信息 + 认证: 需要Token + 参数: 部门信息对象 + 返回: 操作结果 + +5.8 删除部门 + URL: DELETE /system/dept/{deptId} + 说明: 删除部门 + 认证: 需要Token + 参数: deptId(路径参数) + 返回: 操作结果 + +【6. 岗位管理模块】 + +6.1 获取岗位列表 + URL: GET /system/post/list + 说明: 分页查询岗位列表 + 认证: 需要Token + 参数: { + "postName": "岗位名称(可选)", + "postCode": "岗位编码(可选)", + "status": "状态(可选)", + "pageNum": 1, + "pageSize": 10 + } + 返回: 分页岗位列表 + +6.2 导出岗位数据 + URL: POST /system/post/export + 说明: 导出岗位数据为Excel + 认证: 需要Token + 返回: Excel文件流 + +6.3 获取岗位详情 + URL: GET /system/post/{postId} + 说明: 根据岗位ID获取详细信息 + 认证: 需要Token + 参数: postId(路径参数) + 返回: 岗位详细信息 + +6.4 新增岗位 + URL: POST /system/post + 说明: 新增岗位 + 认证: 需要Token + 参数: { + "postCode": "岗位编码", + "postName": "岗位名称", + "postSort": "显示顺序", + "status": "状态", + "remark": "备注" + } + 返回: 操作结果 + +6.5 修改岗位 + URL: PUT /system/post + 说明: 修改岗位信息 + 认证: 需要Token + 参数: 岗位信息对象 + 返回: 操作结果 + +6.6 删除岗位 + URL: DELETE /system/post/{postIds} + 说明: 批量删除岗位 + 认证: 需要Token + 参数: postIds(路径参数,多个用逗号分隔) + 返回: 操作结果 + +6.7 获取岗位选项 + URL: GET /system/post/optionselect + 说明: 获取岗位下拉选项 + 认证: 需要Token + 返回: 岗位选项列表 + +【7. 字典管理模块】 + +7.1 字典类型列表 + URL: GET /system/dict/type/list + 说明: 分页查询字典类型列表 + 认证: 需要Token + 参数: { + "dictName": "字典名称(可选)", + "status": "状态(可选)", + "pageNum": 1, + "pageSize": 10 + } + 返回: 分页字典类型列表 + +7.2 导出字典类型 + URL: POST /system/dict/type/export + 说明: 导出字典类型数据 + 认证: 需要Token + 返回: Excel文件流 + +7.3 获取字典类型详情 + URL: GET /system/dict/type/{dictId} + 说明: 根据字典类型ID获取详细信息 + 认证: 需要Token + 参数: dictId(路径参数) + 返回: 字典类型详细信息 + +7.4 新增字典类型 + URL: POST /system/dict/type + 说明: 新增字典类型 + 认证: 需要Token + 参数: { + "dictName": "字典名称", + "dictType": "字典类型", + "status": "状态", + "remark": "备注" + } + 返回: 操作结果 + +7.5 修改字典类型 + URL: PUT /system/dict/type + 说明: 修改字典类型 + 认证: 需要Token + 参数: 字典类型信息对象 + 返回: 操作结果 + +7.6 删除字典类型 + URL: DELETE /system/dict/type/{dictIds} + 说明: 批量删除字典类型 + 认证: 需要Token + 参数: dictIds(路径参数,多个用逗号分隔) + 返回: 操作结果 + +7.7 刷新字典缓存 + URL: DELETE /system/dict/type/refreshCache + 说明: 刷新字典缓存 + 认证: 需要Token + 返回: 操作结果 + +7.8 获取字典类型选项 + URL: GET /system/dict/type/optionselect + 说明: 获取字典类型下拉选项 + 认证: 需要Token + 返回: 字典类型选项列表 + +7.9 字典数据列表 + URL: GET /system/dict/data/list + 说明: 分页查询字典数据列表 + 认证: 需要Token + 参数: { + "dictType": "字典类型(可选)", + "dictLabel": "字典标签(可选)", + "status": "状态(可选)", + "pageNum": 1, + "pageSize": 10 + } + 返回: 分页字典数据列表 + +7.10 导出字典数据 + URL: POST /system/dict/data/export + 说明: 导出字典数据 + 认证: 需要Token + 返回: Excel文件流 + +7.11 获取字典数据详情 + URL: GET /system/dict/data/{dictCode} + 说明: 根据字典数据编码获取详细信息 + 认证: 需要Token + 参数: dictCode(路径参数) + 返回: 字典数据详细信息 + +7.12 根据字典类型获取数据 + URL: GET /system/dict/data/type/{dictType} + 说明: 根据字典类型获取字典数据 + 认证: 需要Token + 参数: dictType(路径参数) + 返回: 字典数据列表 + +7.13 新增字典数据 + URL: POST /system/dict/data + 说明: 新增字典数据 + 认证: 需要Token + 参数: { + "dictSort": "字典排序", + "dictLabel": "字典标签", + "dictValue": "字典键值", + "dictType": "字典类型", + "cssClass": "样式属性", + "listClass": "表格回显样式", + "isDefault": "是否默认", + "status": "状态", + "remark": "备注" + } + 返回: 操作结果 + +7.14 修改字典数据 + URL: PUT /system/dict/data + 说明: 修改字典数据 + 认证: 需要Token + 参数: 字典数据信息对象 + 返回: 操作结果 + +7.15 删除字典数据 + URL: DELETE /system/dict/data/{dictCodes} + 说明: 批量删除字典数据 + 认证: 需要Token + 参数: dictCodes(路径参数,多个用逗号分隔) + 返回: 操作结果 + +【8. 参数配置模块】 + +8.1 获取参数列表 + URL: GET /system/config/list + 说明: 分页查询参数配置列表 + 认证: 需要Token + 参数: { + "configName": "参数名称(可选)", + "configKey": "参数键名(可选)", + "configType": "系统内置(可选)", + "pageNum": 1, + "pageSize": 10 + } + 返回: 分页参数列表 + +8.2 导出参数配置 + URL: POST /system/config/export + 说明: 导出参数配置数据 + 认证: 需要Token + 返回: Excel文件流 + +8.3 获取参数详情 + URL: GET /system/config/{configId} + 说明: 根据参数ID获取详细信息 + 认证: 需要Token + 参数: configId(路径参数) + 返回: 参数详细信息 + +8.4 根据参数键名获取值 + URL: GET /system/config/configKey/{configKey} + 说明: 根据参数键名获取参数值 + 认证: 需要Token + 参数: configKey(路径参数) + 返回: 参数值 + +8.5 新增参数配置 + URL: POST /system/config + 说明: 新增参数配置 + 认证: 需要Token + 参数: { + "configName": "参数名称", + "configKey": "参数键名", + "configValue": "参数键值", + "configType": "系统内置(Y是 N否)", + "remark": "备注" + } + 返回: 操作结果 + +8.6 修改参数配置 + URL: PUT /system/config + 说明: 修改参数配置 + 认证: 需要Token + 参数: 参数配置信息对象 + 返回: 操作结果 + +8.7 删除参数配置 + URL: DELETE /system/config/{configIds} + 说明: 批量删除参数配置 + 认证: 需要Token + 参数: configIds(路径参数,多个用逗号分隔) + 返回: 操作结果 + +8.8 刷新参数缓存 + URL: DELETE /system/config/refreshCache + 说明: 刷新参数缓存 + 认证: 需要Token + 返回: 操作结果 + +【9. 通知公告模块】 + +9.1 获取通知公告列表 + URL: GET /system/notice/list + 说明: 分页查询通知公告列表 + 认证: 需要Token + 参数: { + "noticeTitle": "公告标题(可选)", + "noticeType": "公告类型(可选)", + "pageNum": 1, + "pageSize": 10 + } + 返回: 分页通知公告列表 + +9.2 获取通知公告详情 + URL: GET /system/notice/{noticeId} + 说明: 根据公告ID获取详细信息 + 认证: 需要Token + 参数: noticeId(路径参数) + 返回: 通知公告详细信息 + +9.3 新增通知公告 + URL: POST /system/notice + 说明: 新增通知公告 + 认证: 需要Token + 参数: { + "noticeTitle": "公告标题", + "noticeType": "公告类型(1通知 2公告)", + "noticeContent": "公告内容", + "status": "状态(0正常 1关闭)" + } + 返回: 操作结果 + +9.4 修改通知公告 + URL: PUT /system/notice + 说明: 修改通知公告 + 认证: 需要Token + 参数: 通知公告信息对象 + 返回: 操作结果 + +9.5 删除通知公告 + URL: DELETE /system/notice/{noticeIds} + 说明: 批量删除通知公告 + 认证: 需要Token + 参数: noticeIds(路径参数,多个用逗号分隔) + 返回: 操作结果 + +【10. 操作日志模块】 + +10.1 获取操作日志列表 + URL: GET /monitor/operlog/list + 说明: 分页查询操作日志列表 + 认证: 需要Token + 参数: { + "title": "操作模块(可选)", + "businessType": "业务类型(可选)", + "status": "操作状态(可选)", + "pageNum": 1, + "pageSize": 10 + } + 返回: 分页操作日志列表 + +10.2 导出操作日志 + URL: POST /monitor/operlog/export + 说明: 导出操作日志数据 + 认证: 需要Token + 返回: Excel文件流 + +10.3 删除操作日志 + URL: DELETE /monitor/operlog/{operIds} + 说明: 批量删除操作日志 + 认证: 需要Token + 参数: operIds(路径参数,多个用逗号分隔) + 返回: 操作结果 + +10.4 清空操作日志 + URL: DELETE /monitor/operlog/clean + 说明: 清空操作日志 + 认证: 需要Token + 返回: 操作结果 + +【11. 登录日志模块】 + +11.1 获取登录日志列表 + URL: GET /monitor/logininfor/list + 说明: 分页查询登录日志列表 + 认证: 需要Token + 参数: { + "userName": "用户名(可选)", + "status": "状态(可选)", + "pageNum": 1, + "pageSize": 10 + } + 返回: 分页登录日志列表 + +11.2 导出登录日志 + URL: POST /monitor/logininfor/export + 说明: 导出登录日志数据 + 认证: 需要Token + 返回: Excel文件流 + +11.3 删除登录日志 + URL: DELETE /monitor/logininfor/{infoIds} + 说明: 批量删除登录日志 + 认证: 需要Token + 参数: infoIds(路径参数,多个用逗号分隔) + 返回: 操作结果 + +11.4 清空登录日志 + URL: DELETE /monitor/logininfor/clean + 说明: 清空登录日志 + 认证: 需要Token + 返回: 操作结果 + +【12. 在线用户模块】 + +12.1 获取在线用户列表 + URL: GET /monitor/online/list + 说明: 分页查询在线用户列表 + 认证: 需要Token + 参数: { + "ipaddr": "登录地址(可选)", + "userName": "用户名(可选)", + "pageNum": 1, + "pageSize": 10 + } + 返回: 分页在线用户列表 + +12.2 强退用户 + URL: DELETE /monitor/online/{tokenId} + 说明: 强退指定在线用户 + 认证: 需要Token + 参数: tokenId(路径参数) + 返回: 操作结果 + +【13. 服务监控模块】 + +13.1 获取服务器信息 + URL: GET /monitor/server + 说明: 获取服务器监控信息 + 认证: 需要Token + 返回: { + "cpu": "CPU信息", + "mem": "内存信息", + "sys": "系统信息", + "jvm": "JVM信息", + "sysFiles": "磁盘信息" + } + +【14. 缓存监控模块】 + +14.1 获取缓存信息 + URL: GET /monitor/cache + 说明: 获取缓存监控信息 + 认证: 需要Token + 返回: 缓存信息 + +14.2 获取缓存名称列表 + URL: GET /monitor/cache/getNames + 说明: 获取缓存名称列表 + 认证: 需要Token + 返回: 缓存名称列表 + +14.3 获取缓存键名列表 + URL: GET /monitor/cache/getKeys/{cacheName} + 说明: 获取指定缓存名称的键名列表 + 认证: 需要Token + 参数: cacheName(路径参数) + 返回: 缓存键名列表 + +14.4 获取缓存值 + URL: GET /monitor/cache/getValue/{cacheName}/{cacheKey} + 说明: 获取指定缓存的值 + 认证: 需要Token + 参数: { + cacheName: "缓存名称", + cacheKey: "缓存键名" + } + 返回: 缓存值 + +14.5 清除指定名称缓存 + URL: DELETE /monitor/cache/clearCacheName/{cacheName} + 说明: 清除指定名称的缓存 + 认证: 需要Token + 参数: cacheName(路径参数) + 返回: 操作结果 + +14.6 清除指定键名缓存 + URL: DELETE /monitor/cache/clearCacheKey/{cacheKey} + 说明: 清除指定键名的缓存 + 认证: 需要Token + 参数: cacheKey(路径参数) + 返回: 操作结果 + +14.7 清除全部缓存 + URL: DELETE /monitor/cache/clearCacheAll + 说明: 清除全部缓存 + 认证: 需要Token + 返回: 操作结果 + +【15. 通用功能模块】 + +15.1 文件下载 + URL: GET /common/download + 说明: 通用文件下载 + 认证: 需要Token + 参数: { + "fileName": "文件名称", + "delete": true/false // 是否删除文件 + } + 返回: 文件流 + +15.2 文件上传(单个) + URL: POST /common/upload + 说明: 通用文件上传(单个文件) + 认证: 需要Token + 参数: { + "file": "文件对象" + } + 返回: { + "url": "文件访问URL", + "fileName": "文件名称", + "newFileName": "新文件名称", + "originalFilename": "原始文件名" + } + +15.3 文件上传(多个) + URL: POST /common/uploads + 说明: 通用文件上传(多个文件) + 认证: 需要Token + 参数: { + "files": "文件数组" + } + 返回: 文件信息数组 + +15.4 下载资源文件 + URL: GET /common/download/resource + 说明: 下载资源文件 + 认证: 需要Token + 参数: { + "resource": "资源路径" + } + 返回: 文件流 + +【16. 个人中心模块】 + +16.1 获取个人信息 + URL: GET /system/user/profile + 说明: 获取当前登录用户的个人信息 + 认证: 需要Token + 返回: 用户详细信息 + +16.2 修改个人信息 + URL: PUT /system/user/profile + 说明: 修改个人信息 + 认证: 需要Token + 参数: { + "nickName": "昵称", + "email": "邮箱", + "phonenumber": "手机号", + "sex": "性别" + } + 返回: 操作结果 + +16.3 修改密码 + URL: PUT /system/user/profile/updatePwd + 说明: 修改用户密码 + 认证: 需要Token + 参数: { + "oldPassword": "旧密码", + "newPassword": "新密码" + } + 返回: 操作结果 + +16.4 上传头像 + URL: POST /system/user/profile/avatar + 说明: 上传用户头像 + 认证: 需要Token + 参数: { + "avatarfile": "头像文件" + } + 返回: 操作结果 + +【17. 微信支付模块】 + +17.1 微信支付查询 + URL: GET /system/weixinPayAAA/{orderId} + 说明: 查询微信支付订单 + 认证: 需要Token + 参数: orderId(路径参数) + 返回: 支付信息 + +17.2 微信支付回调 + URL: POST /system/weixinBBBBB/wxPayNotify + 说明: 微信支付回调通知 + 认证: 无需Token(微信服务器回调) + 参数: 微信回调数据 + 返回: 处理结果 + +17.3 微信支付(新) + URL: GET /system/weixinPayNewBBBB/{orderId} + 说明: 创建微信支付订单 + 认证: 需要Token + 参数: orderId(路径参数) + 返回: 支付信息 + +【18. 系统首页模块】 + +18.1 系统首页 + URL: GET / + 说明: 系统首页 + 返回: 欢迎信息 + +【19. Swagger文档模块】 + +19.1 访问Swagger UI + URL: GET /tool/swagger + 说明: 跳转到Swagger API文档页面 + 认证: 需要Token + 返回: Swagger UI页面 + +四、状态码说明 +----------- +200: 操作成功 +401: 未授权,需要登录 +403: 无权限访问 +500: 服务器内部错误 + +五、注意事项 +----------- +1. 所有需要认证的接口都需要在请求头中添加:Authorization: Bearer {token} +2. Token通过登录接口获取,有效期为30分钟 +3. 文件上传使用multipart/form-data格式 +4. 分页参数pageNum从1开始 +5. 删除操作支持批量删除,多个ID用逗号分隔 +6. 所有时间格式为:yyyy-MM-dd HH:mm:ss +7. 状态值:0表示正常/启用,1表示停用/禁用 + +六、Swagger文档访问 +----------- +Swagger UI地址:http://localhost:8039/swagger-ui.html +API文档地址:http://localhost:8039/dev-api/v3/api-docs +(需要先登录获取Token后访问) + +======================================== +文档版本:v1.0 +最后更新:2024年 +======================================== diff --git a/API测试说明.txt b/API测试说明.txt new file mode 100644 index 0000000..604c570 --- /dev/null +++ b/API测试说明.txt @@ -0,0 +1,123 @@ +======================================== +API接口测试脚本使用说明 +======================================== + +一、脚本文件 +----------- +1. test_api.sh - Bash版本测试脚本 +2. test_api.py - Python版本测试脚本(推荐使用) + +二、使用方法 +----------- + +【方法1:使用Python脚本(推荐)】 +cd /home/renjianbo/saars/rlz +python3 test_api.py + +【方法2:使用Bash脚本】 +cd /home/renjianbo/saars/rlz +bash test_api.sh + +三、测试内容 +----------- +脚本会自动测试以下接口: + +1. 基础接口(无需认证) + - 首页接口: GET / + - 验证码接口: GET /captchaImage + +2. 登录相关接口 + - 微信登录接口: POST /weixinLogin + - 获取用户Token接口: GET /getUserToken + +3. 系统配置接口(需要认证) + - 价格配置接口: GET /system/config/configKey/price + - 价格类型配置接口: GET /system/config/configKey/priceType + +4. 业务接口(需要认证) + - 医院列表接口: GET /system/hospital/list + - 订单列表接口: GET /system/view/list + - 创建订单接口: POST /system/order/insertOrderPz + - 用户列表接口: GET /system/user/list + - 获取用户信息接口: GET /getInfo + +四、测试结果说明 +--------------- +- HTTP 200: 接口正常,请求成功 +- HTTP 401: 接口存在,但需要有效Token认证 +- HTTP 403: 接口存在,但无权限访问 +- HTTP 500: 接口存在,但业务逻辑错误(如参数不正确) +- HTTP 0: 无法连接到服务器(网络问题或服务未启动) + +五、注意事项 +----------- +1. 脚本会自动检测服务器地址 + - 优先尝试公网地址: http://101.43.95.130:8039 + - 如果无法访问,自动切换到本地地址: http://localhost:8039 + +2. 需要认证的接口使用测试Token + - 实际测试中会返回401/403,这表示接口存在但需要有效Token + - 这是正常现象,说明接口可以访问 + +3. 部分接口需要真实参数才能返回200 + - 微信登录需要真实的微信code + - 创建订单需要完整的订单信息 + - 这些接口返回500是正常的,说明接口存在 + +4. 确保后端服务已启动 + - 检查服务是否在8039端口运行 + - 检查数据库连接是否正常 + - 检查Redis服务是否运行 + +六、修改服务器地址 +--------------- +如果需要修改测试的服务器地址,可以编辑脚本文件: + +【Python脚本】 +修改 test_api.py 文件中的: +SERVER_URL = "http://your-server-ip:port" + +【Bash脚本】 +修改 test_api.sh 文件中的: +SERVER_URL="http://your-server-ip:port" + +七、依赖要求 +----------- +【Python脚本】 +- Python 3.6+ +- requests库(pip install requests) + +【Bash脚本】 +- curl命令 +- bash shell + +八、输出示例 +----------- +============================================================ +陪诊系统后台API接口测试 +============================================================ +服务器地址: http://localhost:8039 +开始时间: 2026-01-25 20:39:32 + +------------------------------------------------------------ +1. 基础接口测试(无需认证) +------------------------------------------------------------ +测试 1: 首页接口 ... ✓ 通过 + HTTP状态码: 200 + +测试 2: 验证码接口 ... ✓ 通过 + HTTP状态码: 200 + 响应码: 200 + 消息: 操作成功 + +... + +============================================================ +测试结果统计 +============================================================ +总测试数: 11 +通过: 11 +失败: 0 +通过率: 100% + +======================================== diff --git a/Android接口配置快速参考.txt b/Android接口配置快速参考.txt new file mode 100644 index 0000000..b1ab4ad --- /dev/null +++ b/Android接口配置快速参考.txt @@ -0,0 +1,37 @@ +======================================== +Android应用接口配置 - 快速参考 +======================================== + +一、服务器地址 +------------- +公网地址: http://101.43.95.130:8039 + +二、已修改的文件 +--------------- +1. peizhen/app/src/main/java/com/ruilaizi/service/okgonet/HttpConstants.java + URiBase = "http://101.43.95.130:8039" + +2. peizhen/app/src/main/java/com/ruilaizi/service/network/http/MyApi.java + URiBase = "http://101.43.95.130:8039" + +三、配置检查清单 +--------------- +✓ HTTP地址已配置 +✓ 网络安全配置已允许HTTP (network_security_config.xml) +✓ INTERNET权限已配置 (AndroidManifest.xml) +✓ networkSecurityConfig已引用 + +四、编译运行 +----------- +1. Android Studio打开peizhen项目 +2. Sync Gradle +3. Build → Make Project +4. Run应用 +5. 测试登录功能验证接口连接 + +五、验证方法 +----------- +查看Logcat中的网络请求,确认URL为: +http://101.43.95.130:8039/... + +======================================== diff --git a/Android接口配置说明.txt b/Android接口配置说明.txt new file mode 100644 index 0000000..6e319d4 --- /dev/null +++ b/Android接口配置说明.txt @@ -0,0 +1,214 @@ +======================================== +Android应用配置公网接口说明 +======================================== + +一、已修改的配置文件 +------------------- + +【1. HttpConstants.java】 +文件路径: peizhen/app/src/main/java/com/ruilaizi/service/okgonet/HttpConstants.java + +修改前: + public static String URiBase = "https://ruilaizipj.com";//线上服务器 + +修改后: + public static String URiBase = "http://101.43.95.130:8039";//公网服务器地址 + +说明: +- 这是主要的HTTP常量配置类 +- 所有使用 HttpConstants.URiBase 的接口都会使用新地址 +- 包括登录、订单、用户信息等所有接口 + +【2. MyApi.java】 +文件路径: peizhen/app/src/main/java/com/ruilaizi/service/network/http/MyApi.java + +修改前: + public static String URiBase = "http://chengjie.free.idcfengye.com"; + +修改后: + public static String URiBase = "http://101.43.95.130:8039";//公网服务器地址 + +说明: +- Retrofit网络请求的基础URL配置 +- 所有通过Retrofit发送的请求都会使用此地址 + +【3. API.java】 +文件路径: peizhen/app/src/main/java/com/ruilaizi/service/main/activity/common/http/api/API.java + +说明: +- 该类使用 HttpConstants.URiBase +- 会自动使用新配置的地址,无需修改 + +二、网络安全配置检查 +------------------- + +【1. network_security_config.xml】 +文件路径: peizhen/app/src/main/res/xml/network_security_config.xml + +当前配置: + + + + + +状态: ✓ 已配置,允许HTTP明文传输 + +【2. AndroidManifest.xml】 +文件路径: peizhen/app/src/main/AndroidManifest.xml + +检查项: +- ✓ INTERNET权限已配置 +- ✓ networkSecurityConfig已引用: android:networkSecurityConfig="@xml/network_security_config" + +状态: ✓ 配置正确 + +三、使用的接口地址 +----------------- + +所有网络请求现在会使用以下地址: +- 基础地址: http://101.43.95.130:8039 + +主要接口示例: +- 登录: http://101.43.95.130:8039/appLogin +- 短信登录: http://101.43.95.130:8039/smsLogin +- 获取个人信息: http://101.43.95.130:8039/system/user/getAppUserInfo +- 订单列表: http://101.43.95.130:8039/system/view/list +- 待接订单: http://101.43.95.130:8039/system/view/receiveOrderList +- 确认接单: http://101.43.95.130:8039/system/view/acceptOrderYes +- 拒绝接单: http://101.43.95.130:8039/system/view/acceptOrderNo +- 开始服务: http://101.43.95.130:8039/system/view/startServiceWithOrder +- 完成服务: http://101.43.95.130:8039/system/view/completeOrder +- 实名认证: http://101.43.95.130:8039/system/renzheng +- 上传图片: http://101.43.95.130:8039/system/oss/uploadMinioBase64 +- 完善用户信息: http://101.43.95.130:8039/system/user/perfectUserInfo + +四、编译和运行步骤 +----------------- + +1. 打开Android Studio + - 打开项目: peizhen目录 + +2. 同步Gradle + - 点击 "Sync Project with Gradle Files" + - 等待依赖下载完成 + +3. 编译项目 + - Build → Make Project + - 或使用快捷键 Ctrl+F9 (Windows) / Cmd+F9 (Mac) + +4. 运行应用 + - 连接Android设备或启动模拟器 + - 点击 Run 按钮 + - 或使用快捷键 Shift+F10 + +5. 测试接口 + - 打开应用 + - 尝试登录功能 + - 查看Logcat中的网络请求日志 + - 确认请求地址为: http://101.43.95.130:8039/... + +五、验证配置是否生效 +------------------- + +【方法1:查看Logcat日志】 +1. 在Android Studio中打开Logcat +2. 过滤标签: OkHttp 或 Retrofit +3. 运行应用并执行网络请求 +4. 查看请求URL是否为: http://101.43.95.130:8039/... + +【方法2:使用抓包工具】 +1. 使用Charles、Fiddler等抓包工具 +2. 配置手机代理 +3. 运行应用并执行网络请求 +4. 查看实际请求的URL + +【方法3:代码调试】 +1. 在HttpConstants.java中设置断点 +2. 查看URiBase的值 +3. 确认是否为: http://101.43.95.130:8039 + +六、注意事项 +----------- + +1. HTTP vs HTTPS + - 当前使用HTTP协议(非加密传输) + - 生产环境强烈建议使用HTTPS + - 如果使用HTTPS,需要: + * 修改地址为: https://101.43.95.130:8039 + * 配置SSL证书 + * 或配置信任所有证书(仅开发环境) + +2. 端口访问 + - 确保服务器防火墙开放8039端口 + - 确保Android设备能访问该IP和端口 + - 如果使用移动网络,确保运营商未屏蔽该端口 + +3. 网络权限 + - AndroidManifest.xml中已配置INTERNET权限 + - 运行时需要授予网络权限(Android 6.0+) + +4. 真机测试 + - 确保手机能访问公网IP: 101.43.95.130 + - 如果使用WiFi,确保路由器未限制 + - 如果使用移动网络,确保能访问该IP + +5. 调试建议 + - 使用Android Studio的Logcat查看网络请求日志 + - 检查OkHttp的日志拦截器输出 + - 使用抓包工具(如Charles)查看实际请求和响应 + - 检查返回的错误信息 + +6. 常见错误处理 + - 连接超时: 检查网络连接和服务器状态 + - SSL错误: 如果使用HTTPS,检查证书配置 + - 401/403错误: 需要有效Token,这是正常的 + - 404错误: 检查接口路径是否正确 + +七、如果无法连接服务器 +--------------------- + +1. 检查服务器状态 + - 确认后端服务是否运行在8039端口 + - 使用测试脚本验证: python3 test_api.py + +2. 检查网络连接 + - 在手机上打开浏览器访问: http://101.43.95.130:8039 + - 如果无法访问,检查网络配置 + +3. 检查防火墙 + - 确认服务器防火墙开放8039端口 + - 检查安全组规则(如果使用云服务器) + +4. 使用内网地址(开发测试) + - 如果手机和服务器在同一局域网 + - 可以使用内网IP: http://10.0.4.13:8039 + - 修改HttpConstants.java和MyApi.java中的地址 + +5. 使用域名(推荐) + - 配置域名解析到服务器IP + - 使用域名访问: http://api.ruilaizi.com:8039 + - 更便于管理和切换服务器 + +八、配置总结 +----------- + +✓ 已修改 HttpConstants.java - 主要接口地址 +✓ 已修改 MyApi.java - Retrofit接口地址 +✓ 已检查 network_security_config.xml - 允许HTTP +✓ 已检查 AndroidManifest.xml - 权限和配置正确 + +所有网络请求现在都会使用: http://101.43.95.130:8039 + +九、下一步操作 +------------- + +1. 重新编译Android应用 +2. 安装到设备测试 +3. 验证登录接口是否能正常连接 +4. 测试其他业务接口 +5. 根据测试结果调整配置 + +======================================== +配置完成时间: 2024年 +服务器地址: http://101.43.95.130:8039 +======================================== diff --git a/Android配置说明.txt b/Android配置说明.txt new file mode 100644 index 0000000..aeb84ed --- /dev/null +++ b/Android配置说明.txt @@ -0,0 +1,122 @@ +======================================== +Android应用配置公网接口说明 +======================================== + +一、已修改的配置文件 +------------------- + +1. HttpConstants.java + 文件路径: peizhen/app/src/main/java/com/ruilaizi/service/okgonet/HttpConstants.java + 修改内容: + - 原地址: "https://ruilaizipj.com" + - 新地址: "http://101.43.95.130:8039" + + 说明: 这是主要的HTTP常量配置类,所有使用HttpConstants.URiBase的接口都会使用新地址 + +2. MyApi.java + 文件路径: peizhen/app/src/main/java/com/ruilaizi/service/network/http/MyApi.java + 修改内容: + - 原地址: "http://chengjie.free.idcfengye.com" + - 新地址: "http://101.43.95.130:8039" + + 说明: Retrofit网络请求的基础URL配置 + +3. API.java + 文件路径: peizhen/app/src/main/java/com/ruilaizi/service/main/activity/common/http/api/API.java + 说明: 该类使用HttpConstants.URiBase,会自动使用新地址 + +二、网络安全配置 +--------------- + +Android 9.0+ (API 28+) 默认不允许HTTP明文传输,需要配置允许HTTP连接。 + +1. network_security_config.xml + 文件路径: peizhen/app/src/main/res/xml/network_security_config.xml + 当前配置: 已允许明文传输 (cleartextTrafficPermitted="true") + + 配置内容: + + + + + +2. AndroidManifest.xml + 需要确保在标签中引用网络安全配置: + android:networkSecurityConfig="@xml/network_security_config" + + 如果未配置,需要添加此属性。 + +三、使用的接口地址 +----------------- + +所有网络请求现在会使用以下地址: +- 基础地址: http://101.43.95.130:8039 + +主要接口示例: +- 登录: http://101.43.95.130:8039/appLogin +- 获取个人信息: http://101.43.95.130:8039/system/user/getAppUserInfo +- 订单列表: http://101.43.95.130:8039/system/view/list +- 接单: http://101.43.95.130:8039/system/view/acceptOrderYes +- 等等... + +四、编译和运行 +------------- + +1. 使用Android Studio打开项目 +2. 同步Gradle依赖 +3. 编译Debug或Release版本 +4. 安装到设备或模拟器 +5. 运行应用测试接口连接 + +五、注意事项 +----------- + +1. HTTP vs HTTPS + - 当前使用HTTP协议(非加密) + - 生产环境建议使用HTTPS(需要SSL证书) + - 如果使用HTTPS,需要修改地址为: https://101.43.95.130:8039 + - 并配置相应的SSL证书 + +2. 端口访问 + - 确保服务器防火墙开放8039端口 + - 确保Android设备能访问该IP和端口 + +3. 网络权限 + - AndroidManifest.xml中需要INTERNET权限 + - 检查是否已配置 + +4. 真机测试 + - 确保手机和服务器在同一网络或能访问公网IP + - 如果使用内网IP,需要确保手机在同一局域网 + +5. 调试建议 + - 使用Android Studio的Logcat查看网络请求日志 + - 检查OkHttp的日志拦截器输出 + - 使用抓包工具(如Charles)查看实际请求 + +六、验证配置 +----------- + +1. 编译应用后,在Logcat中查看网络请求日志 +2. 检查请求URL是否为: http://101.43.95.130:8039/... +3. 测试登录接口是否能正常连接 +4. 检查返回数据是否正确 + +七、常见问题 +----------- + +Q1: 无法连接到服务器 +A1: 检查网络连接、防火墙设置、服务器是否运行 + +Q2: SSL错误 +A2: 如果使用HTTPS,需要配置SSL证书或信任所有证书(仅开发环境) + +Q3: 401/403错误 +A3: 这是正常的,表示接口存在但需要有效Token认证 + +Q4: 网络超时 +A4: 检查服务器响应时间,可能需要增加超时时间配置 + +======================================== +配置完成时间: 2024年 +======================================== diff --git a/NewCodeLoginActivity密码登录功能说明.md b/NewCodeLoginActivity密码登录功能说明.md new file mode 100644 index 0000000..35f2dfd --- /dev/null +++ b/NewCodeLoginActivity密码登录功能说明.md @@ -0,0 +1,98 @@ +# NewCodeLoginActivity 密码登录功能扩展 + +## 功能概述 + +在 `NewCodeLoginActivity`(验证码登录页面)中扩展了密码登录功能,用户可以在验证码登录和密码登录之间切换。 + +## 实现的功能 + +### 1. 登录方式切换 +- 默认显示验证码登录 +- 可以通过"密码登录"按钮切换到密码登录 +- 可以通过"验证码登录"按钮切换回验证码登录 + +### 2. 密码登录 +- 输入手机号和密码 +- 调用后端 `/appLogin` 接口 +- 登录成功后跳转到主页 + +### 3. 验证码登录(原有功能) +- 输入手机号 +- 获取验证码 +- 输入验证码登录 + +## 代码修改 + +### Java 代码修改 + +**文件**: `peizhen/app/src/main/java/com/ruilaizi/service/main/activity/NewCodeLoginActivity.java` + +**主要修改**: +1. 添加了密码登录相关的成员变量 +2. 添加了 `switchToCodeLogin()` 和 `switchToPasswordLogin()` 方法 +3. 添加了 `doPasswordLogin()` 方法实现密码登录 +4. 修改了按钮点击事件,支持两种登录方式 + +### 布局文件修改 + +**文件**: `peizhen/app/src/main/res/layout/new_dialog_smscode_input.xml` + +**主要修改**: +1. 为验证码输入区域添加了 `id="ll_code_input"` +2. 添加了密码输入区域 `ll_password`(默认隐藏) +3. 添加了切换登录方式按钮 `tv_switch_login` + +## 新增的 UI 元素 + +1. **密码输入框** (`et_password`) + - 类型:密码输入(`inputType="textPassword"`) + - 位置:在手机号输入框下方 + - 默认隐藏,切换到密码登录时显示 + +2. **切换登录方式按钮** (`tv_switch_login`) + - 文本:默认显示"密码登录" + - 点击后切换登录方式 + +## 使用流程 + +### 验证码登录(默认) +1. 输入手机号 +2. 点击"获取验证码" +3. 输入验证码 +4. 点击"验证登录" + +### 密码登录 +1. 点击"密码登录"按钮 +2. 输入手机号 +3. 输入密码 +4. 点击"登录"按钮 + +## 后端接口 + +- **密码登录接口**: `POST /appLogin` +- **参数**: + - `username`: 手机号 + - `password`: 密码 +- **返回格式**: `{code: 200, msg: "", data: {...}}` + +## 注意事项 + +1. 密码登录使用 `NetApi` 和 `JsonUtils`,与 `LoginPasswordPresenterImpl` 保持一致 +2. 登录成功后会自动保存用户信息和登录状态 +3. 登录失败会显示错误提示 +4. 两种登录方式共享相同的用户信息存储逻辑 + +## 测试建议 + +1. 测试验证码登录功能是否正常 +2. 测试密码登录功能是否正常 +3. 测试两种登录方式的切换是否流畅 +4. 测试输入验证(手机号格式、密码非空等) +5. 测试错误处理(网络错误、登录失败等) + +## 相关文件 + +- `peizhen/app/src/main/java/com/ruilaizi/service/main/activity/NewCodeLoginActivity.java` - 主Activity +- `peizhen/app/src/main/res/layout/new_dialog_smscode_input.xml` - 布局文件 +- `peizhen/app/src/main/java/com/ruilaizi/service/okgonet/NetApi.java` - 网络请求工具 +- `peizhen/app/src/main/java/com/ruilaizi/service/utils/JsonUtils.java` - JSON解析工具 diff --git a/Postman接口测试说明.txt b/Postman接口测试说明.txt new file mode 100644 index 0000000..f132520 --- /dev/null +++ b/Postman接口测试说明.txt @@ -0,0 +1,229 @@ +======================================== +Postman测试接口说明 - 订单列表接口 +======================================== + +一、问题原因 +----------- +接口 `/system/view/list` 需要JWT Token认证,直接访问会返回401错误。 + +从代码可以看到: +- 接口调用了 getLoginUser() 方法获取当前登录用户 +- 需要从请求Header中获取Token进行验证 +- 没有Token或Token无效会返回401认证失败 + +二、解决方案 +----------- + +【步骤1:先登录获取Token】 + +1. 在Postman中创建新请求 + - Method: POST + - URL: http://101.43.95.130:8039/appLogin + - Headers: + Content-Type: application/x-www-form-urlencoded + - Body (x-www-form-urlencoded): + username: admin (或你的用户名) + password: admin123 (或你的密码) + +2. 发送请求,从响应中获取Token + 响应格式示例: + { + "code": 200, + "msg": "操作成功", + "data": { + "token": "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjEyMzQ1Njc4LWE5YmMtMTIzNC0xMjM0LTEyMzQ1Njc4OTBhYiIsInVzZXJfaWQiOjEsInVzZXJuYW1lIjoiYWRtaW4iLCJleHAiOjE2OTk5OTk5OTl9.xxxxx", + "userId": "1", + "userName": "admin", + ... + } + } + +【步骤2:使用Token访问订单列表接口】 + +1. 在Postman中创建新请求 + - Method: GET + - URL: http://101.43.95.130:8039/system/view/list?status=&pageSize=10&pageNum=1 + - Headers: + Authorization: Bearer <你的Token> + Content-Type: application/json + +2. 发送请求即可获取订单列表 + +三、详细操作步骤 +--------------- + +【方法1:使用Postman图形界面】 + +1. 登录获取Token + - 打开Postman + - 点击 "New" → "HTTP Request" + - 设置: + * Method: POST + * URL: http://101.43.95.130:8039/appLogin + - 点击 "Headers" 标签 + * 添加: Content-Type = application/x-www-form-urlencoded + - 点击 "Body" 标签 + * 选择 "x-www-form-urlencoded" + * 添加: + - Key: username, Value: admin + - Key: password, Value: admin123 + - 点击 "Send" + - 复制响应中的 token 值 + +2. 访问订单列表 + - 创建新请求 + - Method: GET + - URL: http://101.43.95.130:8039/system/view/list?status=&pageSize=10&pageNum=1 + - Headers: + * Authorization: Bearer <粘贴刚才复制的token> + - 点击 "Send" + +【方法2:使用curl命令测试】 + +1. 先登录获取Token: +curl -X POST "http://101.43.95.130:8039/appLogin" \ + -H "Content-Type: application/x-www-form-urlencoded" \ + -d "username=admin&password=admin123" + +2. 使用Token访问订单列表: +curl -X GET "http://101.43.95.130:8039/system/view/list?status=&pageSize=10&pageNum=1" \ + -H "Authorization: Bearer <你的token>" + +四、常见错误及解决方法 +-------------------- + +【错误1: 401 认证失败】 +原因: 没有Token或Token无效 +解决: +- 检查Authorization Header是否正确 +- 确认Token格式: Bearer (注意Bearer后面有空格) +- Token可能已过期,重新登录获取新Token + +【错误2: 无法连接到服务器】 +原因: 网络问题或防火墙 +解决: +- 检查服务器是否运行: curl http://localhost:8039 +- 检查防火墙是否开放8039端口 +- 如果使用公网IP,确认服务器防火墙规则 + +【错误3: 500 服务器错误】 +原因: 参数错误或服务器内部错误 +解决: +- 检查参数是否正确 +- 查看服务器日志 +- 确认数据库连接正常 + +【错误4: 404 接口不存在】 +原因: URL路径错误 +解决: +- 确认接口路径: /system/view/list +- 检查服务器端口: 8039 +- 确认服务器已启动 + +五、Token说明 +----------- + +1. Token格式 + - Header名称: Authorization + - 值格式: Bearer + - 示例: Authorization: Bearer eyJhbGciOiJIUzUxMiJ9... + +2. Token有效期 + - 默认30分钟(可在application.yml中配置) + - Token过期后需要重新登录 + +3. Token存储 + - Token存储在Redis中 + - 需要Redis服务正常运行 + +六、接口参数说明 +-------------- + +【订单列表接口】 +URL: /system/view/list +Method: GET +参数: +- status: 订单状态(可选) + * -2: 已取消 + * -1: 拒绝接单 + * 0: 待接单 + * 1: 已接单 + * 2: 已支付(待服务) + * 3: 服务中 + * 4: 已完成 + * 5: 申请退款 + * 6: 退款中 + * 7: 已退款 + * 8: 已结算 +- pageSize: 每页数量(默认10) +- pageNum: 页码(默认1) + +响应格式: +{ + "code": 200, + "msg": "操作成功", + "rows": [...], + "total": 100 +} + +七、Postman环境变量配置(推荐) +--------------------------- + +为了方便管理,建议在Postman中配置环境变量: + +1. 创建环境 + - 点击右上角环境图标 + - 点击 "Add" + - 环境名称: 陪诊系统 + +2. 添加变量 + - base_url: http://101.43.95.130:8039 + - token: (登录后自动设置) + +3. 使用变量 + - URL: {{base_url}}/system/view/list + - Authorization: Bearer {{token}} + +4. 自动设置Token(使用Tests脚本) + 在登录请求的Tests标签中添加: + ```javascript + if (pm.response.code === 200) { + var jsonData = pm.response.json(); + if (jsonData.data && jsonData.data.token) { + pm.environment.set("token", jsonData.data.token); + } + } + ``` + +八、测试脚本 +----------- + +已创建测试脚本: test_postman_api.sh +使用方法: +bash test_postman_api.sh + +九、快速测试命令 +-------------- + +【完整测试流程】 +# 1. 登录获取Token +TOKEN=$(curl -s -X POST "http://localhost:8039/appLogin" \ + -H "Content-Type: application/x-www-form-urlencoded" \ + -d "username=admin&password=admin123" | \ + python3 -c "import sys, json; data=json.load(sys.stdin); print(data['data']['token'] if 'data' in data and 'token' in data['data'] else '')") + +# 2. 使用Token访问订单列表 +curl -X GET "http://localhost:8039/system/view/list?status=&pageSize=10&pageNum=1" \ + -H "Authorization: Bearer $TOKEN" | python3 -m json.tool + +十、总结 +------- + +问题: Postman访问接口不通 +原因: 缺少JWT Token认证 +解决: +1. 先调用 /appLogin 接口登录获取Token +2. 在请求Header中添加: Authorization: Bearer +3. 然后访问 /system/view/list 接口 + +======================================== diff --git a/Postman连接问题快速解决.txt b/Postman连接问题快速解决.txt new file mode 100644 index 0000000..f3680dd --- /dev/null +++ b/Postman连接问题快速解决.txt @@ -0,0 +1,57 @@ +======================================== +Postman无法连接 - 快速解决方案 +======================================== + +问题: Postman显示 "Could not get any response" +原因: 防火墙或云服务器安全组未开放8039端口 + +一、快速修复 (需要sudo权限) +--------------------------- + +【方法1: 使用修复脚本】 +sudo bash fix_firewall.sh + +【方法2: 手动执行命令】 +sudo firewall-cmd --permanent --add-port=8039/tcp +sudo firewall-cmd --reload +sudo firewall-cmd --list-ports # 验证 + +二、云服务器安全组配置 +-------------------- + +如果使用腾讯云/阿里云等云服务器,还需要在控制台配置安全组: + +1. 登录云服务器控制台 +2. 找到"安全组" → 选择对应的安全组 +3. 添加入站规则: + - 协议: TCP + - 端口: 8039 + - 源: 0.0.0.0/0 (允许所有IP,生产环境建议限制) + +三、验证修复 +----------- + +修复后,在Postman中测试: +- Method: POST +- URL: http://101.43.95.130:8039/appLogin +- Headers: Content-Type: application/x-www-form-urlencoded +- Body: username=admin&password=admin123 + +如果成功,会返回包含token的JSON响应。 + +四、如果仍然无法连接 +------------------ + +1. 检查服务器是否运行: + ps aux | grep java | grep 8039 + +2. 检查端口监听: + netstat -tlnp | grep 8039 + +3. 临时关闭防火墙测试 (仅测试用): + sudo systemctl stop firewalld + # 测试后记得开启: sudo systemctl start firewalld + +4. 检查云服务器安全组是否配置正确 + +======================================== diff --git a/coupon b/coupon new file mode 160000 index 0000000..930430d --- /dev/null +++ b/coupon @@ -0,0 +1 @@ +Subproject commit 930430d7509c7b6a34d4feb10b672c01748294a9 diff --git a/fix_firewall.sh b/fix_firewall.sh new file mode 100755 index 0000000..524d22a --- /dev/null +++ b/fix_firewall.sh @@ -0,0 +1,66 @@ +#!/bin/bash +# 快速修复防火墙配置脚本 + +echo "==========================================" +echo "修复防火墙配置 - 开放8039端口" +echo "==========================================" +echo "" + +# 检查是否有sudo权限 +if [ "$EUID" -ne 0 ]; then + echo "⚠️ 需要sudo权限执行此脚本" + echo "请使用: sudo bash fix_firewall.sh" + exit 1 +fi + +# 检查firewalld是否运行 +if systemctl is-active --quiet firewalld; then + echo "✓ firewalld正在运行" + echo "" + echo "当前开放的端口:" + firewall-cmd --list-ports + echo "" + + # 检查8039端口是否已开放 + if firewall-cmd --list-ports | grep -q "8039/tcp"; then + echo "✓ 端口8039已经开放" + else + echo "正在开放端口8039..." + firewall-cmd --permanent --add-port=8039/tcp + firewall-cmd --reload + echo "✓ 端口8039已开放" + fi + + echo "" + echo "验证开放的端口:" + firewall-cmd --list-ports + echo "" + +elif systemctl is-active --quiet iptables; then + echo "✓ iptables正在运行" + echo "正在添加iptables规则..." + iptables -I INPUT -p tcp --dport 8039 -j ACCEPT + service iptables save 2>/dev/null || iptables-save > /etc/sysconfig/iptables + echo "✓ 端口8039已开放" + +else + echo "⚠️ 未检测到防火墙服务" + echo "请手动配置防火墙或云服务器安全组" +fi + +echo "" +echo "==========================================" +echo "下一步操作:" +echo "==========================================" +echo "1. 如果使用云服务器,请在控制台配置安全组:" +echo " - 开放TCP端口8039" +echo " - 源IP: 0.0.0.0/0 (或限制为特定IP)" +echo "" +echo "2. 测试连接:" +echo " curl http://101.43.95.130:8039/appLogin -X POST \\" +echo " -H \"Content-Type: application/x-www-form-urlencoded\" \\" +echo " -d \"username=admin&password=admin123\"" +echo "" +echo "3. 在Postman中测试:" +echo " POST http://101.43.95.130:8039/appLogin" +echo "" diff --git a/peizhen b/peizhen new file mode 160000 index 0000000..1bf64e3 --- /dev/null +++ b/peizhen @@ -0,0 +1 @@ +Subproject commit 1bf64e38965d4cc649ab303ed639aceac1f37b23 diff --git a/postman_test_token.sh b/postman_test_token.sh new file mode 100755 index 0000000..3b749b0 --- /dev/null +++ b/postman_test_token.sh @@ -0,0 +1,84 @@ +#!/bin/bash +# 完整的Postman测试脚本 - 包含登录和获取订单列表 + +echo "==========================================" +echo "Postman接口测试 - 完整流程" +echo "==========================================" +echo "" + +SERVER_URL="http://localhost:8039" +# 如果需要测试公网,修改为: SERVER_URL="http://101.43.95.130:8039" + +USERNAME="admin" +PASSWORD="admin123" + +echo "服务器地址: $SERVER_URL" +echo "用户名: $USERNAME" +echo "" + +# 步骤1: 登录获取Token +echo "步骤1: 登录获取Token..." +echo "----------------------------------------" +login_response=$(curl -s -X POST "$SERVER_URL/appLogin" \ + -H "Content-Type: application/x-www-form-urlencoded" \ + -d "username=$USERNAME&password=$PASSWORD") + +echo "登录响应:" +echo "$login_response" | python3 -m json.tool 2>/dev/null || echo "$login_response" +echo "" + +# 提取Token +TOKEN=$(echo "$login_response" | python3 -c " +import sys, json +try: + data = json.load(sys.stdin) + if 'data' in data and 'token' in data['data']: + print(data['data']['token']) + else: + print('') +except: + print('') +" 2>/dev/null) + +if [ -z "$TOKEN" ]; then + echo "❌ 登录失败,无法获取Token" + echo "请检查用户名和密码是否正确" + exit 1 +fi + +echo "✓ Token获取成功" +echo "Token: ${TOKEN:0:50}..." +echo "" + +# 步骤2: 使用Token访问订单列表 +echo "步骤2: 使用Token访问订单列表..." +echo "----------------------------------------" +order_response=$(curl -s -X GET \ + "$SERVER_URL/system/view/list?status=&pageSize=10&pageNum=1" \ + -H "Authorization: Bearer $TOKEN" \ + -H "Content-Type: application/json") + +echo "订单列表响应:" +echo "$order_response" | python3 -m json.tool 2>/dev/null || echo "$order_response" +echo "" + +# 检查响应 +if echo "$order_response" | grep -q '"code":200'; then + echo "✓ 订单列表获取成功!" +else + echo "❌ 订单列表获取失败" + echo "响应内容: $order_response" +fi + +echo "" +echo "==========================================" +echo "测试完成" +echo "==========================================" +echo "" +echo "在Postman中使用:" +echo "1. 登录接口: POST $SERVER_URL/appLogin" +echo " Body: username=$USERNAME&password=$PASSWORD" +echo "" +echo "2. 订单列表: GET $SERVER_URL/system/view/list?status=&pageSize=10&pageNum=1" +echo " Header: Authorization: Bearer $TOKEN" +echo "" diff --git a/quick_test.sh b/quick_test.sh new file mode 100755 index 0000000..3338fc9 --- /dev/null +++ b/quick_test.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# 快速API接口测试脚本(简化版) + +SERVER_URL="http://localhost:8039" +# 如果需要测试公网,修改为: SERVER_URL="http://101.43.95.130:8039" + +echo "快速测试后台接口..." +echo "服务器: $SERVER_URL" +echo "" + +# 测试首页 +echo -n "1. 首页接口: " +if curl -s -o /dev/null -w "%{http_code}" "$SERVER_URL/" | grep -q "200"; then + echo "✓ 正常" +else + echo "✗ 异常" +fi + +# 测试验证码 +echo -n "2. 验证码接口: " +code=$(curl -s "$SERVER_URL/captchaImage" | grep -o '"code":[0-9]*' | cut -d: -f2) +if [ "$code" = "200" ]; then + echo "✓ 正常" +else + echo "✗ 异常 (code=$code)" +fi + +# 测试微信登录 +echo -n "3. 微信登录接口: " +http_code=$(curl -s -o /dev/null -w "%{http_code}" -X POST "$SERVER_URL/weixinLogin" \ + -H "Content-Type: application/x-www-form-urlencoded" \ + -d "wxcode=test&encryptedData=test&iv=test") +if [ "$http_code" = "200" ] || [ "$http_code" = "500" ]; then + echo "✓ 正常 (HTTP $http_code)" +else + echo "✗ 异常 (HTTP $http_code)" +fi + +echo "" +echo "测试完成!" diff --git a/rlz b/rlz new file mode 160000 index 0000000..b31d233 --- /dev/null +++ b/rlz @@ -0,0 +1 @@ +Subproject commit b31d233b7fef86f61c4909d6b43122453e90bf27 diff --git a/rlz-ui/.editorconfig b/rlz-ui/.editorconfig new file mode 100644 index 0000000..22d302e --- /dev/null +++ b/rlz-ui/.editorconfig @@ -0,0 +1,22 @@ +# 告诉EditorConfig插件,这是根文件,不用继续往上查找 +root = true + +# 匹配全部文件 +[*] +# 设置字符集 +charset = utf-8 +# 缩进风格,可选space、tab +indent_style = space +# 缩进的空格数 +indent_size = 2 +# 结尾换行符,可选lf、cr、crlf +end_of_line = lf +# 在文件结尾插入新行 +insert_final_newline = true +# 删除一行中的前后空格 +trim_trailing_whitespace = true + +# 匹配md结尾的文件 +[*.md] +insert_final_newline = false +trim_trailing_whitespace = false diff --git a/rlz-ui/.env.development b/rlz-ui/.env.development new file mode 100644 index 0000000..6a1d693 --- /dev/null +++ b/rlz-ui/.env.development @@ -0,0 +1,11 @@ +# 页面标题 +VUE_APP_TITLE = 瑞来兹医助管理系统 + +# 开发环境配置 +ENV = 'development' + +# 瑞来兹医助管理系统/开发环境 +VUE_APP_BASE_API = '/dev-api' + +# 路由懒加载 +VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/rlz-ui/.env.production b/rlz-ui/.env.production new file mode 100644 index 0000000..ad891f5 --- /dev/null +++ b/rlz-ui/.env.production @@ -0,0 +1,7 @@ +# 页面标题 +VUE_APP_TITLE = 瑞来兹医助管理系统 +# 生产环境配置 +ENV = 'production' + +# 瑞来兹医助管理系统/生产环境 +VUE_APP_BASE_API = '/prod-api' diff --git a/rlz-ui/.env.staging b/rlz-ui/.env.staging new file mode 100644 index 0000000..a344a2a --- /dev/null +++ b/rlz-ui/.env.staging @@ -0,0 +1,10 @@ +# 页面标题 +VUE_APP_TITLE = 瑞来兹医助管理系统 + +NODE_ENV = production + +# 测试环境配置 +ENV = 'staging' + +# 瑞来兹医助管理系统/测试环境 +VUE_APP_BASE_API = '/stage-api' diff --git a/rlz-ui/.eslintignore b/rlz-ui/.eslintignore new file mode 100644 index 0000000..7dd2c2a --- /dev/null +++ b/rlz-ui/.eslintignore @@ -0,0 +1,10 @@ +# 忽略build目录下类型为js的文件的语法检查 +build/*.js +# 忽略src/assets目录下文件的语法检查 +src/assets +# 忽略public目录下文件的语法检查 +public +# 忽略当前目录下为js的文件的语法检查 +*.js +# 忽略当前目录下为vue的文件的语法检查 +*.vue \ No newline at end of file diff --git a/rlz-ui/.eslintrc.js b/rlz-ui/.eslintrc.js new file mode 100644 index 0000000..b321fbe --- /dev/null +++ b/rlz-ui/.eslintrc.js @@ -0,0 +1,199 @@ +// ESlint 检查配置 +module.exports = { + root: true, + parserOptions: { + parser: 'babel-eslint', + sourceType: 'module' + }, + env: { + browser: true, + node: true, + es6: true, + }, + extends: ['plugin:vue/recommended', 'eslint:recommended'], + + // add your custom rules here + //it is base on https://github.com/vuejs/eslint-config-vue + rules: { + "vue/max-attributes-per-line": [2, { + "singleline": 10, + "multiline": { + "max": 1, + "allowFirstLine": false + } + }], + "vue/singleline-html-element-content-newline": "off", + "vue/multiline-html-element-content-newline":"off", + "vue/name-property-casing": ["error", "PascalCase"], + "vue/no-v-html": "off", + 'accessor-pairs': 2, + 'arrow-spacing': [2, { + 'before': true, + 'after': true + }], + 'block-spacing': [2, 'always'], + 'brace-style': [2, '1tbs', { + 'allowSingleLine': true + }], + 'camelcase': [0, { + 'properties': 'always' + }], + 'comma-dangle': [2, 'never'], + 'comma-spacing': [2, { + 'before': false, + 'after': true + }], + 'comma-style': [2, 'last'], + 'constructor-super': 2, + 'curly': [2, 'multi-line'], + 'dot-location': [2, 'property'], + 'eol-last': 2, + 'eqeqeq': ["error", "always", {"null": "ignore"}], + 'generator-star-spacing': [2, { + 'before': true, + 'after': true + }], + 'handle-callback-err': [2, '^(err|error)$'], + 'indent': [2, 2, { + 'SwitchCase': 1 + }], + 'jsx-quotes': [2, 'prefer-single'], + 'key-spacing': [2, { + 'beforeColon': false, + 'afterColon': true + }], + 'keyword-spacing': [2, { + 'before': true, + 'after': true + }], + 'new-cap': [2, { + 'newIsCap': true, + 'capIsNew': false + }], + 'new-parens': 2, + 'no-array-constructor': 2, + 'no-caller': 2, + 'no-console': 'off', + 'no-class-assign': 2, + 'no-cond-assign': 2, + 'no-const-assign': 2, + 'no-control-regex': 0, + 'no-delete-var': 2, + 'no-dupe-args': 2, + 'no-dupe-class-members': 2, + 'no-dupe-keys': 2, + 'no-duplicate-case': 2, + 'no-empty-character-class': 2, + 'no-empty-pattern': 2, + 'no-eval': 2, + 'no-ex-assign': 2, + 'no-extend-native': 2, + 'no-extra-bind': 2, + 'no-extra-boolean-cast': 2, + 'no-extra-parens': [2, 'functions'], + 'no-fallthrough': 2, + 'no-floating-decimal': 2, + 'no-func-assign': 2, + 'no-implied-eval': 2, + 'no-inner-declarations': [2, 'functions'], + 'no-invalid-regexp': 2, + 'no-irregular-whitespace': 2, + 'no-iterator': 2, + 'no-label-var': 2, + 'no-labels': [2, { + 'allowLoop': false, + 'allowSwitch': false + }], + 'no-lone-blocks': 2, + 'no-mixed-spaces-and-tabs': 2, + 'no-multi-spaces': 2, + 'no-multi-str': 2, + 'no-multiple-empty-lines': [2, { + 'max': 1 + }], + 'no-native-reassign': 2, + 'no-negated-in-lhs': 2, + 'no-new-object': 2, + 'no-new-require': 2, + 'no-new-symbol': 2, + 'no-new-wrappers': 2, + 'no-obj-calls': 2, + 'no-octal': 2, + 'no-octal-escape': 2, + 'no-path-concat': 2, + 'no-proto': 2, + 'no-redeclare': 2, + 'no-regex-spaces': 2, + 'no-return-assign': [2, 'except-parens'], + 'no-self-assign': 2, + 'no-self-compare': 2, + 'no-sequences': 2, + 'no-shadow-restricted-names': 2, + 'no-spaced-func': 2, + 'no-sparse-arrays': 2, + 'no-this-before-super': 2, + 'no-throw-literal': 2, + 'no-trailing-spaces': 2, + 'no-undef': 2, + 'no-undef-init': 2, + 'no-unexpected-multiline': 2, + 'no-unmodified-loop-condition': 2, + 'no-unneeded-ternary': [2, { + 'defaultAssignment': false + }], + 'no-unreachable': 2, + 'no-unsafe-finally': 2, + 'no-unused-vars': [2, { + 'vars': 'all', + 'args': 'none' + }], + 'no-useless-call': 2, + 'no-useless-computed-key': 2, + 'no-useless-constructor': 2, + 'no-useless-escape': 0, + 'no-whitespace-before-property': 2, + 'no-with': 2, + 'one-var': [2, { + 'initialized': 'never' + }], + 'operator-linebreak': [2, 'after', { + 'overrides': { + '?': 'before', + ':': 'before' + } + }], + 'padded-blocks': [2, 'never'], + 'quotes': [2, 'single', { + 'avoidEscape': true, + 'allowTemplateLiterals': true + }], + 'semi': [2, 'never'], + 'semi-spacing': [2, { + 'before': false, + 'after': true + }], + 'space-before-blocks': [2, 'always'], + 'space-before-function-paren': [2, 'never'], + 'space-in-parens': [2, 'never'], + 'space-infix-ops': 2, + 'space-unary-ops': [2, { + 'words': true, + 'nonwords': false + }], + 'spaced-comment': [2, 'always', { + 'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ','] + }], + 'template-curly-spacing': [2, 'never'], + 'use-isnan': 2, + 'valid-typeof': 2, + 'wrap-iife': [2, 'any'], + 'yield-star-spacing': [2, 'both'], + 'yoda': [2, 'never'], + 'prefer-const': 2, + 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, + 'object-curly-spacing': [2, 'always', { + objectsInObjects: false + }], + 'array-bracket-spacing': [2, 'never'] + } +} diff --git a/rlz-ui/.gitignore b/rlz-ui/.gitignore new file mode 100644 index 0000000..2c9b3a7 --- /dev/null +++ b/rlz-ui/.gitignore @@ -0,0 +1,23 @@ +.DS_Store +node_modules/ +dist/ +npm-debug.log* +yarn-debug.log* +yarn-error.log* +**/*.log + +tests/**/coverage/ +tests/e2e/reports +selenium-debug.log + +# Editor directories and files +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln +*.local + +package-lock.json +yarn.lock diff --git a/rlz-ui/README.md b/rlz-ui/README.md new file mode 100644 index 0000000..03a5162 --- /dev/null +++ b/rlz-ui/README.md @@ -0,0 +1,30 @@ +## 开发 + +```bash +# 克隆项目 +git clone https://gitee.com/y_project/RuoYi-Vue + +# 进入项目目录 +cd ruoyi-ui + +# 安装依赖 +npm install + +# 建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题 +npm install --registry=https://registry.npmmirror.com + +# 启动服务 +npm run dev +``` + +浏览器访问 http://localhost:8050 + +## 发布 + +```bash +# 构建测试环境 +npm run build:stage + +# 构建生产环境 +npm run build:prod +``` \ No newline at end of file diff --git a/rlz-ui/babel.config.js b/rlz-ui/babel.config.js new file mode 100644 index 0000000..d33f9ea --- /dev/null +++ b/rlz-ui/babel.config.js @@ -0,0 +1,13 @@ +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'] + } + } +} \ No newline at end of file diff --git a/rlz-ui/bin/build.bat b/rlz-ui/bin/build.bat new file mode 100644 index 0000000..dda590d --- /dev/null +++ b/rlz-ui/bin/build.bat @@ -0,0 +1,12 @@ +@echo off +echo. +echo [Ϣ] Weḅdistļ +echo. + +%~d0 +cd %~dp0 + +cd .. +npm run build:prod + +pause \ No newline at end of file diff --git a/rlz-ui/bin/package.bat b/rlz-ui/bin/package.bat new file mode 100644 index 0000000..dff0c61 --- /dev/null +++ b/rlz-ui/bin/package.bat @@ -0,0 +1,12 @@ +@echo off +echo. +echo [Ϣ] װWeḅnode_modulesļ +echo. + +%~d0 +cd %~dp0 + +cd .. +npm install --registry=https://registry.npmmirror.com + +pause \ No newline at end of file diff --git a/rlz-ui/bin/run-web.bat b/rlz-ui/bin/run-web.bat new file mode 100644 index 0000000..921902c --- /dev/null +++ b/rlz-ui/bin/run-web.bat @@ -0,0 +1,12 @@ +@echo off +echo. +echo [Ϣ] ʹ Vue CLI Web ̡ +echo. + +%~d0 +cd %~dp0 + +cd .. +npm run dev + +pause \ No newline at end of file diff --git a/rlz-ui/build/index.js b/rlz-ui/build/index.js new file mode 100644 index 0000000..385da08 --- /dev/null +++ b/rlz-ui/build/index.js @@ -0,0 +1,35 @@ +const { run } = require('runjs') +const chalk = require('chalk') +const config = require('../vue.config.js') +const rawArgv = process.argv.slice(2) +const args = rawArgv.join(' ') + +if (process.env.npm_config_preview || rawArgv.includes('--preview')) { + const report = rawArgv.includes('--report') + + run(`vue-cli-service build ${args}`) + + const port = 9526 + const publicPath = config.publicPath + + var connect = require('connect') + var serveStatic = require('serve-static') + const app = connect() + + app.use( + publicPath, + serveStatic('./dist', { + index: ['index.html', '/'] + }) + ) + + app.listen(port, function () { + console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`)) + if (report) { + console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`)) + } + + }) +} else { + run(`vue-cli-service build ${args}`) +} diff --git a/rlz-ui/package.json b/rlz-ui/package.json new file mode 100644 index 0000000..1642b0b --- /dev/null +++ b/rlz-ui/package.json @@ -0,0 +1,90 @@ +{ + "name": "ruoyi", + "version": "3.8.3", + "description": "瑞来兹医助管理系统", + "author": "瑞来兹医助", + "license": "MIT", + "scripts": { + "dev": "vue-cli-service serve", + "build:prod": "vue-cli-service build", + "build:stage": "vue-cli-service build --mode staging", + "preview": "node build/index.js --preview", + "lint": "eslint --ext .js,.vue src" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "src/**/*.{js,vue}": [ + "eslint --fix", + "git add" + ] + }, + "keywords": [ + "vue", + "admin", + "dashboard", + "element-ui", + "boilerplate", + "admin-template", + "management-system" + ], + "repository": { + "type": "git", + "url": "https://gitee.com/y_project/RuoYi-Vue.git" + }, + "dependencies": { + "@riophae/vue-treeselect": "0.4.0", + "axios": "0.24.0", + "clipboard": "2.0.8", + "core-js": "3.19.1", + "echarts": "4.9.0", + "element-ui": "2.15.8", + "file-saver": "2.0.5", + "fuse.js": "6.4.3", + "highlight.js": "9.18.5", + "js-beautify": "1.13.0", + "js-cookie": "3.0.1", + "jsencrypt": "3.0.0-rc.1", + "nprogress": "0.2.0", + "quill": "1.3.7", + "screenfull": "5.0.2", + "sortablejs": "1.10.2", + "vue": "2.6.12", + "vue-count-to": "1.0.13", + "vue-cropper": "0.5.5", + "vue-meta": "2.4.0", + "vue-router": "3.4.9", + "vuedraggable": "2.24.3", + "vuex": "3.6.0" + }, + "devDependencies": { + "@vue/cli-plugin-babel": "4.4.6", + "@vue/cli-plugin-eslint": "4.4.6", + "@vue/cli-service": "4.4.6", + "babel-eslint": "10.1.0", + "babel-plugin-dynamic-import-node": "2.3.3", + "chalk": "4.1.0", + "compression-webpack-plugin": "5.0.2", + "connect": "3.6.6", + "eslint": "7.15.0", + "eslint-plugin-vue": "7.2.0", + "lint-staged": "10.5.3", + "runjs": "4.4.2", + "sass": "1.32.13", + "sass-loader": "10.1.1", + "script-ext-html-webpack-plugin": "2.1.5", + "svg-sprite-loader": "5.1.1", + "vue-template-compiler": "2.6.12" + }, + "engines": { + "node": ">=8.9", + "npm": ">= 3.0.0" + }, + "browserslist": [ + "> 1%", + "last 2 versions" + ] +} diff --git a/rlz-ui/public/favicon.ico b/rlz-ui/public/favicon.ico new file mode 100644 index 0000000..e263760 Binary files /dev/null and b/rlz-ui/public/favicon.ico differ diff --git a/rlz-ui/public/html/ie.html b/rlz-ui/public/html/ie.html new file mode 100644 index 0000000..390ce8a --- /dev/null +++ b/rlz-ui/public/html/ie.html @@ -0,0 +1,46 @@ + + + + + + 请升级您的浏览器 + + + + + + +

请升级您的浏览器,以便我们更好的为您提供服务!

+

您正在使用 Internet Explorer 的早期版本(IE11以下版本或使用该内核的浏览器)。这意味着在升级浏览器前,您将无法访问此网站。

+
+

请注意:微软公司对Windows XP 及 Internet Explorer 早期版本的支持已经结束

+

自 2016 年 1 月 12 日起,Microsoft 不再为 IE 11 以下版本提供相应支持和更新。没有关键的浏览器安全更新,您的电脑可能易受有害病毒、间谍软件和其他恶意软件的攻击,它们可以窃取或损害您的业务数据和信息。请参阅 微软对 Internet Explorer 早期版本的支持将于 2016 年 1 月 12 日结束的说明

+
+

您可以选择更先进的浏览器

+

推荐使用以下浏览器的最新版本。如果您的电脑已有以下浏览器的最新版本则直接使用该浏览器访问即可。

+ +
+ + \ No newline at end of file diff --git a/rlz-ui/public/index.html b/rlz-ui/public/index.html new file mode 100644 index 0000000..56fd45b --- /dev/null +++ b/rlz-ui/public/index.html @@ -0,0 +1,208 @@ + + + + + + + + + <%= webpackConfig.name %> + + + + +
+
+
+
+
+
正在加载系统资源,请耐心等待
+
+
+ + diff --git a/rlz-ui/public/robots.txt b/rlz-ui/public/robots.txt new file mode 100644 index 0000000..c2aab7e --- /dev/null +++ b/rlz-ui/public/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / \ No newline at end of file diff --git a/rlz-ui/src/App.vue b/rlz-ui/src/App.vue new file mode 100644 index 0000000..60325ff --- /dev/null +++ b/rlz-ui/src/App.vue @@ -0,0 +1,19 @@ + + + diff --git a/rlz-ui/src/api/login.js b/rlz-ui/src/api/login.js new file mode 100644 index 0000000..26742e7 --- /dev/null +++ b/rlz-ui/src/api/login.js @@ -0,0 +1,59 @@ +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 + }, + 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 + }) +} \ No newline at end of file diff --git a/rlz-ui/src/api/menu.js b/rlz-ui/src/api/menu.js new file mode 100644 index 0000000..6e52e6e --- /dev/null +++ b/rlz-ui/src/api/menu.js @@ -0,0 +1,9 @@ +import request from '@/utils/request' + +// 获取路由 +export const getRouters = () => { + return request({ + url: '/getRouters', + method: 'get' + }) +} \ No newline at end of file diff --git a/rlz-ui/src/api/monitor/cache.js b/rlz-ui/src/api/monitor/cache.js new file mode 100644 index 0000000..e1f2c87 --- /dev/null +++ b/rlz-ui/src/api/monitor/cache.js @@ -0,0 +1,57 @@ +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' + }) +} diff --git a/rlz-ui/src/api/monitor/job.js b/rlz-ui/src/api/monitor/job.js new file mode 100644 index 0000000..3815569 --- /dev/null +++ b/rlz-ui/src/api/monitor/job.js @@ -0,0 +1,71 @@ +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 + }) +} \ No newline at end of file diff --git a/rlz-ui/src/api/monitor/jobLog.js b/rlz-ui/src/api/monitor/jobLog.js new file mode 100644 index 0000000..6e0be61 --- /dev/null +++ b/rlz-ui/src/api/monitor/jobLog.js @@ -0,0 +1,26 @@ +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' + }) +} diff --git a/rlz-ui/src/api/monitor/logininfor.js b/rlz-ui/src/api/monitor/logininfor.js new file mode 100644 index 0000000..cd78151 --- /dev/null +++ b/rlz-ui/src/api/monitor/logininfor.js @@ -0,0 +1,26 @@ +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 cleanLogininfor() { + return request({ + url: '/monitor/logininfor/clean', + method: 'delete' + }) +} diff --git a/rlz-ui/src/api/monitor/online.js b/rlz-ui/src/api/monitor/online.js new file mode 100644 index 0000000..288ebe0 --- /dev/null +++ b/rlz-ui/src/api/monitor/online.js @@ -0,0 +1,18 @@ +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' + }) +} diff --git a/rlz-ui/src/api/monitor/operlog.js b/rlz-ui/src/api/monitor/operlog.js new file mode 100644 index 0000000..6e881df --- /dev/null +++ b/rlz-ui/src/api/monitor/operlog.js @@ -0,0 +1,26 @@ +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' + }) +} diff --git a/rlz-ui/src/api/monitor/server.js b/rlz-ui/src/api/monitor/server.js new file mode 100644 index 0000000..cac7791 --- /dev/null +++ b/rlz-ui/src/api/monitor/server.js @@ -0,0 +1,9 @@ +import request from '@/utils/request' + +// 获取服务信息 +export function getServer() { + return request({ + url: '/monitor/server', + method: 'get' + }) +} \ No newline at end of file diff --git a/rlz-ui/src/api/system/config.js b/rlz-ui/src/api/system/config.js new file mode 100644 index 0000000..7858c69 --- /dev/null +++ b/rlz-ui/src/api/system/config.js @@ -0,0 +1,60 @@ +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' + }) +} diff --git a/rlz-ui/src/api/system/dept.js b/rlz-ui/src/api/system/dept.js new file mode 100644 index 0000000..0535e8a --- /dev/null +++ b/rlz-ui/src/api/system/dept.js @@ -0,0 +1,68 @@ +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 treeselect() { + return request({ + url: '/system/dept/treeselect', + method: 'get' + }) +} + +// 根据角色ID查询部门树结构 +export function roleDeptTreeselect(roleId) { + return request({ + url: '/system/dept/roleDeptTreeselect/' + roleId, + 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' + }) +} \ No newline at end of file diff --git a/rlz-ui/src/api/system/dict/data.js b/rlz-ui/src/api/system/dict/data.js new file mode 100644 index 0000000..2a6e481 --- /dev/null +++ b/rlz-ui/src/api/system/dict/data.js @@ -0,0 +1,52 @@ +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' + }) +} diff --git a/rlz-ui/src/api/system/dict/type.js b/rlz-ui/src/api/system/dict/type.js new file mode 100644 index 0000000..526977d --- /dev/null +++ b/rlz-ui/src/api/system/dict/type.js @@ -0,0 +1,60 @@ +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' + }) +} \ No newline at end of file diff --git a/rlz-ui/src/api/system/hospital.js b/rlz-ui/src/api/system/hospital.js new file mode 100644 index 0000000..3dd3461 --- /dev/null +++ b/rlz-ui/src/api/system/hospital.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询【请填写功能名称】列表 +export function listHospital(query) { + return request({ + url: '/system/hospital/list', + method: 'get', + params: query + }) +} + +// 查询【请填写功能名称】详细 +export function getHospital(id) { + return request({ + url: '/system/hospital/' + id, + method: 'get' + }) +} + +// 新增【请填写功能名称】 +export function addHospital(data) { + return request({ + url: '/system/hospital', + method: 'post', + data: data + }) +} + +// 修改【请填写功能名称】 +export function updateHospital(data) { + return request({ + url: '/system/hospital', + method: 'put', + data: data + }) +} + +// 删除【请填写功能名称】 +export function delHospital(id) { + return request({ + url: '/system/hospital/' + id, + method: 'delete' + }) +} diff --git a/rlz-ui/src/api/system/menu.js b/rlz-ui/src/api/system/menu.js new file mode 100644 index 0000000..97258ee --- /dev/null +++ b/rlz-ui/src/api/system/menu.js @@ -0,0 +1,60 @@ +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' + }) +} \ No newline at end of file diff --git a/rlz-ui/src/api/system/notice.js b/rlz-ui/src/api/system/notice.js new file mode 100644 index 0000000..737fc16 --- /dev/null +++ b/rlz-ui/src/api/system/notice.js @@ -0,0 +1,44 @@ +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' + }) +} \ No newline at end of file diff --git a/rlz-ui/src/api/system/order.js b/rlz-ui/src/api/system/order.js new file mode 100644 index 0000000..3cdfd6d --- /dev/null +++ b/rlz-ui/src/api/system/order.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询【请填写功能名称】列表 +export function listOrder(query) { + return request({ + url: '/system/order/list', + method: 'get', + params: query + }) +} + +// 查询【请填写功能名称】详细 +export function getOrder(orderId) { + return request({ + url: '/system/order/' + orderId, + method: 'get' + }) +} + +// 新增【请填写功能名称】 +export function addOrder(data) { + return request({ + url: '/system/order', + method: 'post', + data: data + }) +} + +// 修改【请填写功能名称】 +export function updateOrder(data) { + return request({ + url: '/system/order', + method: 'put', + data: data + }) +} + +// 删除【请填写功能名称】 +export function delOrder(orderId) { + return request({ + url: '/system/order/' + orderId, + method: 'delete' + }) +} diff --git a/rlz-ui/src/api/system/post.js b/rlz-ui/src/api/system/post.js new file mode 100644 index 0000000..8faa266 --- /dev/null +++ b/rlz-ui/src/api/system/post.js @@ -0,0 +1,44 @@ +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' + }) +} diff --git a/rlz-ui/src/api/system/renzheng.js b/rlz-ui/src/api/system/renzheng.js new file mode 100644 index 0000000..c85c8fb --- /dev/null +++ b/rlz-ui/src/api/system/renzheng.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询renzheng列表 +export function listRenzheng(query) { + return request({ + url: '/system/renzheng/list', + method: 'get', + params: query + }) +} + +// 查询renzheng详细 +export function getRenzheng(id) { + return request({ + url: '/system/renzheng/' + id, + method: 'get' + }) +} + +// 新增renzheng +export function addRenzheng(data) { + return request({ + url: '/system/renzheng', + method: 'post', + data: data + }) +} + +// 修改renzheng +export function updateRenzheng(data) { + return request({ + url: '/system/renzheng', + method: 'put', + data: data + }) +} + +// 删除renzheng +export function delRenzheng(id) { + return request({ + url: '/system/renzheng/' + id, + method: 'delete' + }) +} diff --git a/rlz-ui/src/api/system/role.js b/rlz-ui/src/api/system/role.js new file mode 100644 index 0000000..b5ebdf6 --- /dev/null +++ b/rlz-ui/src/api/system/role.js @@ -0,0 +1,111 @@ +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 + }) +} \ No newline at end of file diff --git a/rlz-ui/src/api/system/user.js b/rlz-ui/src/api/system/user.js new file mode 100644 index 0000000..ae4c0b0 --- /dev/null +++ b/rlz-ui/src/api/system/user.js @@ -0,0 +1,134 @@ +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', + params: data + }) +} + +// 用户头像上传 +export function uploadAvatar(data) { + return request({ + url: '/system/user/profile/avatar', + method: 'post', + 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 getAuthToken() { + return request({ + url: '/system/user/getAuthToken', + method: 'get', + }) +} \ No newline at end of file diff --git a/rlz-ui/src/api/tool/gen.js b/rlz-ui/src/api/tool/gen.js new file mode 100644 index 0000000..afaf2a9 --- /dev/null +++ b/rlz-ui/src/api/tool/gen.js @@ -0,0 +1,76 @@ +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 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' + }) +} diff --git a/rlz-ui/src/assets/401_images/401.gif b/rlz-ui/src/assets/401_images/401.gif new file mode 100644 index 0000000..cd6e0d9 Binary files /dev/null and b/rlz-ui/src/assets/401_images/401.gif differ diff --git a/rlz-ui/src/assets/404_images/404.png b/rlz-ui/src/assets/404_images/404.png new file mode 100644 index 0000000..3d8e230 Binary files /dev/null and b/rlz-ui/src/assets/404_images/404.png differ diff --git a/rlz-ui/src/assets/404_images/404_cloud.png b/rlz-ui/src/assets/404_images/404_cloud.png new file mode 100644 index 0000000..c6281d0 Binary files /dev/null and b/rlz-ui/src/assets/404_images/404_cloud.png differ diff --git a/rlz-ui/src/assets/icons/index.js b/rlz-ui/src/assets/icons/index.js new file mode 100644 index 0000000..d79e164 --- /dev/null +++ b/rlz-ui/src/assets/icons/index.js @@ -0,0 +1,9 @@ +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) diff --git a/rlz-ui/src/assets/icons/svg/404.svg b/rlz-ui/src/assets/icons/svg/404.svg new file mode 100644 index 0000000..6df5019 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/404.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/bug.svg b/rlz-ui/src/assets/icons/svg/bug.svg new file mode 100644 index 0000000..05a150d --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/bug.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/build.svg b/rlz-ui/src/assets/icons/svg/build.svg new file mode 100644 index 0000000..97c4688 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/build.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/button.svg b/rlz-ui/src/assets/icons/svg/button.svg new file mode 100644 index 0000000..904fddc --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/button.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/cascader.svg b/rlz-ui/src/assets/icons/svg/cascader.svg new file mode 100644 index 0000000..e256024 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/cascader.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/chart.svg b/rlz-ui/src/assets/icons/svg/chart.svg new file mode 100644 index 0000000..27728fb --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/chart.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/checkbox.svg b/rlz-ui/src/assets/icons/svg/checkbox.svg new file mode 100644 index 0000000..013fd3a --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/checkbox.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/clipboard.svg b/rlz-ui/src/assets/icons/svg/clipboard.svg new file mode 100644 index 0000000..90923ff --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/clipboard.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/code.svg b/rlz-ui/src/assets/icons/svg/code.svg new file mode 100644 index 0000000..ed4d23c --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/code.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/color.svg b/rlz-ui/src/assets/icons/svg/color.svg new file mode 100644 index 0000000..44a81aa --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/color.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/component.svg b/rlz-ui/src/assets/icons/svg/component.svg new file mode 100644 index 0000000..29c3458 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/component.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/dashboard.svg b/rlz-ui/src/assets/icons/svg/dashboard.svg new file mode 100644 index 0000000..5317d37 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/dashboard.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/date-range.svg b/rlz-ui/src/assets/icons/svg/date-range.svg new file mode 100644 index 0000000..fda571e --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/date-range.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/date.svg b/rlz-ui/src/assets/icons/svg/date.svg new file mode 100644 index 0000000..52dc73e --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/date.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/dict.svg b/rlz-ui/src/assets/icons/svg/dict.svg new file mode 100644 index 0000000..4849377 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/dict.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/documentation.svg b/rlz-ui/src/assets/icons/svg/documentation.svg new file mode 100644 index 0000000..7043122 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/documentation.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/download.svg b/rlz-ui/src/assets/icons/svg/download.svg new file mode 100644 index 0000000..c896951 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/download.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/drag.svg b/rlz-ui/src/assets/icons/svg/drag.svg new file mode 100644 index 0000000..4185d3c --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/drag.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/druid.svg b/rlz-ui/src/assets/icons/svg/druid.svg new file mode 100644 index 0000000..a2b4b4e --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/druid.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/edit.svg b/rlz-ui/src/assets/icons/svg/edit.svg new file mode 100644 index 0000000..d26101f --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/edit.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/education.svg b/rlz-ui/src/assets/icons/svg/education.svg new file mode 100644 index 0000000..7bfb01d --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/education.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/email.svg b/rlz-ui/src/assets/icons/svg/email.svg new file mode 100644 index 0000000..74d25e2 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/email.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/example.svg b/rlz-ui/src/assets/icons/svg/example.svg new file mode 100644 index 0000000..46f42b5 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/example.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/excel.svg b/rlz-ui/src/assets/icons/svg/excel.svg new file mode 100644 index 0000000..74d97b8 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/excel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/exit-fullscreen.svg b/rlz-ui/src/assets/icons/svg/exit-fullscreen.svg new file mode 100644 index 0000000..485c128 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/exit-fullscreen.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/eye-open.svg b/rlz-ui/src/assets/icons/svg/eye-open.svg new file mode 100644 index 0000000..88dcc98 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/eye-open.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/eye.svg b/rlz-ui/src/assets/icons/svg/eye.svg new file mode 100644 index 0000000..16ed2d8 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/eye.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/form.svg b/rlz-ui/src/assets/icons/svg/form.svg new file mode 100644 index 0000000..dcbaa18 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/form.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/fullscreen.svg b/rlz-ui/src/assets/icons/svg/fullscreen.svg new file mode 100644 index 0000000..0e86b6f --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/fullscreen.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/github.svg b/rlz-ui/src/assets/icons/svg/github.svg new file mode 100644 index 0000000..db0a0d4 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/github.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/guide.svg b/rlz-ui/src/assets/icons/svg/guide.svg new file mode 100644 index 0000000..b271001 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/guide.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/icon.svg b/rlz-ui/src/assets/icons/svg/icon.svg new file mode 100644 index 0000000..82be8ee --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/input.svg b/rlz-ui/src/assets/icons/svg/input.svg new file mode 100644 index 0000000..ab91381 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/input.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/international.svg b/rlz-ui/src/assets/icons/svg/international.svg new file mode 100644 index 0000000..e9b56ee --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/international.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/job.svg b/rlz-ui/src/assets/icons/svg/job.svg new file mode 100644 index 0000000..2a93a25 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/job.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/language.svg b/rlz-ui/src/assets/icons/svg/language.svg new file mode 100644 index 0000000..0082b57 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/language.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/link.svg b/rlz-ui/src/assets/icons/svg/link.svg new file mode 100644 index 0000000..48197ba --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/link.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/list.svg b/rlz-ui/src/assets/icons/svg/list.svg new file mode 100644 index 0000000..20259ed --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/list.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/lock.svg b/rlz-ui/src/assets/icons/svg/lock.svg new file mode 100644 index 0000000..74fee54 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/lock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/log.svg b/rlz-ui/src/assets/icons/svg/log.svg new file mode 100644 index 0000000..d879d33 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/log.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/logininfor.svg b/rlz-ui/src/assets/icons/svg/logininfor.svg new file mode 100644 index 0000000..267f844 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/logininfor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/message.svg b/rlz-ui/src/assets/icons/svg/message.svg new file mode 100644 index 0000000..14ca817 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/message.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/money.svg b/rlz-ui/src/assets/icons/svg/money.svg new file mode 100644 index 0000000..c1580de --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/money.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/monitor.svg b/rlz-ui/src/assets/icons/svg/monitor.svg new file mode 100644 index 0000000..70db62b --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/monitor.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/nested.svg b/rlz-ui/src/assets/icons/svg/nested.svg new file mode 100644 index 0000000..06713a8 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/nested.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/number.svg b/rlz-ui/src/assets/icons/svg/number.svg new file mode 100644 index 0000000..ad5ce9a --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/number.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/online.svg b/rlz-ui/src/assets/icons/svg/online.svg new file mode 100644 index 0000000..330a202 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/online.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/password.svg b/rlz-ui/src/assets/icons/svg/password.svg new file mode 100644 index 0000000..6c64def --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/password.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/pdf.svg b/rlz-ui/src/assets/icons/svg/pdf.svg new file mode 100644 index 0000000..957aa0c --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/pdf.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/people.svg b/rlz-ui/src/assets/icons/svg/people.svg new file mode 100644 index 0000000..2bd54ae --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/people.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/peoples.svg b/rlz-ui/src/assets/icons/svg/peoples.svg new file mode 100644 index 0000000..aab852e --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/peoples.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/phone.svg b/rlz-ui/src/assets/icons/svg/phone.svg new file mode 100644 index 0000000..ab8e8c4 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/phone.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/post.svg b/rlz-ui/src/assets/icons/svg/post.svg new file mode 100644 index 0000000..2922c61 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/post.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/qq.svg b/rlz-ui/src/assets/icons/svg/qq.svg new file mode 100644 index 0000000..ee13d4e --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/qq.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/question.svg b/rlz-ui/src/assets/icons/svg/question.svg new file mode 100644 index 0000000..cf75bd4 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/question.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/radio.svg b/rlz-ui/src/assets/icons/svg/radio.svg new file mode 100644 index 0000000..0cde345 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/radio.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/rate.svg b/rlz-ui/src/assets/icons/svg/rate.svg new file mode 100644 index 0000000..aa3b14d --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/rate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/redis-list.svg b/rlz-ui/src/assets/icons/svg/redis-list.svg new file mode 100644 index 0000000..98a15b2 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/redis-list.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/redis.svg b/rlz-ui/src/assets/icons/svg/redis.svg new file mode 100644 index 0000000..2f1d62d --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/redis.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/row.svg b/rlz-ui/src/assets/icons/svg/row.svg new file mode 100644 index 0000000..0780992 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/row.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/search.svg b/rlz-ui/src/assets/icons/svg/search.svg new file mode 100644 index 0000000..84233dd --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/search.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/select.svg b/rlz-ui/src/assets/icons/svg/select.svg new file mode 100644 index 0000000..d628382 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/select.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/server.svg b/rlz-ui/src/assets/icons/svg/server.svg new file mode 100644 index 0000000..ca37b00 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/server.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/shopping.svg b/rlz-ui/src/assets/icons/svg/shopping.svg new file mode 100644 index 0000000..87513e7 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/shopping.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/size.svg b/rlz-ui/src/assets/icons/svg/size.svg new file mode 100644 index 0000000..ddb25b8 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/size.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/skill.svg b/rlz-ui/src/assets/icons/svg/skill.svg new file mode 100644 index 0000000..a3b7312 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/skill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/slider.svg b/rlz-ui/src/assets/icons/svg/slider.svg new file mode 100644 index 0000000..fbe4f39 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/slider.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/star.svg b/rlz-ui/src/assets/icons/svg/star.svg new file mode 100644 index 0000000..6cf86e6 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/star.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/swagger.svg b/rlz-ui/src/assets/icons/svg/swagger.svg new file mode 100644 index 0000000..05d4e7b --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/swagger.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/switch.svg b/rlz-ui/src/assets/icons/svg/switch.svg new file mode 100644 index 0000000..0ba61e3 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/switch.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/system.svg b/rlz-ui/src/assets/icons/svg/system.svg new file mode 100644 index 0000000..86cb938 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/system.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/tab.svg b/rlz-ui/src/assets/icons/svg/tab.svg new file mode 100644 index 0000000..b4b48e4 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/tab.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/table.svg b/rlz-ui/src/assets/icons/svg/table.svg new file mode 100644 index 0000000..0e3dc9d --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/table.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/textarea.svg b/rlz-ui/src/assets/icons/svg/textarea.svg new file mode 100644 index 0000000..2709f29 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/textarea.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/theme.svg b/rlz-ui/src/assets/icons/svg/theme.svg new file mode 100644 index 0000000..5982a2f --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/theme.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/time-range.svg b/rlz-ui/src/assets/icons/svg/time-range.svg new file mode 100644 index 0000000..13c1202 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/time-range.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/time.svg b/rlz-ui/src/assets/icons/svg/time.svg new file mode 100644 index 0000000..b376e32 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/time.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/tool.svg b/rlz-ui/src/assets/icons/svg/tool.svg new file mode 100644 index 0000000..c813067 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/tool.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/tree-table.svg b/rlz-ui/src/assets/icons/svg/tree-table.svg new file mode 100644 index 0000000..8aafdb8 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/tree-table.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/tree.svg b/rlz-ui/src/assets/icons/svg/tree.svg new file mode 100644 index 0000000..dd4b7dd --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/tree.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/upload.svg b/rlz-ui/src/assets/icons/svg/upload.svg new file mode 100644 index 0000000..bae49c0 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/upload.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/user.svg b/rlz-ui/src/assets/icons/svg/user.svg new file mode 100644 index 0000000..0ba0716 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/user.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/validCode.svg b/rlz-ui/src/assets/icons/svg/validCode.svg new file mode 100644 index 0000000..cfb1021 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/validCode.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/wechat.svg b/rlz-ui/src/assets/icons/svg/wechat.svg new file mode 100644 index 0000000..c586e55 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/wechat.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svg/zip.svg b/rlz-ui/src/assets/icons/svg/zip.svg new file mode 100644 index 0000000..f806fc4 --- /dev/null +++ b/rlz-ui/src/assets/icons/svg/zip.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rlz-ui/src/assets/icons/svgo.yml b/rlz-ui/src/assets/icons/svgo.yml new file mode 100644 index 0000000..14f8f5c --- /dev/null +++ b/rlz-ui/src/assets/icons/svgo.yml @@ -0,0 +1,22 @@ +# replace default config + +# multipass: true +# full: true + +plugins: + + # - name + # + # or: + # - name: false + # - name: true + # + # or: + # - name: + # param1: 1 + # param2: 2 + +- removeAttrs: + attrs: + - 'fill' + - 'fill-rule' diff --git a/rlz-ui/src/assets/images/dark.svg b/rlz-ui/src/assets/images/dark.svg new file mode 100644 index 0000000..36b58b5 --- /dev/null +++ b/rlz-ui/src/assets/images/dark.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/rlz-ui/src/assets/images/light.svg b/rlz-ui/src/assets/images/light.svg new file mode 100644 index 0000000..efd52c6 --- /dev/null +++ b/rlz-ui/src/assets/images/light.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/rlz-ui/src/assets/images/login-background.jpg b/rlz-ui/src/assets/images/login-background.jpg new file mode 100644 index 0000000..8a89eb8 Binary files /dev/null and b/rlz-ui/src/assets/images/login-background.jpg differ diff --git a/rlz-ui/src/assets/images/profile.jpg b/rlz-ui/src/assets/images/profile.jpg new file mode 100644 index 0000000..b3a940b Binary files /dev/null and b/rlz-ui/src/assets/images/profile.jpg differ diff --git a/rlz-ui/src/assets/logo/logo.png b/rlz-ui/src/assets/logo/logo.png new file mode 100644 index 0000000..e263760 Binary files /dev/null and b/rlz-ui/src/assets/logo/logo.png differ diff --git a/rlz-ui/src/assets/styles/btn.scss b/rlz-ui/src/assets/styles/btn.scss new file mode 100644 index 0000000..1ccb57d --- /dev/null +++ b/rlz-ui/src/assets/styles/btn.scss @@ -0,0 +1,99 @@ +@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; +} diff --git a/rlz-ui/src/assets/styles/element-ui.scss b/rlz-ui/src/assets/styles/element-ui.scss new file mode 100644 index 0000000..363092a --- /dev/null +++ b/rlz-ui/src/assets/styles/element-ui.scss @@ -0,0 +1,92 @@ +// 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; +} \ No newline at end of file diff --git a/rlz-ui/src/assets/styles/element-variables.scss b/rlz-ui/src/assets/styles/element-variables.scss new file mode 100644 index 0000000..5bf2fbb --- /dev/null +++ b/rlz-ui/src/assets/styles/element-variables.scss @@ -0,0 +1,31 @@ +/** +* 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; +} diff --git a/rlz-ui/src/assets/styles/index.scss b/rlz-ui/src/assets/styles/index.scss new file mode 100644 index 0000000..9f536ae --- /dev/null +++ b/rlz-ui/src/assets/styles/index.scss @@ -0,0 +1,191 @@ +@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; +} + +.pagination-container { + margin-top: 30px; +} + +.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; + } +} + +//refine vue-multiselect plugin +.multiselect { + line-height: 16px; +} + +.multiselect--active { + z-index: 1000 !important; +} diff --git a/rlz-ui/src/assets/styles/mixin.scss b/rlz-ui/src/assets/styles/mixin.scss new file mode 100644 index 0000000..64d9cf6 --- /dev/null +++ b/rlz-ui/src/assets/styles/mixin.scss @@ -0,0 +1,66 @@ +@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; + } +} diff --git a/rlz-ui/src/assets/styles/ruoyi.scss b/rlz-ui/src/assets/styles/ruoyi.scss new file mode 100644 index 0000000..e3912ce --- /dev/null +++ b/rlz-ui/src/assets/styles/ruoyi.scss @@ -0,0 +1,273 @@ + /** + * 通用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-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 { + position: relative; + height: 25px; + margin-bottom: 10px; + margin-top: 15px; + padding: 10px 20px !important; +} + +/* tree border */ +.tree-border { + margin-top: 5px; + border: 1px solid #e5e6e7; + background: #FFFFFF none; + border-radius:4px; +} + +.pagination-container .el-pagination { + right: 0; + position: absolute; +} + +@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 { + cursor: pointer; + color: #409EFF; + 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 { + padding-right: 15px; + padding-left: 15px; + 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: absolute; + top: 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; +} diff --git a/rlz-ui/src/assets/styles/sidebar.scss b/rlz-ui/src/assets/styles/sidebar.scss new file mode 100644 index 0000000..43d5f9a --- /dev/null +++ b/rlz-ui/src/assets/styles/sidebar.scss @@ -0,0 +1,227 @@ +#app { + + .main-container { + min-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: 2px 0 6px rgba(0,21,41,.35); + + // 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; + } + } +} diff --git a/rlz-ui/src/assets/styles/transition.scss b/rlz-ui/src/assets/styles/transition.scss new file mode 100644 index 0000000..25e7e18 --- /dev/null +++ b/rlz-ui/src/assets/styles/transition.scss @@ -0,0 +1,48 @@ +// 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-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; +} diff --git a/rlz-ui/src/assets/styles/variables.scss b/rlz-ui/src/assets/styles/variables.scss new file mode 100644 index 0000000..8715dc7 --- /dev/null +++ b/rlz-ui/src/assets/styles/variables.scss @@ -0,0 +1,54 @@ +// 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 +} diff --git a/rlz-ui/src/components/Breadcrumb/index.vue b/rlz-ui/src/components/Breadcrumb/index.vue new file mode 100644 index 0000000..1696f54 --- /dev/null +++ b/rlz-ui/src/components/Breadcrumb/index.vue @@ -0,0 +1,74 @@ + + + + + diff --git a/rlz-ui/src/components/Crontab/day.vue b/rlz-ui/src/components/Crontab/day.vue new file mode 100644 index 0000000..fe3eaf0 --- /dev/null +++ b/rlz-ui/src/components/Crontab/day.vue @@ -0,0 +1,161 @@ + + + diff --git a/rlz-ui/src/components/Crontab/hour.vue b/rlz-ui/src/components/Crontab/hour.vue new file mode 100644 index 0000000..4b1f1fc --- /dev/null +++ b/rlz-ui/src/components/Crontab/hour.vue @@ -0,0 +1,114 @@ + + + diff --git a/rlz-ui/src/components/Crontab/index.vue b/rlz-ui/src/components/Crontab/index.vue new file mode 100644 index 0000000..3963df2 --- /dev/null +++ b/rlz-ui/src/components/Crontab/index.vue @@ -0,0 +1,430 @@ + + + + diff --git a/rlz-ui/src/components/Crontab/min.vue b/rlz-ui/src/components/Crontab/min.vue new file mode 100644 index 0000000..0a106ce --- /dev/null +++ b/rlz-ui/src/components/Crontab/min.vue @@ -0,0 +1,116 @@ + + + \ No newline at end of file diff --git a/rlz-ui/src/components/Crontab/month.vue b/rlz-ui/src/components/Crontab/month.vue new file mode 100644 index 0000000..fd0ac38 --- /dev/null +++ b/rlz-ui/src/components/Crontab/month.vue @@ -0,0 +1,114 @@ + + + diff --git a/rlz-ui/src/components/Crontab/result.vue b/rlz-ui/src/components/Crontab/result.vue new file mode 100644 index 0000000..aea6e0e --- /dev/null +++ b/rlz-ui/src/components/Crontab/result.vue @@ -0,0 +1,559 @@ + + + diff --git a/rlz-ui/src/components/Crontab/second.vue b/rlz-ui/src/components/Crontab/second.vue new file mode 100644 index 0000000..e7b7761 --- /dev/null +++ b/rlz-ui/src/components/Crontab/second.vue @@ -0,0 +1,117 @@ + + + diff --git a/rlz-ui/src/components/Crontab/week.vue b/rlz-ui/src/components/Crontab/week.vue new file mode 100644 index 0000000..1cec700 --- /dev/null +++ b/rlz-ui/src/components/Crontab/week.vue @@ -0,0 +1,202 @@ + + + diff --git a/rlz-ui/src/components/Crontab/year.vue b/rlz-ui/src/components/Crontab/year.vue new file mode 100644 index 0000000..5487a6c --- /dev/null +++ b/rlz-ui/src/components/Crontab/year.vue @@ -0,0 +1,131 @@ + + + diff --git a/rlz-ui/src/components/DictData/index.js b/rlz-ui/src/components/DictData/index.js new file mode 100644 index 0000000..24e3e9c --- /dev/null +++ b/rlz-ui/src/components/DictData/index.js @@ -0,0 +1,21 @@ +import Vue from 'vue' +import DataDict from '@/utils/dict' +import { getDicts as getDicts } from '@/api/system/dict/data' + +function install() { + Vue.use(DataDict, { + metas: { + '*': { + labelField: 'dictLabel', + valueField: 'dictValue', + request(dictMeta) { + return getDicts(dictMeta.type).then(res => res.data) + }, + }, + }, + }) +} + +export default { + install, +} \ No newline at end of file diff --git a/rlz-ui/src/components/DictTag/index.vue b/rlz-ui/src/components/DictTag/index.vue new file mode 100644 index 0000000..4c196c4 --- /dev/null +++ b/rlz-ui/src/components/DictTag/index.vue @@ -0,0 +1,52 @@ + + + + \ No newline at end of file diff --git a/rlz-ui/src/components/Editor/index.vue b/rlz-ui/src/components/Editor/index.vue new file mode 100644 index 0000000..6bb5a18 --- /dev/null +++ b/rlz-ui/src/components/Editor/index.vue @@ -0,0 +1,272 @@ + + + + + diff --git a/rlz-ui/src/components/FileUpload/index.vue b/rlz-ui/src/components/FileUpload/index.vue new file mode 100644 index 0000000..aa2296b --- /dev/null +++ b/rlz-ui/src/components/FileUpload/index.vue @@ -0,0 +1,209 @@ + + + + + diff --git a/rlz-ui/src/components/Hamburger/index.vue b/rlz-ui/src/components/Hamburger/index.vue new file mode 100644 index 0000000..c6a4359 --- /dev/null +++ b/rlz-ui/src/components/Hamburger/index.vue @@ -0,0 +1,44 @@ + + + + + diff --git a/rlz-ui/src/components/HeaderSearch/index.vue b/rlz-ui/src/components/HeaderSearch/index.vue new file mode 100644 index 0000000..0931184 --- /dev/null +++ b/rlz-ui/src/components/HeaderSearch/index.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/rlz-ui/src/components/IconSelect/index.vue b/rlz-ui/src/components/IconSelect/index.vue new file mode 100644 index 0000000..a7512b2 --- /dev/null +++ b/rlz-ui/src/components/IconSelect/index.vue @@ -0,0 +1,68 @@ + + + + + + diff --git a/rlz-ui/src/components/IconSelect/requireIcons.js b/rlz-ui/src/components/IconSelect/requireIcons.js new file mode 100644 index 0000000..5d3005d --- /dev/null +++ b/rlz-ui/src/components/IconSelect/requireIcons.js @@ -0,0 +1,11 @@ + +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 diff --git a/rlz-ui/src/components/ImagePreview/index.vue b/rlz-ui/src/components/ImagePreview/index.vue new file mode 100644 index 0000000..743d8d5 --- /dev/null +++ b/rlz-ui/src/components/ImagePreview/index.vue @@ -0,0 +1,84 @@ + + + + + diff --git a/rlz-ui/src/components/ImageUpload/index.vue b/rlz-ui/src/components/ImageUpload/index.vue new file mode 100644 index 0000000..71172c1 --- /dev/null +++ b/rlz-ui/src/components/ImageUpload/index.vue @@ -0,0 +1,212 @@ + + + + + diff --git a/rlz-ui/src/components/Pagination/index.vue b/rlz-ui/src/components/Pagination/index.vue new file mode 100644 index 0000000..1617af0 --- /dev/null +++ b/rlz-ui/src/components/Pagination/index.vue @@ -0,0 +1,114 @@ + + + + + diff --git a/rlz-ui/src/components/PanThumb/index.vue b/rlz-ui/src/components/PanThumb/index.vue new file mode 100644 index 0000000..796b01b --- /dev/null +++ b/rlz-ui/src/components/PanThumb/index.vue @@ -0,0 +1,142 @@ + + + + + diff --git a/rlz-ui/src/components/ParentView/index.vue b/rlz-ui/src/components/ParentView/index.vue new file mode 100644 index 0000000..7bf6148 --- /dev/null +++ b/rlz-ui/src/components/ParentView/index.vue @@ -0,0 +1,3 @@ + diff --git a/rlz-ui/src/components/RightPanel/index.vue b/rlz-ui/src/components/RightPanel/index.vue new file mode 100644 index 0000000..1534b9b --- /dev/null +++ b/rlz-ui/src/components/RightPanel/index.vue @@ -0,0 +1,149 @@ + + + + + + + diff --git a/rlz-ui/src/components/RightToolbar/index.vue b/rlz-ui/src/components/RightToolbar/index.vue new file mode 100644 index 0000000..976974e --- /dev/null +++ b/rlz-ui/src/components/RightToolbar/index.vue @@ -0,0 +1,87 @@ + + + diff --git a/rlz-ui/src/components/RuoYi/Doc/index.vue b/rlz-ui/src/components/RuoYi/Doc/index.vue new file mode 100644 index 0000000..cc829b2 --- /dev/null +++ b/rlz-ui/src/components/RuoYi/Doc/index.vue @@ -0,0 +1,21 @@ + + + \ No newline at end of file diff --git a/rlz-ui/src/components/RuoYi/Git/index.vue b/rlz-ui/src/components/RuoYi/Git/index.vue new file mode 100644 index 0000000..517c448 --- /dev/null +++ b/rlz-ui/src/components/RuoYi/Git/index.vue @@ -0,0 +1,21 @@ + + + \ No newline at end of file diff --git a/rlz-ui/src/components/Screenfull/index.vue b/rlz-ui/src/components/Screenfull/index.vue new file mode 100644 index 0000000..85937c9 --- /dev/null +++ b/rlz-ui/src/components/Screenfull/index.vue @@ -0,0 +1,57 @@ + + + + + diff --git a/rlz-ui/src/components/SizeSelect/index.vue b/rlz-ui/src/components/SizeSelect/index.vue new file mode 100644 index 0000000..00496f7 --- /dev/null +++ b/rlz-ui/src/components/SizeSelect/index.vue @@ -0,0 +1,56 @@ + + + diff --git a/rlz-ui/src/components/SvgIcon/index.vue b/rlz-ui/src/components/SvgIcon/index.vue new file mode 100644 index 0000000..340ace4 --- /dev/null +++ b/rlz-ui/src/components/SvgIcon/index.vue @@ -0,0 +1,61 @@ + + + + + diff --git a/rlz-ui/src/components/ThemePicker/index.vue b/rlz-ui/src/components/ThemePicker/index.vue new file mode 100644 index 0000000..4ba9bd2 --- /dev/null +++ b/rlz-ui/src/components/ThemePicker/index.vue @@ -0,0 +1,173 @@ + + + + + diff --git a/rlz-ui/src/components/TopNav/index.vue b/rlz-ui/src/components/TopNav/index.vue new file mode 100644 index 0000000..0cc24db --- /dev/null +++ b/rlz-ui/src/components/TopNav/index.vue @@ -0,0 +1,181 @@ + + + + + diff --git a/rlz-ui/src/components/iFrame/index.vue b/rlz-ui/src/components/iFrame/index.vue new file mode 100644 index 0000000..4b85f36 --- /dev/null +++ b/rlz-ui/src/components/iFrame/index.vue @@ -0,0 +1,36 @@ +