From f56f57a2364ff5cf1279527c2f130aae88b65ce7 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期五, 11 十二月 2020 14:27:54 +0800 Subject: [PATCH] Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue --- ruoyi-ui/src/store/modules/user.js | 4 ruoyi-ui/src/views/tool/gen/index.vue | 4 ruoyi-ui/src/views/monitor/cache/index.vue | 2 ruoyi-ui/src/layout/components/Settings/index.vue | 133 ++++++++++++-- ruoyi-ui/src/views/system/user/index.vue | 5 ruoyi-ui/src/store/modules/settings.js | 3 ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java | 9 ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java | 2 ruoyi-ui/package.json | 81 +++----- ruoyi-ui/src/views/tool/gen/editTable.vue | 2 ruoyi-ui/src/main.js | 2 ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java | 12 ruoyi-ui/src/views/system/user/profile/userInfo.vue | 4 ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue | 3 ruoyi-ui/src/layout/components/TagsView/ScrollPane.vue | 2 ruoyi-ui/src/components/Screenfull/index.vue | 11 ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMenuMapper.java | 8 ruoyi-ui/src/layout/components/Sidebar/index.vue | 8 ruoyi-ui/src/assets/styles/sidebar.scss | 17 + ruoyi-ui/src/components/HeaderSearch/index.vue | 4 ruoyi-ui/src/settings.js | 5 ruoyi-ui/src/views/system/user/profile/resetPwd.vue | 2 ruoyi-ui/vue.config.js | 4 ruoyi-ui/src/assets/images/login-background.jpg | 0 ruoyi-ui/src/assets/styles/ruoyi.scss | 2 ruoyi-ui/src/views/login.vue | 2 ruoyi-system/src/main/resources/mapper/system/SysRoleMenuMapper.xml | 7 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java | 6 ruoyi-ui/src/assets/styles/variables.scss | 9 + ruoyi-ui/src/assets/images/dark.svg | 39 ++++ ruoyi-ui/src/assets/images/light.svg | 39 ++++ ruoyi-ui/src/assets/images/profile.jpg | 0 ruoyi-ui/src/layout/index.vue | 12 + ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java | 25 ++ ruoyi-ui/src/layout/components/Sidebar/Logo.vue | 15 + ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java | 10 + 36 files changed, 375 insertions(+), 118 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java index 0bf2bc3..91bd67d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java @@ -1,5 +1,6 @@ package com.ruoyi.web.controller.system; +import java.util.ArrayList; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; @@ -19,6 +20,7 @@ import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.SecurityUtils; +import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.system.service.ISysDictDataService; import com.ruoyi.system.service.ISysDictTypeService; @@ -73,7 +75,12 @@ @GetMapping(value = "/type/{dictType}") public AjaxResult dictType(@PathVariable String dictType) { - return AjaxResult.success(dictTypeService.selectDictDataByType(dictType)); + List<SysDictData> data = dictTypeService.selectDictDataByType(dictType); + if (StringUtils.isNull(data)) + { + data = new ArrayList<SysDictData>(); + } + return AjaxResult.success(data); } /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java index 95bcfbe..02346f1 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java @@ -127,11 +127,13 @@ { return AjaxResult.error("鏂板鐢ㄦ埛'" + user.getUserName() + "'澶辫触锛岀櫥褰曡处鍙峰凡瀛樺湪"); } - else if (UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) + else if (StringUtils.isNotEmpty(user.getPhonenumber()) + && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) { return AjaxResult.error("鏂板鐢ㄦ埛'" + user.getUserName() + "'澶辫触锛屾墜鏈哄彿鐮佸凡瀛樺湪"); } - else if (UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user))) + else if (StringUtils.isNotEmpty(user.getEmail()) + && UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user))) { return AjaxResult.error("鏂板鐢ㄦ埛'" + user.getUserName() + "'澶辫触锛岄偖绠辫处鍙峰凡瀛樺湪"); } @@ -149,11 +151,13 @@ public AjaxResult edit(@Validated @RequestBody SysUser user) { userService.checkUserAllowed(user); - if (UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) + if (StringUtils.isNotEmpty(user.getPhonenumber()) + && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) { return AjaxResult.error("淇敼鐢ㄦ埛'" + user.getUserName() + "'澶辫触锛屾墜鏈哄彿鐮佸凡瀛樺湪"); } - else if (UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user))) + else if (StringUtils.isNotEmpty(user.getEmail()) + && UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user))) { return AjaxResult.error("淇敼鐢ㄦ埛'" + user.getUserName() + "'澶辫触锛岄偖绠辫处鍙峰凡瀛樺湪"); } diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java index bf77d93..62c0439 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java @@ -877,7 +877,7 @@ */ private Object getValue(Object o, String name) throws Exception { - if (StringUtils.isNotEmpty(name)) + if (StringUtils.isNotNull(o) && StringUtils.isNotEmpty(name)) { Class<?> clazz = o.getClass(); Field field = clazz.getDeclaredField(name); diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java index 75dea08..7e180ab 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java @@ -1,6 +1,8 @@ package com.ruoyi.framework.aspectj; import java.lang.reflect.Method; +import java.util.Collection; +import java.util.Iterator; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -210,8 +212,31 @@ * @param o 瀵硅薄淇℃伅銆� * @return 濡傛灉鏄渶瑕佽繃婊ょ殑瀵硅薄锛屽垯杩斿洖true锛涘惁鍒欒繑鍥瀎alse銆� */ + @SuppressWarnings("rawtypes") public boolean isFilterObject(final Object o) { + Class<?> clazz = o.getClass(); + if (clazz.isArray()) + { + return clazz.getComponentType().isAssignableFrom(MultipartFile.class); + } + else if (Collection.class.isAssignableFrom(clazz)) + { + Collection collection = (Collection) o; + for (Iterator iter = collection.iterator(); iter.hasNext();) + { + return iter.next() instanceof MultipartFile; + } + } + else if (Map.class.isAssignableFrom(clazz)) + { + Map map = (Map) o; + for (Iterator iter = map.entrySet().iterator(); iter.hasNext();) + { + Map.Entry entry = (Map.Entry) iter.next(); + return entry.getValue() instanceof MultipartFile; + } + } return o instanceof MultipartFile || o instanceof HttpServletRequest || o instanceof HttpServletResponse; } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMenuMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMenuMapper.java index 5a2b901..fccdbf0 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMenuMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMenuMapper.java @@ -27,6 +27,14 @@ public int deleteRoleMenuByRoleId(Long roleId); /** + * 鎵归噺鍒犻櫎瑙掕壊鑿滃崟鍏宠仈淇℃伅 + * + * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID + * @return 缁撴灉 + */ + public int deleteRoleMenu(Long[] ids); + + /** * 鎵归噺鏂板瑙掕壊鑿滃崟淇℃伅 * * @param roleMenuList 瑙掕壊鑿滃崟鍒楄〃 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java index ad91b71..2271472 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java @@ -290,8 +290,13 @@ * @return 缁撴灉 */ @Override + @Transactional public int deleteRoleById(Long roleId) { + // 鍒犻櫎瑙掕壊涓庤彍鍗曞叧鑱� + roleMenuMapper.deleteRoleMenuByRoleId(roleId); + // 鍒犻櫎瑙掕壊涓庨儴闂ㄥ叧鑱� + roleDeptMapper.deleteRoleDeptByRoleId(roleId); return roleMapper.deleteRoleById(roleId); } @@ -302,6 +307,7 @@ * @return 缁撴灉 */ @Override + @Transactional public int deleteRoleByIds(Long[] roleIds) { for (Long roleId : roleIds) @@ -313,6 +319,10 @@ throw new CustomException(String.format("%1$s宸插垎閰�,涓嶈兘鍒犻櫎", role.getRoleName())); } } + // 鍒犻櫎瑙掕壊涓庤彍鍗曞叧鑱� + roleMenuMapper.deleteRoleMenu(roleIds); + // 鍒犻櫎瑙掕壊涓庨儴闂ㄥ叧鑱� + roleDeptMapper.deleteRoleDept(roleIds); return roleMapper.deleteRoleByIds(roleIds); } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java index 8a4c12a..b48a7de 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java @@ -363,6 +363,7 @@ * @return 缁撴灉 */ @Override + @Transactional public int deleteUserById(Long userId) { // 鍒犻櫎鐢ㄦ埛涓庤鑹插叧鑱� @@ -379,12 +380,17 @@ * @return 缁撴灉 */ @Override + @Transactional public int deleteUserByIds(Long[] userIds) { for (Long userId : userIds) { checkUserAllowed(new SysUser(userId)); } + // 鍒犻櫎鐢ㄦ埛涓庤鑹插叧鑱� + userRoleMapper.deleteUserRole(userIds); + // 鍒犻櫎鐢ㄦ埛涓庡矖浣嶅叧鑱� + userPostMapper.deleteUserPost(userIds); return userMapper.deleteUserByIds(userIds); } diff --git a/ruoyi-system/src/main/resources/mapper/system/SysRoleMenuMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysRoleMenuMapper.xml index 532b5e5..d324865 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysRoleMenuMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysRoleMenuMapper.xml @@ -17,6 +17,13 @@ delete from sys_role_menu where role_id=#{roleId} </delete> + <delete id="deleteRoleMenu" parameterType="Long"> + delete from sys_role_menu where role_id in + <foreach collection="array" item="roleId" open="(" separator="," close=")"> + #{roleId} + </foreach> + </delete> + <insert id="batchRoleMenu"> insert into sys_role_menu(role_id, menu_id) values <foreach item="item" index="index" collection="list" separator=","> diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index 4f46a63..14b1df8 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -9,11 +9,7 @@ "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", - "test:unit": "jest --clearCache && vue-cli-service test:unit", - "test:ci": "npm run lint && npm run test:unit", - "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml", - "new": "plop" + "lint": "eslint --ext .js,.vue src" }, "husky": { "hooks": { @@ -41,59 +37,44 @@ }, "dependencies": { "@riophae/vue-treeselect": "0.4.0", - "axios": "0.18.1", - "clipboard": "2.0.4", - "core-js": "3.6.5", - "echarts": "4.2.1", + "axios": "0.21.0", + "clipboard": "2.0.6", + "core-js": "3.8.1", + "echarts": "4.9.0", "element-ui": "2.14.1", - "file-saver": "2.0.1", - "js-beautify": "1.10.2", - "fuse.js": "3.4.4", - "js-cookie": "2.2.0", + "file-saver": "2.0.4", + "fuse.js": "6.4.3", + "js-beautify": "1.13.0", + "js-cookie": "2.2.1", "jsencrypt": "3.0.0-rc.1", - "normalize.css": "7.0.0", "nprogress": "0.2.0", - "path-to-regexp": "2.4.0", - "screenfull": "4.2.0", - "sortablejs": "1.8.4", - "vue": "2.6.10", - "vue-count-to": "1.0.13", + "path-to-regexp": "6.2.0", "quill": "1.3.7", - "vue-cropper": "0.4.9", - "vue-router": "3.0.2", - "vue-splitpane": "1.0.4", - "vuedraggable": "2.20.0", - "vuex": "3.1.0" + "screenfull": "5.0.2", + "sortablejs": "1.10.2", + "vue": "2.6.12", + "vue-count-to": "1.0.13", + "vue-cropper": "0.5.5", + "vue-router": "3.4.9", + "vuedraggable": "2.24.3", + "vuex": "3.6.0" }, "devDependencies": { - "@vue/cli-plugin-babel": "4.4.4", - "@vue/cli-plugin-eslint": "4.4.4", - "@vue/cli-plugin-unit-jest": "4.4.4", - "@vue/cli-service": "4.4.4", - "@vue/test-utils": "1.0.0-beta.29", - "autoprefixer": "9.5.1", + "@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-jest": "23.6.0", - "babel-plugin-dynamic-import-node": "2.3.3", - "chalk": "2.4.2", - "chokidar": "2.1.5", + "chalk": "4.1.0", "connect": "3.6.6", - "eslint": "6.7.2", - "eslint-plugin-vue": "6.2.2", - "html-webpack-plugin": "3.2.0", - "husky": "1.3.1", - "lint-staged": "8.1.5", - "mockjs": "1.0.1-beta3", - "plop": "2.3.0", - "runjs": "4.3.2", - "node-sass": "4.14.1", - "sass-loader": "8.0.2", - "script-ext-html-webpack-plugin": "2.1.3", - "script-loader": "0.7.2", - "serve-static": "1.13.2", - "svg-sprite-loader": "4.1.3", - "svgo": "1.2.0", - "vue-template-compiler": "2.6.10" + "eslint": "7.15.0", + "eslint-plugin-vue": "7.2.0", + "lint-staged": "10.5.3", + "sass": "1.30.0", + "runjs": "4.4.2", + "sass-loader": "10.1.0", + "script-ext-html-webpack-plugin": "2.1.5", + "svg-sprite-loader": "5.1.1", + "vue-template-compiler": "2.6.12" }, "engines": { "node": ">=8.9", diff --git a/ruoyi-ui/src/assets/images/dark.svg b/ruoyi-ui/src/assets/images/dark.svg new file mode 100644 index 0000000..36b58b5 --- /dev/null +++ b/ruoyi-ui/src/assets/images/dark.svg @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="52px" height="45px" viewBox="0 0 52 45" version="1.1" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink"> + <defs> + <filter x="-9.4%" y="-6.2%" width="118.8%" height="122.5%" filterUnits="objectBoundingBox" id="filter-1"> + <feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset> + <feGaussianBlur stdDeviation="1" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur> + <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix> + <feMerge> + <feMergeNode in="shadowMatrixOuter1"></feMergeNode> + <feMergeNode in="SourceGraphic"></feMergeNode> + </feMerge> + </filter> + <rect id="path-2" x="0" y="0" width="48" height="40" rx="4"></rect> + <filter x="-4.2%" y="-2.5%" width="108.3%" height="110.0%" filterUnits="objectBoundingBox" id="filter-4"> + <feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset> + <feGaussianBlur stdDeviation="0.5" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur> + <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix> + </filter> + </defs> + <g id="閰嶇疆闈㈡澘" width="48" height="40" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> + <g id="setting-copy-2" width="48" height="40" transform="translate(-1190.000000, -136.000000)"> + <g id="Group-8" width="48" height="40" transform="translate(1167.000000, 0.000000)"> + <g id="Group-5-Copy-5" filter="url(#filter-1)" transform="translate(25.000000, 137.000000)"> + <mask id="mask-3" fill="white"> + <use xlink:href="#path-2"></use> + </mask> + <g id="Rectangle-18"> + <use fill="black" fill-opacity="1" filter="url(#filter-4)" xlink:href="#path-2"></use> + <use fill="#F0F2F5" fill-rule="evenodd" xlink:href="#path-2"></use> + </g> + <rect id="Rectangle-11" fill="#FFFFFF" mask="url(#mask-3)" x="0" y="0" width="48" height="10"></rect> + <rect id="Rectangle-18" fill="#303648" mask="url(#mask-3)" x="0" y="0" width="16" height="40"></rect> + </g> + </g> + </g> + </g> +</svg> \ No newline at end of file diff --git a/ruoyi-ui/src/assets/images/light.svg b/ruoyi-ui/src/assets/images/light.svg new file mode 100644 index 0000000..efd52c6 --- /dev/null +++ b/ruoyi-ui/src/assets/images/light.svg @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="52px" height="45px" viewBox="0 0 52 45" version="1.1" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink"> + <defs> + <filter x="-9.4%" y="-6.2%" width="118.8%" height="122.5%" filterUnits="objectBoundingBox" id="filter-1"> + <feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset> + <feGaussianBlur stdDeviation="1" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur> + <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix> + <feMerge> + <feMergeNode in="shadowMatrixOuter1"></feMergeNode> + <feMergeNode in="SourceGraphic"></feMergeNode> + </feMerge> + </filter> + <rect id="path-2" x="0" y="0" width="48" height="40" rx="4"></rect> + <filter x="-4.2%" y="-2.5%" width="108.3%" height="110.0%" filterUnits="objectBoundingBox" id="filter-4"> + <feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset> + <feGaussianBlur stdDeviation="0.5" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur> + <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix> + </filter> + </defs> + <g id="閰嶇疆闈㈡澘" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> + <g id="setting-copy-2" transform="translate(-1254.000000, -136.000000)"> + <g id="Group-8" transform="translate(1167.000000, 0.000000)"> + <g id="Group-5" filter="url(#filter-1)" transform="translate(89.000000, 137.000000)"> + <mask id="mask-3" fill="white"> + <use xlink:href="#path-2"></use> + </mask> + <g id="Rectangle-18"> + <use fill="black" fill-opacity="1" filter="url(#filter-4)" xlink:href="#path-2"></use> + <use fill="#F0F2F5" fill-rule="evenodd" xlink:href="#path-2"></use> + </g> + <rect id="Rectangle-18" fill="#FFFFFF" mask="url(#mask-3)" x="0" y="0" width="16" height="40"></rect> + <rect id="Rectangle-11" fill="#FFFFFF" mask="url(#mask-3)" x="0" y="0" width="48" height="10"></rect> + </g> + </g> + </g> + </g> +</svg> \ No newline at end of file diff --git a/ruoyi-ui/src/assets/image/login-background.jpg b/ruoyi-ui/src/assets/images/login-background.jpg similarity index 100% rename from ruoyi-ui/src/assets/image/login-background.jpg rename to ruoyi-ui/src/assets/images/login-background.jpg Binary files differ diff --git a/ruoyi-ui/src/assets/image/profile.jpg b/ruoyi-ui/src/assets/images/profile.jpg similarity index 100% rename from ruoyi-ui/src/assets/image/profile.jpg rename to ruoyi-ui/src/assets/images/profile.jpg Binary files differ diff --git a/ruoyi-ui/src/assets/styles/ruoyi.scss b/ruoyi-ui/src/assets/styles/ruoyi.scss index d8c6d61..b1a1661 100644 --- a/ruoyi-ui/src/assets/styles/ruoyi.scss +++ b/ruoyi-ui/src/assets/styles/ruoyi.scss @@ -237,4 +237,4 @@ .top-right-btn { position: relative; float: right; -} \ No newline at end of file +} diff --git a/ruoyi-ui/src/assets/styles/sidebar.scss b/ruoyi-ui/src/assets/styles/sidebar.scss index e7464c6..0eb8e78 100644 --- a/ruoyi-ui/src/assets/styles/sidebar.scss +++ b/ruoyi-ui/src/assets/styles/sidebar.scss @@ -8,6 +8,7 @@ } .sidebar-container { + -webkit-transition: width .28s; transition: width 0.28s; width: $sideBarWidth !important; background-color: $menuBg; @@ -19,6 +20,8 @@ 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 { @@ -73,17 +76,25 @@ .submenu-title-noDropdown, .el-submenu__title { &:hover { - background-color: $menuHover !important; + background-color: rgba(0, 0, 0, 0.06) !important; } } - .is-active>.el-submenu__title { + & .theme-dark .is-active > .el-submenu__title { color: $subMenuActiveText !important; } & .nest-menu .el-submenu>.el-submenu__title, & .el-submenu .el-menu-item { min-width: $sideBarWidth !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: $subMenuBg !important; &:hover { @@ -190,7 +201,7 @@ .el-menu-item { &:hover { // you can use $subMenuHover - background-color: $menuHover !important; + background-color: rgba(0, 0, 0, 0.06) !important; } } diff --git a/ruoyi-ui/src/assets/styles/variables.scss b/ruoyi-ui/src/assets/styles/variables.scss index 5688f25..452a1ec 100644 --- a/ruoyi-ui/src/assets/styles/variables.scss +++ b/ruoyi-ui/src/assets/styles/variables.scss @@ -15,6 +15,11 @@ $menuBg:#304156; $menuHover:#263445; +$sidebarTitle: #ffffff; + +$menuLightBg:#ffffff; +$menuLightHover:#f0f1f5; +$sidebarLightTitle: #001529; $subMenuBg:#1f2d3d; $subMenuHover:#001528; @@ -29,7 +34,11 @@ subMenuActiveText: $subMenuActiveText; menuBg: $menuBg; menuHover: $menuHover; + menuLightBg: $menuLightBg; + menuLightHover: $menuLightHover; subMenuBg: $subMenuBg; subMenuHover: $subMenuHover; sideBarWidth: $sideBarWidth; + sidebarTitle: $sidebarTitle; + sidebarLightTitle: $sidebarLightTitle } diff --git a/ruoyi-ui/src/components/HeaderSearch/index.vue b/ruoyi-ui/src/components/HeaderSearch/index.vue index 3b4790d..67f6c30 100644 --- a/ruoyi-ui/src/components/HeaderSearch/index.vue +++ b/ruoyi-ui/src/components/HeaderSearch/index.vue @@ -12,7 +12,7 @@ class="header-search-select" @change="change" > - <el-option v-for="item in options" :key="item.path" :value="item" :label="item.title.join(' > ')" /> + <el-option v-for="option in options" :key="option.item.path" :value="option.item" :label="option.item.title.join(' > ')" /> </el-select> </div> </template> @@ -167,7 +167,7 @@ display: inline-block; vertical-align: middle; - /deep/ .el-input__inner { + ::v-deep .el-input__inner { border-radius: 0; border: 0; padding-left: 0; diff --git a/ruoyi-ui/src/components/Screenfull/index.vue b/ruoyi-ui/src/components/Screenfull/index.vue index 260c90d..d4e539c 100644 --- a/ruoyi-ui/src/components/Screenfull/index.vue +++ b/ruoyi-ui/src/components/Screenfull/index.vue @@ -22,11 +22,8 @@ }, methods: { click() { - if (!screenfull.enabled) { - this.$message({ - message: 'you browser can not work', - type: 'warning' - }) + if (!screenfull.isEnabled) { + this.$message({ message: '浣犵殑娴忚鍣ㄤ笉鏀寔鍏ㄥ睆', type: 'warning' }) return false } screenfull.toggle() @@ -35,12 +32,12 @@ this.isFullscreen = screenfull.isFullscreen }, init() { - if (screenfull.enabled) { + if (screenfull.isEnabled) { screenfull.on('change', this.change) } }, destroy() { - if (screenfull.enabled) { + if (screenfull.isEnabled) { screenfull.off('change', this.change) } } diff --git a/ruoyi-ui/src/layout/components/Settings/index.vue b/ruoyi-ui/src/layout/components/Settings/index.vue index 90d99df..9d42790 100644 --- a/ruoyi-ui/src/layout/components/Settings/index.vue +++ b/ruoyi-ui/src/layout/components/Settings/index.vue @@ -1,12 +1,46 @@ <template> <div class="drawer-container"> <div> - <h3 class="drawer-title">绯荤粺甯冨眬閰嶇疆</h3> + <div class="setting-drawer-content"> + <div class="setting-drawer-title"> + <h3 class="drawer-title">涓婚椋庢牸璁剧疆</h3> + </div> + <div class="setting-drawer-block-checbox"> + <div class="setting-drawer-block-checbox-item" @click="handleTheme('theme-dark')"> + <img src="@/assets/images/dark.svg" alt="dark"> + <div v-if="sideTheme === 'theme-dark'" class="setting-drawer-block-checbox-selectIcon" style="display: block;"> + <i aria-label="鍥炬爣: check" class="anticon anticon-check"> + <svg viewBox="64 64 896 896" data-icon="check" width="1em" height="1em" :fill="theme" aria-hidden="true" + focusable="false" class=""> + <path + d="M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 0 0-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"/> + </svg> + </i> + </div> + </div> + <div class="setting-drawer-block-checbox-item" @click="handleTheme('theme-light')"> + <img src="@/assets/images/light.svg" alt="light"> + <div v-if="sideTheme === 'theme-light'" class="setting-drawer-block-checbox-selectIcon" style="display: block;"> + <i aria-label="鍥炬爣: check" class="anticon anticon-check"> + <svg viewBox="64 64 896 896" data-icon="check" width="1em" height="1em" :fill="theme" aria-hidden="true" + focusable="false" class=""> + <path + d="M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 0 0-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"/> + </svg> + </i> + </div> + </div> + </div> - <div class="drawer-item"> - <span>涓婚棰滆壊</span> - <theme-picker style="float: right;height: 26px;margin: -3px 8px 0 0;" @change="themeChange" /> + <div class="drawer-item"> + <span>涓婚棰滆壊</span> + <theme-picker style="float: right;height: 26px;margin: -3px 8px 0 0;" @change="themeChange" /> + </div> </div> + + <el-divider/> + + <h3 class="drawer-title">绯荤粺甯冨眬閰嶇疆</h3> <div class="drawer-item"> <span>寮�鍚� Tags-Views</span> @@ -36,6 +70,12 @@ return {} }, computed: { + theme() { + return this.$store.state.settings.theme + }, + sideTheme() { + return this.$store.state.settings.sideTheme + }, fixedHeader: { get() { return this.$store.state.settings.fixedHeader @@ -76,33 +116,82 @@ key: 'theme', value: val }) + }, + handleTheme(val) { + this.$store.dispatch('settings/changeSetting', { + key: 'sideTheme', + value: val + }) } } } </script> <style lang="scss" scoped> -.drawer-container { - padding: 24px; - font-size: 14px; - line-height: 1.5; - word-wrap: break-word; + .setting-drawer-content { + .setting-drawer-title { + margin-bottom: 12px; + color: rgba(0, 0, 0, .85); + font-size: 14px; + line-height: 22px; + font-weight: bold; + } - .drawer-title { - margin-bottom: 12px; - color: rgba(0, 0, 0, .85); + .setting-drawer-block-checbox { + display: flex; + justify-content: flex-start; + align-items: center; + margin-top: 10px; + margin-bottom: 20px; + + .setting-drawer-block-checbox-item { + position: relative; + margin-right: 16px; + border-radius: 2px; + cursor: pointer; + + img { + width: 48px; + height: 48px; + } + + .setting-drawer-block-checbox-selectIcon { + position: absolute; + top: 0; + right: 0; + width: 100%; + height: 100%; + padding-top: 15px; + padding-left: 24px; + color: #1890ff; + font-weight: 700; + font-size: 14px; + } + } + } + } + + .drawer-container { + padding: 24px; font-size: 14px; - line-height: 22px; - } + line-height: 1.5; + word-wrap: break-word; - .drawer-item { - color: rgba(0, 0, 0, .65); - font-size: 14px; - padding: 12px 0; - } + .drawer-title { + margin-bottom: 12px; + color: rgba(0, 0, 0, .85); + font-size: 14px; + line-height: 22px; + } - .drawer-switch { - float: right + .drawer-item { + color: rgba(0, 0, 0, .65); + font-size: 14px; + padding: 12px 0; + } + + .drawer-switch { + float: right + } } -} </style> diff --git a/ruoyi-ui/src/layout/components/Sidebar/Logo.vue b/ruoyi-ui/src/layout/components/Sidebar/Logo.vue index 410d432..57dbd3a 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/Logo.vue +++ b/ruoyi-ui/src/layout/components/Sidebar/Logo.vue @@ -1,13 +1,13 @@ <template> - <div class="sidebar-logo-container" :class="{'collapse':collapse}"> + <div class="sidebar-logo-container" :class="{'collapse':collapse}" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }"> <transition name="sidebarLogoFade"> <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/"> <img v-if="logo" :src="logo" class="sidebar-logo"> - <h1 v-else class="sidebar-title">{{ title }} </h1> + <h1 v-else class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.sidebarTitle : variables.sidebarLightTitle }">{{ title }} </h1> </router-link> <router-link v-else key="expand" class="sidebar-logo-link" to="/"> <img v-if="logo" :src="logo" class="sidebar-logo"> - <h1 class="sidebar-title">{{ title }} </h1> + <h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.sidebarTitle : variables.sidebarLightTitle }">{{ title }} </h1> </router-link> </transition> </div> @@ -15,6 +15,7 @@ <script> import logoImg from '@/assets/logo/logo.png' +import variables from '@/assets/styles/variables.scss' export default { name: 'SidebarLogo', @@ -24,6 +25,14 @@ required: true } }, + computed: { + variables() { + return variables; + }, + sideTheme() { + return this.$store.state.settings.sideTheme + } + }, data() { return { title: '鑻ヤ緷绠$悊绯荤粺', diff --git a/ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue b/ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue index 7289ddf..c4febee 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue +++ b/ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue @@ -56,6 +56,9 @@ }, methods: { hasOneShowingChild(children = [], parent) { + if (!children) { + children = []; + } const showingChildren = children.filter(item => { if (item.hidden) { return false diff --git a/ruoyi-ui/src/layout/components/Sidebar/index.vue b/ruoyi-ui/src/layout/components/Sidebar/index.vue index c030aa1..54670a3 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/index.vue +++ b/ruoyi-ui/src/layout/components/Sidebar/index.vue @@ -1,12 +1,12 @@ <template> - <div :class="{'has-logo':showLogo}"> + <div :class="{'has-logo':showLogo}" :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }"> <logo v-if="showLogo" :collapse="isCollapse" /> - <el-scrollbar wrap-class="scrollbar-wrapper"> + <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper"> <el-menu :default-active="activeMenu" :collapse="isCollapse" - :background-color="variables.menuBg" - :text-color="variables.menuText" + :background-color="settings.sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg" + :text-color="settings.sideTheme === 'theme-dark' ? variables.menuText : 'rgba(0,0,0,.65)'" :unique-opened="true" :active-text-color="settings.theme" :collapse-transition="false" diff --git a/ruoyi-ui/src/layout/components/TagsView/ScrollPane.vue b/ruoyi-ui/src/layout/components/TagsView/ScrollPane.vue index 34a7e55..bb753a1 100644 --- a/ruoyi-ui/src/layout/components/TagsView/ScrollPane.vue +++ b/ruoyi-ui/src/layout/components/TagsView/ScrollPane.vue @@ -82,7 +82,7 @@ position: relative; overflow: hidden; width: 100%; - /deep/ { + ::v-deep { .el-scrollbar__bar { bottom: 0px; } diff --git a/ruoyi-ui/src/layout/index.vue b/ruoyi-ui/src/layout/index.vue index 889b7dc..d490771 100644 --- a/ruoyi-ui/src/layout/index.vue +++ b/ruoyi-ui/src/layout/index.vue @@ -1,7 +1,7 @@ <template> - <div :class="classObj" class="app-wrapper"> - <div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" /> - <sidebar class="sidebar-container" /> + <div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}"> + <div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/> + <sidebar class="sidebar-container" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" /> <div :class="{hasTagsView:needTagsView}" class="main-container"> <div :class="{'fixed-header':fixedHeader}"> <navbar /> @@ -20,6 +20,7 @@ import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components' import ResizeMixin from './mixin/ResizeHandler' import { mapState } from 'vuex' +import variables from '@/assets/styles/variables.scss' export default { name: 'Layout', @@ -34,6 +35,8 @@ mixins: [ResizeMixin], computed: { ...mapState({ + theme: state => state.settings.theme, + sideTheme: state => state.settings.sideTheme, sidebar: state => state.app.sidebar, device: state => state.app.device, showSettings: state => state.settings.showSettings, @@ -47,6 +50,9 @@ withoutAnimation: this.sidebar.withoutAnimation, mobile: this.device === 'mobile' } + }, + variables() { + return variables; } }, methods: { diff --git a/ruoyi-ui/src/main.js b/ruoyi-ui/src/main.js index 7c5d08b..71bab79 100644 --- a/ruoyi-ui/src/main.js +++ b/ruoyi-ui/src/main.js @@ -2,8 +2,6 @@ import Cookies from 'js-cookie' -import 'normalize.css/normalize.css' // a modern alternative to CSS resets - import Element from 'element-ui' import './assets/styles/element-variables.scss' diff --git a/ruoyi-ui/src/settings.js b/ruoyi-ui/src/settings.js index 6edb05b..40a7f15 100644 --- a/ruoyi-ui/src/settings.js +++ b/ruoyi-ui/src/settings.js @@ -2,6 +2,11 @@ title: '鑻ヤ緷绠$悊绯荤粺', /** + * 渚ц竟鏍忎富棰� 娣辫壊涓婚theme-dark锛屾祬鑹蹭富棰榯heme-light + */ + sideTheme: 'theme-dark', + + /** * 鏄惁绯荤粺甯冨眬閰嶇疆 */ showSettings: false, diff --git a/ruoyi-ui/src/store/modules/settings.js b/ruoyi-ui/src/store/modules/settings.js index a1152a9..8bd81a3 100644 --- a/ruoyi-ui/src/store/modules/settings.js +++ b/ruoyi-ui/src/store/modules/settings.js @@ -1,10 +1,11 @@ import variables from '@/assets/styles/element-variables.scss' import defaultSettings from '@/settings' -const { showSettings, tagsView, fixedHeader, sidebarLogo } = defaultSettings +const { sideTheme, showSettings, tagsView, fixedHeader, sidebarLogo } = defaultSettings const state = { theme: variables.theme, + sideTheme: sideTheme, showSettings: showSettings, tagsView: tagsView, fixedHeader: fixedHeader, diff --git a/ruoyi-ui/src/store/modules/user.js b/ruoyi-ui/src/store/modules/user.js index 767d334..66a7287 100644 --- a/ruoyi-ui/src/store/modules/user.js +++ b/ruoyi-ui/src/store/modules/user.js @@ -51,7 +51,7 @@ return new Promise((resolve, reject) => { getInfo(state.token).then(res => { const user = res.user - const avatar = user.avatar == "" ? require("@/assets/image/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar; + const avatar = user.avatar == "" ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar; if (res.roles && res.roles.length > 0) { // 楠岃瘉杩斿洖鐨剅oles鏄惁鏄竴涓潪绌烘暟缁� commit('SET_ROLES', res.roles) commit('SET_PERMISSIONS', res.permissions) @@ -66,7 +66,7 @@ }) }) }, - + // 閫�鍑虹郴缁� LogOut({ commit, state }) { return new Promise((resolve, reject) => { diff --git a/ruoyi-ui/src/views/login.vue b/ruoyi-ui/src/views/login.vue index 19e45c7..246670b 100644 --- a/ruoyi-ui/src/views/login.vue +++ b/ruoyi-ui/src/views/login.vue @@ -148,7 +148,7 @@ justify-content: center; align-items: center; height: 100%; - background-image: url("../assets/image/login-background.jpg"); + background-image: url("../assets/images/login-background.jpg"); background-size: cover; } .title { diff --git a/ruoyi-ui/src/views/monitor/cache/index.vue b/ruoyi-ui/src/views/monitor/cache/index.vue index d8e1275..98eed22 100644 --- a/ruoyi-ui/src/views/monitor/cache/index.vue +++ b/ruoyi-ui/src/views/monitor/cache/index.vue @@ -123,6 +123,8 @@ { name: "宄板��", type: "gauge", + min: 0, + max: 1000, detail: { formatter: this.cache.info.used_memory_human, }, diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue index f7a4575..77994db 100644 --- a/ruoyi-ui/src/views/system/user/index.vue +++ b/ruoyi-ui/src/views/system/user/index.vue @@ -421,14 +421,10 @@ nickName: [ { required: true, message: "鐢ㄦ埛鏄电О涓嶈兘涓虹┖", trigger: "blur" } ], - deptId: [ - { required: true, message: "褰掑睘閮ㄩ棬涓嶈兘涓虹┖", trigger: "change" } - ], password: [ { required: true, message: "鐢ㄦ埛瀵嗙爜涓嶈兘涓虹┖", trigger: "blur" } ], email: [ - { required: true, message: "閭鍦板潃涓嶈兘涓虹┖", trigger: "blur" }, { type: "email", message: "'璇疯緭鍏ユ纭殑閭鍦板潃", @@ -436,7 +432,6 @@ } ], phonenumber: [ - { required: true, message: "鎵嬫満鍙风爜涓嶈兘涓虹┖", trigger: "blur" }, { pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: "璇疯緭鍏ユ纭殑鎵嬫満鍙风爜", diff --git a/ruoyi-ui/src/views/system/user/profile/resetPwd.vue b/ruoyi-ui/src/views/system/user/profile/resetPwd.vue index ee65240..86073d3 100644 --- a/ruoyi-ui/src/views/system/user/profile/resetPwd.vue +++ b/ruoyi-ui/src/views/system/user/profile/resetPwd.vue @@ -18,6 +18,7 @@ <script> import { updateUserPwd } from "@/api/system/user"; +import Global from "@/layout/components/global.js"; export default { data() { @@ -64,6 +65,7 @@ }); }, close() { + Global.$emit("removeCache", "closeSelectedTag", this.$route); this.$store.dispatch("tagsView/delView", this.$route); this.$router.push({ path: "/index" }); } diff --git a/ruoyi-ui/src/views/system/user/profile/userInfo.vue b/ruoyi-ui/src/views/system/user/profile/userInfo.vue index 3627a28..6b68311 100644 --- a/ruoyi-ui/src/views/system/user/profile/userInfo.vue +++ b/ruoyi-ui/src/views/system/user/profile/userInfo.vue @@ -2,7 +2,7 @@ <el-form ref="form" :model="user" :rules="rules" label-width="80px"> <el-form-item label="鐢ㄦ埛鏄电О" prop="nickName"> <el-input v-model="user.nickName" /> - </el-form-item> + </el-form-item> <el-form-item label="鎵嬫満鍙风爜" prop="phonenumber"> <el-input v-model="user.phonenumber" maxlength="11" /> </el-form-item> @@ -24,6 +24,7 @@ <script> import { updateUserProfile } from "@/api/system/user"; +import Global from "@/layout/components/global.js"; export default { props: { @@ -68,6 +69,7 @@ }); }, close() { + Global.$emit("removeCache", "closeSelectedTag", this.$route); this.$store.dispatch("tagsView/delView", this.$route); this.$router.push({ path: "/index" }); } diff --git a/ruoyi-ui/src/views/tool/gen/editTable.vue b/ruoyi-ui/src/views/tool/gen/editTable.vue index 9ecab45..db1c31d 100644 --- a/ruoyi-ui/src/views/tool/gen/editTable.vue +++ b/ruoyi-ui/src/views/tool/gen/editTable.vue @@ -127,6 +127,7 @@ import { getGenTable, updateGenTable } from "@/api/tool/gen"; import { optionselect as getDictOptionselect } from "@/api/system/dict/type"; import { listMenu as getMenuTreeselect } from "@/api/system/menu"; +import Global from "@/layout/components/global.js"; import basicInfoForm from "./basicInfoForm"; import genInfoForm from "./genInfoForm"; import Sortable from 'sortablejs' @@ -207,6 +208,7 @@ }, /** 鍏抽棴鎸夐挳 */ close() { + Global.$emit("removeCache", "closeSelectedTag", this.$route); this.$store.dispatch("tagsView/delView", this.$route); this.$router.push({ path: "/tool/gen", query: { t: Date.now()}}) } diff --git a/ruoyi-ui/src/views/tool/gen/index.vue b/ruoyi-ui/src/views/tool/gen/index.vue index 732ee64..828bb1f 100644 --- a/ruoyi-ui/src/views/tool/gen/index.vue +++ b/ruoyi-ui/src/views/tool/gen/index.vue @@ -159,7 +159,7 @@ <!-- 棰勮鐣岄潰 --> <el-dialog :title="preview.title" :visible.sync="preview.open" width="80%" top="5vh" append-to-body> <el-tabs v-model="preview.activeName"> - <el-tab-pane + <el-tab-pane style="overflow-x: scroll;" v-for="(value, key) in preview.data" :label="key.substring(key.lastIndexOf('/')+1,key.indexOf('.vm'))" :name="key.substring(key.lastIndexOf('/')+1,key.indexOf('.vm'))" @@ -317,4 +317,4 @@ } } }; -</script> \ No newline at end of file +</script> diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index 974da00..c68960b 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -109,8 +109,8 @@ }) config.optimization.runtimeChunk('single'), { - from: path.resolve(__dirname, './public/robots.txt'),//闃茬埇铏枃浠� - to:'./',//鍒版牴鐩綍涓� + from: path.resolve(__dirname, './public/robots.txt'), //闃茬埇铏枃浠� + to: './', //鍒版牴鐩綍涓� } } ) -- Gitblit v1.9.3