Merge remote-tracking branch 'upstream/master'
正在显示
27 个修改的文件
包含
359 行增加
和
107 行删除
| @@ -6,8 +6,8 @@ | @@ -6,8 +6,8 @@ | ||
| 6 | * 支持加载动态权限菜单,多方式轻松权限控制。 | 6 | * 支持加载动态权限菜单,多方式轻松权限控制。 |
| 7 | * 高效率开发,使用代码生成器可以一键生成前后端代码。 | 7 | * 高效率开发,使用代码生成器可以一键生成前后端代码。 |
| 8 | * 提供了一个Oracle版本[RuoYi-Vue-Oracle](https://github.com/yangzongzhuan/RuoYi-Vue-Oracle),保持同步更新。 | 8 | * 提供了一个Oracle版本[RuoYi-Vue-Oracle](https://github.com/yangzongzhuan/RuoYi-Vue-Oracle),保持同步更新。 |
| 9 | -* 感谢[Vue-Element-Admin](https://github.com/PanJiaChen/vue-element-admin),[eladmin-web](https://gitee.com/elunez/eladmin-web?_from=gitee_search)。 | ||
| 10 | * 不分离版本,请移步[RuoYi](https://gitee.com/y_project/RuoYi),微服务版本,请移步[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud) | 9 | * 不分离版本,请移步[RuoYi](https://gitee.com/y_project/RuoYi),微服务版本,请移步[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud) |
| 10 | +* 感谢[Vue-Element-Admin](https://github.com/PanJiaChen/vue-element-admin),[eladmin-web](https://gitee.com/elunez/eladmin-web?_from=gitee_search)。 | ||
| 11 | * 阿里云优惠券:[点我进入](https://www.aliyun.com/minisite/goods?userCode=brki8iof&share_source=copy_link),腾讯云优惠券:[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console) | 11 | * 阿里云优惠券:[点我进入](https://www.aliyun.com/minisite/goods?userCode=brki8iof&share_source=copy_link),腾讯云优惠券:[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console) |
| 12 | 12 | ||
| 13 | ## 内置功能 | 13 | ## 内置功能 |
| @@ -46,27 +46,27 @@ | @@ -46,27 +46,27 @@ | ||
| 46 | <td><img src="https://oscimg.oschina.net/oscnet/1cbcf0e6f257c7d3a063c0e3f2ff989e4b3.jpg"/></td> | 46 | <td><img src="https://oscimg.oschina.net/oscnet/1cbcf0e6f257c7d3a063c0e3f2ff989e4b3.jpg"/></td> |
| 47 | </tr> | 47 | </tr> |
| 48 | <tr> | 48 | <tr> |
| 49 | - <td><img src="https://oscimg.oschina.net/oscnet/707825ad3f29de74a8d6d02fbd73ad631ea.jpg"/></td> | ||
| 50 | - <td><img src="https://oscimg.oschina.net/oscnet/46be40cc6f01aa300eed53a19b5012bf484.jpg"/></td> | 49 | + <td><img src="https://oscimg.oschina.net/oscnet/up-8074972883b5ba0622e13246738ebba237a.png"/></td> |
| 50 | + <td><img src="https://oscimg.oschina.net/oscnet/up-9f88719cdfca9af2e58b352a20e23d43b12.png"/></td> | ||
| 51 | </tr> | 51 | </tr> |
| 52 | <tr> | 52 | <tr> |
| 53 | - <td><img src="https://oscimg.oschina.net/oscnet/4284796d4cea240d181b8f2201813dda710.jpg"/></td> | ||
| 54 | - <td><img src="https://oscimg.oschina.net/oscnet/3ecfac87a049f7fe36abbcaafb2c40d36cf.jpg"/></td> | 53 | + <td><img src="https://oscimg.oschina.net/oscnet/up-39bf2584ec3a529b0d5a3b70d15c9b37646.png"/></td> |
| 54 | + <td><img src="https://oscimg.oschina.net/oscnet/up-936ec82d1f4872e1bc980927654b6007307.png"/></td> | ||
| 55 | </tr> | 55 | </tr> |
| 56 | <tr> | 56 | <tr> |
| 57 | - <td><img src="https://oscimg.oschina.net/oscnet/71c2d48905221a09a728df4aff4160b8607.jpg"/></td> | ||
| 58 | - <td><img src="https://oscimg.oschina.net/oscnet/c14c1ee9a64a6a9c2c22f67d43198767dbe.jpg"/></td> | 57 | + <td><img src="https://oscimg.oschina.net/oscnet/up-b2d62ceb95d2dd9b3fbe157bb70d26001e9.png"/></td> |
| 58 | + <td><img src="https://oscimg.oschina.net/oscnet/up-d67451d308b7a79ad6819723396f7c3d77a.png"/></td> | ||
| 59 | </tr> | 59 | </tr> |
| 60 | <tr> | 60 | <tr> |
| 61 | <td><img src="https://oscimg.oschina.net/oscnet/5e8c387724954459291aafd5eb52b456f53.jpg"/></td> | 61 | <td><img src="https://oscimg.oschina.net/oscnet/5e8c387724954459291aafd5eb52b456f53.jpg"/></td> |
| 62 | <td><img src="https://oscimg.oschina.net/oscnet/644e78da53c2e92a95dfda4f76e6d117c4b.jpg"/></td> | 62 | <td><img src="https://oscimg.oschina.net/oscnet/644e78da53c2e92a95dfda4f76e6d117c4b.jpg"/></td> |
| 63 | </tr> | 63 | </tr> |
| 64 | <tr> | 64 | <tr> |
| 65 | - <td><img src="https://oscimg.oschina.net/oscnet/fdea1d8bb8625c27bf964176a2c8ebc6945.jpg"/></td> | ||
| 66 | - <td><img src="https://oscimg.oschina.net/oscnet/509d2708cfd762b6e6339364cac1cc1970c.jpg"/></td> | 65 | + <td><img src="https://oscimg.oschina.net/oscnet/up-8370a0d02977eebf6dbf854c8450293c937.png"/></td> |
| 66 | + <td><img src="https://oscimg.oschina.net/oscnet/up-49003ed83f60f633e7153609a53a2b644f7.png"/></td> | ||
| 67 | </tr> | 67 | </tr> |
| 68 | <tr> | 68 | <tr> |
| 69 | - <td><img src="https://oscimg.oschina.net/oscnet/up-f1fd681cc9d295db74e85ad6d2fe4389454.png"/></td> | 69 | + <td><img src="https://oscimg.oschina.net/oscnet/up-d4fe726319ece268d4746602c39cffc0621.png"/></td> |
| 70 | <td><img src="https://oscimg.oschina.net/oscnet/up-c195234bbcd30be6927f037a6755e6ab69c.png"/></td> | 70 | <td><img src="https://oscimg.oschina.net/oscnet/up-c195234bbcd30be6927f037a6755e6ab69c.png"/></td> |
| 71 | </tr> | 71 | </tr> |
| 72 | <tr> | 72 | <tr> |
| @@ -17,11 +17,17 @@ import com.ruoyi.common.constant.UserConstants; | @@ -17,11 +17,17 @@ import com.ruoyi.common.constant.UserConstants; | ||
| 17 | import com.ruoyi.common.core.controller.BaseController; | 17 | import com.ruoyi.common.core.controller.BaseController; |
| 18 | import com.ruoyi.common.core.domain.AjaxResult; | 18 | import com.ruoyi.common.core.domain.AjaxResult; |
| 19 | import com.ruoyi.common.core.domain.entity.SysRole; | 19 | import com.ruoyi.common.core.domain.entity.SysRole; |
| 20 | +import com.ruoyi.common.core.domain.model.LoginUser; | ||
| 20 | import com.ruoyi.common.core.page.TableDataInfo; | 21 | import com.ruoyi.common.core.page.TableDataInfo; |
| 21 | import com.ruoyi.common.enums.BusinessType; | 22 | import com.ruoyi.common.enums.BusinessType; |
| 22 | import com.ruoyi.common.utils.SecurityUtils; | 23 | import com.ruoyi.common.utils.SecurityUtils; |
| 24 | +import com.ruoyi.common.utils.ServletUtils; | ||
| 25 | +import com.ruoyi.common.utils.StringUtils; | ||
| 23 | import com.ruoyi.common.utils.poi.ExcelUtil; | 26 | import com.ruoyi.common.utils.poi.ExcelUtil; |
| 27 | +import com.ruoyi.framework.web.service.SysPermissionService; | ||
| 28 | +import com.ruoyi.framework.web.service.TokenService; | ||
| 24 | import com.ruoyi.system.service.ISysRoleService; | 29 | import com.ruoyi.system.service.ISysRoleService; |
| 30 | +import com.ruoyi.system.service.ISysUserService; | ||
| 25 | 31 | ||
| 26 | /** | 32 | /** |
| 27 | * 角色信息 | 33 | * 角色信息 |
| @@ -35,6 +41,15 @@ public class SysRoleController extends BaseController | @@ -35,6 +41,15 @@ public class SysRoleController extends BaseController | ||
| 35 | @Autowired | 41 | @Autowired |
| 36 | private ISysRoleService roleService; | 42 | private ISysRoleService roleService; |
| 37 | 43 | ||
| 44 | + @Autowired | ||
| 45 | + private TokenService tokenService; | ||
| 46 | + | ||
| 47 | + @Autowired | ||
| 48 | + private SysPermissionService permissionService; | ||
| 49 | + | ||
| 50 | + @Autowired | ||
| 51 | + private ISysUserService userService; | ||
| 52 | + | ||
| 38 | @PreAuthorize("@ss.hasPermi('system:role:list')") | 53 | @PreAuthorize("@ss.hasPermi('system:role:list')") |
| 39 | @GetMapping("/list") | 54 | @GetMapping("/list") |
| 40 | public TableDataInfo list(SysRole role) | 55 | public TableDataInfo list(SysRole role) |
| @@ -103,7 +118,20 @@ public class SysRoleController extends BaseController | @@ -103,7 +118,20 @@ public class SysRoleController extends BaseController | ||
| 103 | return AjaxResult.error("修改角色'" + role.getRoleName() + "'失败,角色权限已存在"); | 118 | return AjaxResult.error("修改角色'" + role.getRoleName() + "'失败,角色权限已存在"); |
| 104 | } | 119 | } |
| 105 | role.setUpdateBy(SecurityUtils.getUsername()); | 120 | role.setUpdateBy(SecurityUtils.getUsername()); |
| 106 | - return toAjax(roleService.updateRole(role)); | 121 | + |
| 122 | + if (roleService.updateRole(role) > 0) | ||
| 123 | + { | ||
| 124 | + // 更新缓存用户权限 | ||
| 125 | + LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); | ||
| 126 | + if (StringUtils.isNotNull(loginUser.getUser()) && !loginUser.getUser().isAdmin()) | ||
| 127 | + { | ||
| 128 | + loginUser.setPermissions(permissionService.getMenuPermission(loginUser.getUser())); | ||
| 129 | + loginUser.setUser(userService.selectUserByUserName(loginUser.getUser().getUserName())); | ||
| 130 | + tokenService.setLoginUser(loginUser); | ||
| 131 | + } | ||
| 132 | + return AjaxResult.success(); | ||
| 133 | + } | ||
| 134 | + return AjaxResult.error("修改角色'" + role.getRoleName() + "'失败,请联系管理员"); | ||
| 107 | } | 135 | } |
| 108 | 136 | ||
| 109 | /** | 137 | /** |
| @@ -61,6 +61,11 @@ public class Constants | @@ -61,6 +61,11 @@ public class Constants | ||
| 61 | * 登录用户 redis key | 61 | * 登录用户 redis key |
| 62 | */ | 62 | */ |
| 63 | public static final String LOGIN_TOKEN_KEY = "login_tokens:"; | 63 | public static final String LOGIN_TOKEN_KEY = "login_tokens:"; |
| 64 | + | ||
| 65 | + /** | ||
| 66 | + * 防重提交 redis key | ||
| 67 | + */ | ||
| 68 | + public static final String REPEAT_SUBMIT_KEY = "repeat_submit:"; | ||
| 64 | 69 | ||
| 65 | /** | 70 | /** |
| 66 | * 验证码有效期(分钟) | 71 | * 验证码有效期(分钟) |
| @@ -5,8 +5,10 @@ import java.util.Map; | @@ -5,8 +5,10 @@ import java.util.Map; | ||
| 5 | import java.util.concurrent.TimeUnit; | 5 | import java.util.concurrent.TimeUnit; |
| 6 | import javax.servlet.http.HttpServletRequest; | 6 | import javax.servlet.http.HttpServletRequest; |
| 7 | import org.springframework.beans.factory.annotation.Autowired; | 7 | import org.springframework.beans.factory.annotation.Autowired; |
| 8 | +import org.springframework.beans.factory.annotation.Value; | ||
| 8 | import org.springframework.stereotype.Component; | 9 | import org.springframework.stereotype.Component; |
| 9 | import com.alibaba.fastjson.JSONObject; | 10 | import com.alibaba.fastjson.JSONObject; |
| 11 | +import com.ruoyi.common.constant.Constants; | ||
| 10 | import com.ruoyi.common.core.redis.RedisCache; | 12 | import com.ruoyi.common.core.redis.RedisCache; |
| 11 | import com.ruoyi.common.filter.RepeatedlyRequestWrapper; | 13 | import com.ruoyi.common.filter.RepeatedlyRequestWrapper; |
| 12 | import com.ruoyi.common.utils.StringUtils; | 14 | import com.ruoyi.common.utils.StringUtils; |
| @@ -26,7 +28,9 @@ public class SameUrlDataInterceptor extends RepeatSubmitInterceptor | @@ -26,7 +28,9 @@ public class SameUrlDataInterceptor extends RepeatSubmitInterceptor | ||
| 26 | 28 | ||
| 27 | public final String REPEAT_TIME = "repeatTime"; | 29 | public final String REPEAT_TIME = "repeatTime"; |
| 28 | 30 | ||
| 29 | - public final String CACHE_REPEAT_KEY = "repeatData"; | 31 | + // 令牌自定义标识 |
| 32 | + @Value("${token.header}") | ||
| 33 | + private String header; | ||
| 30 | 34 | ||
| 31 | @Autowired | 35 | @Autowired |
| 32 | private RedisCache redisCache; | 36 | private RedisCache redisCache; |
| @@ -62,7 +66,10 @@ public class SameUrlDataInterceptor extends RepeatSubmitInterceptor | @@ -62,7 +66,10 @@ public class SameUrlDataInterceptor extends RepeatSubmitInterceptor | ||
| 62 | // 请求地址(作为存放cache的key值) | 66 | // 请求地址(作为存放cache的key值) |
| 63 | String url = request.getRequestURI(); | 67 | String url = request.getRequestURI(); |
| 64 | 68 | ||
| 65 | - Object sessionObj = redisCache.getCacheObject(CACHE_REPEAT_KEY); | 69 | + // 唯一标识(指定key + 消息头) |
| 70 | + String cache_repeat_key = Constants.REPEAT_SUBMIT_KEY + request.getHeader(header); | ||
| 71 | + | ||
| 72 | + Object sessionObj = redisCache.getCacheObject(cache_repeat_key); | ||
| 66 | if (sessionObj != null) | 73 | if (sessionObj != null) |
| 67 | { | 74 | { |
| 68 | Map<String, Object> sessionMap = (Map<String, Object>) sessionObj; | 75 | Map<String, Object> sessionMap = (Map<String, Object>) sessionObj; |
| @@ -77,7 +84,7 @@ public class SameUrlDataInterceptor extends RepeatSubmitInterceptor | @@ -77,7 +84,7 @@ public class SameUrlDataInterceptor extends RepeatSubmitInterceptor | ||
| 77 | } | 84 | } |
| 78 | Map<String, Object> cacheMap = new HashMap<String, Object>(); | 85 | Map<String, Object> cacheMap = new HashMap<String, Object>(); |
| 79 | cacheMap.put(url, nowDataMap); | 86 | cacheMap.put(url, nowDataMap); |
| 80 | - redisCache.setCacheObject(CACHE_REPEAT_KEY, cacheMap, intervalTime, TimeUnit.SECONDS); | 87 | + redisCache.setCacheObject(cache_repeat_key, cacheMap, intervalTime, TimeUnit.SECONDS); |
| 81 | return false; | 88 | return false; |
| 82 | } | 89 | } |
| 83 | 90 |
| 1 | <template> | 1 | <template> |
| 2 | <div class="app-container"> | 2 | <div class="app-container"> |
| 3 | - <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> | 3 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| 4 | #foreach($column in $columns) | 4 | #foreach($column in $columns) |
| 5 | #if($column.query) | 5 | #if($column.query) |
| 6 | #set($dictType=$column.dictType) | 6 | #set($dictType=$column.dictType) |
| @@ -51,23 +51,30 @@ | @@ -51,23 +51,30 @@ | ||
| 51 | #end | 51 | #end |
| 52 | #end | 52 | #end |
| 53 | <el-form-item> | 53 | <el-form-item> |
| 54 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | ||
| 55 | + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | ||
| 56 | + </el-form-item> | ||
| 57 | + </el-form> | ||
| 58 | + | ||
| 59 | + <el-row :gutter="10" class="mb8"> | ||
| 60 | + <el-col :span="1.5"> | ||
| 54 | <el-button | 61 | <el-button |
| 55 | - class="filter-item" | ||
| 56 | - type="primary" | ||
| 57 | - icon="el-icon-search" | ||
| 58 | - size="mini" | ||
| 59 | - @click="handleQuery" | ||
| 60 | - >搜索</el-button> | ||
| 61 | - <el-button | ||
| 62 | - class="filter-item" | ||
| 63 | type="primary" | 62 | type="primary" |
| 64 | icon="el-icon-plus" | 63 | icon="el-icon-plus" |
| 65 | size="mini" | 64 | size="mini" |
| 66 | @click="handleAdd" | 65 | @click="handleAdd" |
| 67 | v-hasPermi="['${moduleName}:${businessName}:add']" | 66 | v-hasPermi="['${moduleName}:${businessName}:add']" |
| 68 | >新增</el-button> | 67 | >新增</el-button> |
| 69 | - </el-form-item> | ||
| 70 | - </el-form> | 68 | + </el-col> |
| 69 | + <div class="top-right-btn"> | ||
| 70 | + <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | ||
| 71 | + <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> | ||
| 72 | + </el-tooltip> | ||
| 73 | + <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top"> | ||
| 74 | + <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> | ||
| 75 | + </el-tooltip> | ||
| 76 | + </div> | ||
| 77 | + </el-row> | ||
| 71 | 78 | ||
| 72 | <el-table | 79 | <el-table |
| 73 | v-loading="loading" | 80 | v-loading="loading" |
| @@ -229,6 +236,8 @@ export default { | @@ -229,6 +236,8 @@ export default { | ||
| 229 | return { | 236 | return { |
| 230 | // 遮罩层 | 237 | // 遮罩层 |
| 231 | loading: true, | 238 | loading: true, |
| 239 | + // 显示搜索条件 | ||
| 240 | + showSearch: true, | ||
| 232 | // ${functionName}表格数据 | 241 | // ${functionName}表格数据 |
| 233 | ${businessName}List: [], | 242 | ${businessName}List: [], |
| 234 | // ${functionName}树选项 | 243 | // ${functionName}树选项 |
| 1 | <template> | 1 | <template> |
| 2 | <div class="app-container"> | 2 | <div class="app-container"> |
| 3 | - <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> | 3 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| 4 | #foreach($column in $columns) | 4 | #foreach($column in $columns) |
| 5 | #if($column.query) | 5 | #if($column.query) |
| 6 | #set($dictType=$column.dictType) | 6 | #set($dictType=$column.dictType) |
| @@ -51,7 +51,7 @@ | @@ -51,7 +51,7 @@ | ||
| 51 | #end | 51 | #end |
| 52 | #end | 52 | #end |
| 53 | <el-form-item> | 53 | <el-form-item> |
| 54 | - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | 54 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| 55 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | 55 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| 56 | </el-form-item> | 56 | </el-form-item> |
| 57 | </el-form> | 57 | </el-form> |
| @@ -95,6 +95,14 @@ | @@ -95,6 +95,14 @@ | ||
| 95 | v-hasPermi="['${moduleName}:${businessName}:export']" | 95 | v-hasPermi="['${moduleName}:${businessName}:export']" |
| 96 | >导出</el-button> | 96 | >导出</el-button> |
| 97 | </el-col> | 97 | </el-col> |
| 98 | + <div class="top-right-btn"> | ||
| 99 | + <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | ||
| 100 | + <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> | ||
| 101 | + </el-tooltip> | ||
| 102 | + <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top"> | ||
| 103 | + <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> | ||
| 104 | + </el-tooltip> | ||
| 105 | + </div> | ||
| 98 | </el-row> | 106 | </el-row> |
| 99 | 107 | ||
| 100 | <el-table v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange"> | 108 | <el-table v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange"> |
| @@ -260,6 +268,8 @@ export default { | @@ -260,6 +268,8 @@ export default { | ||
| 260 | single: true, | 268 | single: true, |
| 261 | // 非多个禁用 | 269 | // 非多个禁用 |
| 262 | multiple: true, | 270 | multiple: true, |
| 271 | + // 显示搜索条件 | ||
| 272 | + showSearch: true, | ||
| 263 | // 总条数 | 273 | // 总条数 |
| 264 | total: 0, | 274 | total: 0, |
| 265 | // ${functionName}表格数据 | 275 | // ${functionName}表格数据 |
| @@ -77,8 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -77,8 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 77 | 77 | ||
| 78 | <select id="checkDeptNameUnique" resultMap="SysDeptResult"> | 78 | <select id="checkDeptNameUnique" resultMap="SysDeptResult"> |
| 79 | <include refid="selectDeptVo"/> | 79 | <include refid="selectDeptVo"/> |
| 80 | - where dept_name=#{deptName} and parent_id = #{parentId} | ||
| 81 | - limit 1 | 80 | + where dept_name=#{deptName} and parent_id = #{parentId} limit 1 |
| 82 | </select> | 81 | </select> |
| 83 | 82 | ||
| 84 | <insert id="insertDept" parameterType="SysDept"> | 83 | <insert id="insertDept" parameterType="SysDept"> |
| 1 | module.exports = { | 1 | module.exports = { |
| 2 | presets: [ | 2 | presets: [ |
| 3 | - '@vue/app' | ||
| 4 | - ] | 3 | + // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app |
| 4 | + '@vue/cli-plugin-babel/preset' | ||
| 5 | + ], | ||
| 6 | + 'env': { | ||
| 7 | + 'development': { | ||
| 8 | + // babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require(). | ||
| 9 | + // This plugin can significantly increase the speed of hot updates, when you have a large number of pages. | ||
| 10 | + 'plugins': ['dynamic-import-node'] | ||
| 11 | + } | ||
| 12 | + } | ||
| 5 | } | 13 | } |
| @@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
| 5 | "author": "若依", | 5 | "author": "若依", |
| 6 | "license": "MIT", | 6 | "license": "MIT", |
| 7 | "scripts": { | 7 | "scripts": { |
| 8 | - "dev": "vue-cli-service serve --open", | 8 | + "dev": "vue-cli-service serve", |
| 9 | "build:prod": "vue-cli-service build", | 9 | "build:prod": "vue-cli-service build", |
| 10 | "build:stage": "vue-cli-service build --mode staging", | 10 | "build:stage": "vue-cli-service build --mode staging", |
| 11 | "preview": "node build/index.js --preview", | 11 | "preview": "node build/index.js --preview", |
| @@ -43,10 +43,11 @@ | @@ -43,10 +43,11 @@ | ||
| 43 | "@riophae/vue-treeselect": "0.4.0", | 43 | "@riophae/vue-treeselect": "0.4.0", |
| 44 | "axios": "0.18.1", | 44 | "axios": "0.18.1", |
| 45 | "clipboard": "2.0.4", | 45 | "clipboard": "2.0.4", |
| 46 | + "core-js": "3.6.5", | ||
| 46 | "echarts": "4.2.1", | 47 | "echarts": "4.2.1", |
| 47 | "element-ui": "2.13.2", | 48 | "element-ui": "2.13.2", |
| 48 | "file-saver": "2.0.1", | 49 | "file-saver": "2.0.1", |
| 49 | - "js-beautify": "^1.10.2", | 50 | + "js-beautify": "1.10.2", |
| 50 | "fuse.js": "3.4.4", | 51 | "fuse.js": "3.4.4", |
| 51 | "js-cookie": "2.2.0", | 52 | "js-cookie": "2.2.0", |
| 52 | "jsencrypt": "3.0.0-rc.1", | 53 | "jsencrypt": "3.0.0-rc.1", |
| @@ -65,32 +66,31 @@ | @@ -65,32 +66,31 @@ | ||
| 65 | "vuex": "3.1.0" | 66 | "vuex": "3.1.0" |
| 66 | }, | 67 | }, |
| 67 | "devDependencies": { | 68 | "devDependencies": { |
| 68 | - "@vue/cli-plugin-babel": "3.5.3", | ||
| 69 | - "@vue/cli-plugin-eslint": "^3.9.1", | ||
| 70 | - "@vue/cli-plugin-unit-jest": "3.5.3", | ||
| 71 | - "@vue/cli-service": "3.5.3", | 69 | + "@vue/cli-plugin-babel": "4.4.4", |
| 70 | + "@vue/cli-plugin-eslint": "4.4.4", | ||
| 71 | + "@vue/cli-plugin-unit-jest": "4.4.4", | ||
| 72 | + "@vue/cli-service": "4.4.4", | ||
| 72 | "@vue/test-utils": "1.0.0-beta.29", | 73 | "@vue/test-utils": "1.0.0-beta.29", |
| 73 | - "autoprefixer": "^9.5.1", | ||
| 74 | - "babel-core": "7.0.0-bridge.0", | ||
| 75 | - "babel-eslint": "10.0.1", | 74 | + "autoprefixer": "9.5.1", |
| 75 | + "babel-eslint": "10.1.0", | ||
| 76 | "babel-jest": "23.6.0", | 76 | "babel-jest": "23.6.0", |
| 77 | + "babel-plugin-dynamic-import-node": "2.3.3", | ||
| 77 | "chalk": "2.4.2", | 78 | "chalk": "2.4.2", |
| 78 | "chokidar": "2.1.5", | 79 | "chokidar": "2.1.5", |
| 79 | "connect": "3.6.6", | 80 | "connect": "3.6.6", |
| 80 | - "eslint": "5.15.3", | ||
| 81 | - "eslint-plugin-vue": "5.2.2", | 81 | + "eslint": "6.7.2", |
| 82 | + "eslint-plugin-vue": "6.2.2", | ||
| 82 | "html-webpack-plugin": "3.2.0", | 83 | "html-webpack-plugin": "3.2.0", |
| 83 | - "http-proxy-middleware": "^0.19.1", | ||
| 84 | "husky": "1.3.1", | 84 | "husky": "1.3.1", |
| 85 | "lint-staged": "8.1.5", | 85 | "lint-staged": "8.1.5", |
| 86 | "mockjs": "1.0.1-beta3", | 86 | "mockjs": "1.0.1-beta3", |
| 87 | "plop": "2.3.0", | 87 | "plop": "2.3.0", |
| 88 | - "runjs": "^4.3.2", | ||
| 89 | - "sass": "^1.26.10", | ||
| 90 | - "sass-loader": "^7.1.0", | 88 | + "runjs": "4.3.2", |
| 89 | + "sass": "1.26.10", | ||
| 90 | + "sass-loader": "8.0.2", | ||
| 91 | "script-ext-html-webpack-plugin": "2.1.3", | 91 | "script-ext-html-webpack-plugin": "2.1.3", |
| 92 | "script-loader": "0.7.2", | 92 | "script-loader": "0.7.2", |
| 93 | - "serve-static": "^1.13.2", | 93 | + "serve-static": "1.13.2", |
| 94 | "svg-sprite-loader": "4.1.3", | 94 | "svg-sprite-loader": "4.1.3", |
| 95 | "svgo": "1.2.0", | 95 | "svgo": "1.2.0", |
| 96 | "vue-template-compiler": "2.6.10" | 96 | "vue-template-compiler": "2.6.10" |
| @@ -142,7 +142,28 @@ | @@ -142,7 +142,28 @@ | ||
| 142 | padding-left: 15px; | 142 | padding-left: 15px; |
| 143 | margin-bottom: 10px; | 143 | margin-bottom: 10px; |
| 144 | } | 144 | } |
| 145 | - | 145 | + |
| 146 | +/* button color */ | ||
| 147 | +.el-button--cyan.is-active, | ||
| 148 | +.el-button--cyan:active { | ||
| 149 | + background: #20B2AA; | ||
| 150 | + border-color: #20B2AA; | ||
| 151 | + color: #FFFFFF; | ||
| 152 | +} | ||
| 153 | + | ||
| 154 | +.el-button--cyan:focus, | ||
| 155 | +.el-button--cyan:hover { | ||
| 156 | + background: #48D1CC; | ||
| 157 | + border-color: #48D1CC; | ||
| 158 | + color: #FFFFFF; | ||
| 159 | +} | ||
| 160 | + | ||
| 161 | +.el-button--cyan { | ||
| 162 | + background-color: #20B2AA; | ||
| 163 | + border-color: #20B2AA; | ||
| 164 | + color: #FFFFFF; | ||
| 165 | +} | ||
| 166 | + | ||
| 146 | /* text color */ | 167 | /* text color */ |
| 147 | .text-navy { | 168 | .text-navy { |
| 148 | color: #1ab394; | 169 | color: #1ab394; |
| @@ -198,4 +219,8 @@ | @@ -198,4 +219,8 @@ | ||
| 198 | opacity: .8; | 219 | opacity: .8; |
| 199 | color: #fff!important; | 220 | color: #fff!important; |
| 200 | background: #42b983!important; | 221 | background: #42b983!important; |
| 222 | +} | ||
| 223 | + | ||
| 224 | +.top-right-btn { | ||
| 225 | + float: right; | ||
| 201 | } | 226 | } |
| @@ -30,7 +30,7 @@ service.interceptors.response.use(res => { | @@ -30,7 +30,7 @@ service.interceptors.response.use(res => { | ||
| 30 | // 未设置状态码则默认成功状态 | 30 | // 未设置状态码则默认成功状态 |
| 31 | const code = res.data.code || 200; | 31 | const code = res.data.code || 200; |
| 32 | // 获取错误信息 | 32 | // 获取错误信息 |
| 33 | - const message = errorCode[code] || res.data.msg || errorCode['default'] | 33 | + const msg = errorCode[code] || res.data.msg || errorCode['default'] |
| 34 | if (code === 401) { | 34 | if (code === 401) { |
| 35 | MessageBox.confirm( | 35 | MessageBox.confirm( |
| 36 | '登录状态已过期,您可以继续留在该页面,或者重新登录', | 36 | '登录状态已过期,您可以继续留在该页面,或者重新登录', |
| @@ -47,13 +47,13 @@ service.interceptors.response.use(res => { | @@ -47,13 +47,13 @@ service.interceptors.response.use(res => { | ||
| 47 | }) | 47 | }) |
| 48 | } else if (code === 500) { | 48 | } else if (code === 500) { |
| 49 | Message({ | 49 | Message({ |
| 50 | - message: message, | 50 | + message: msg, |
| 51 | type: 'error' | 51 | type: 'error' |
| 52 | }) | 52 | }) |
| 53 | - return Promise.reject(new Error(message)) | 53 | + return Promise.reject(new Error(msg)) |
| 54 | } else if (code !== 200) { | 54 | } else if (code !== 200) { |
| 55 | Notification.error({ | 55 | Notification.error({ |
| 56 | - title: message | 56 | + title: msg |
| 57 | }) | 57 | }) |
| 58 | return Promise.reject('error') | 58 | return Promise.reject('error') |
| 59 | } else { | 59 | } else { |
| @@ -62,8 +62,18 @@ service.interceptors.response.use(res => { | @@ -62,8 +62,18 @@ service.interceptors.response.use(res => { | ||
| 62 | }, | 62 | }, |
| 63 | error => { | 63 | error => { |
| 64 | console.log('err' + error) | 64 | console.log('err' + error) |
| 65 | + let { message } = error; | ||
| 66 | + if (message == "Network Error") { | ||
| 67 | + message = "后端接口连接异常"; | ||
| 68 | + } | ||
| 69 | + else if (message.includes("timeout")) { | ||
| 70 | + message = "系统接口请求超时"; | ||
| 71 | + } | ||
| 72 | + else if (message.includes("Request failed with status code")) { | ||
| 73 | + message = "系统接口" + message.substr(message.length - 3) + "异常"; | ||
| 74 | + } | ||
| 65 | Message({ | 75 | Message({ |
| 66 | - message: error.message, | 76 | + message: message, |
| 67 | type: 'error', | 77 | type: 'error', |
| 68 | duration: 5 * 1000 | 78 | duration: 5 * 1000 |
| 69 | }) | 79 | }) |
| 1 | <template> | 1 | <template> |
| 2 | <div class="app-container"> | 2 | <div class="app-container"> |
| 3 | - <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> | 3 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| 4 | <el-form-item label="任务名称" prop="jobName"> | 4 | <el-form-item label="任务名称" prop="jobName"> |
| 5 | <el-input | 5 | <el-input |
| 6 | v-model="queryParams.jobName" | 6 | v-model="queryParams.jobName" |
| @@ -31,7 +31,7 @@ | @@ -31,7 +31,7 @@ | ||
| 31 | </el-select> | 31 | </el-select> |
| 32 | </el-form-item> | 32 | </el-form-item> |
| 33 | <el-form-item> | 33 | <el-form-item> |
| 34 | - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | 34 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| 35 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | 35 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| 36 | </el-form-item> | 36 | </el-form-item> |
| 37 | </el-form> | 37 | </el-form> |
| @@ -84,6 +84,14 @@ | @@ -84,6 +84,14 @@ | ||
| 84 | v-hasPermi="['monitor:job:query']" | 84 | v-hasPermi="['monitor:job:query']" |
| 85 | >日志</el-button> | 85 | >日志</el-button> |
| 86 | </el-col> | 86 | </el-col> |
| 87 | + <div class="top-right-btn"> | ||
| 88 | + <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | ||
| 89 | + <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> | ||
| 90 | + </el-tooltip> | ||
| 91 | + <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top"> | ||
| 92 | + <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> | ||
| 93 | + </el-tooltip> | ||
| 94 | + </div> | ||
| 87 | </el-row> | 95 | </el-row> |
| 88 | 96 | ||
| 89 | <el-table v-loading="loading" :data="jobList" @selection-change="handleSelectionChange"> | 97 | <el-table v-loading="loading" :data="jobList" @selection-change="handleSelectionChange"> |
| @@ -274,6 +282,8 @@ export default { | @@ -274,6 +282,8 @@ export default { | ||
| 274 | single: true, | 282 | single: true, |
| 275 | // 非多个禁用 | 283 | // 非多个禁用 |
| 276 | multiple: true, | 284 | multiple: true, |
| 285 | + // 显示搜索条件 | ||
| 286 | + showSearch: true, | ||
| 277 | // 总条数 | 287 | // 总条数 |
| 278 | total: 0, | 288 | total: 0, |
| 279 | // 定时任务表格数据 | 289 | // 定时任务表格数据 |
| 1 | <template> | 1 | <template> |
| 2 | <div class="app-container"> | 2 | <div class="app-container"> |
| 3 | - <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> | 3 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| 4 | <el-form-item label="任务名称" prop="jobName"> | 4 | <el-form-item label="任务名称" prop="jobName"> |
| 5 | <el-input | 5 | <el-input |
| 6 | v-model="queryParams.jobName" | 6 | v-model="queryParams.jobName" |
| @@ -56,7 +56,7 @@ | @@ -56,7 +56,7 @@ | ||
| 56 | ></el-date-picker> | 56 | ></el-date-picker> |
| 57 | </el-form-item> | 57 | </el-form-item> |
| 58 | <el-form-item> | 58 | <el-form-item> |
| 59 | - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | 59 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| 60 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | 60 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| 61 | </el-form-item> | 61 | </el-form-item> |
| 62 | </el-form> | 62 | </el-form> |
| @@ -90,6 +90,14 @@ | @@ -90,6 +90,14 @@ | ||
| 90 | v-hasPermi="['monitor:job:export']" | 90 | v-hasPermi="['monitor:job:export']" |
| 91 | >导出</el-button> | 91 | >导出</el-button> |
| 92 | </el-col> | 92 | </el-col> |
| 93 | + <div class="top-right-btn"> | ||
| 94 | + <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | ||
| 95 | + <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> | ||
| 96 | + </el-tooltip> | ||
| 97 | + <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top"> | ||
| 98 | + <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> | ||
| 99 | + </el-tooltip> | ||
| 100 | + </div> | ||
| 93 | </el-row> | 101 | </el-row> |
| 94 | 102 | ||
| 95 | <el-table v-loading="loading" :data="jobLogList" @selection-change="handleSelectionChange"> | 103 | <el-table v-loading="loading" :data="jobLogList" @selection-change="handleSelectionChange"> |
| @@ -175,6 +183,8 @@ export default { | @@ -175,6 +183,8 @@ export default { | ||
| 175 | ids: [], | 183 | ids: [], |
| 176 | // 非多个禁用 | 184 | // 非多个禁用 |
| 177 | multiple: true, | 185 | multiple: true, |
| 186 | + // 显示搜索条件 | ||
| 187 | + showSearch: true, | ||
| 178 | // 总条数 | 188 | // 总条数 |
| 179 | total: 0, | 189 | total: 0, |
| 180 | // 调度日志表格数据 | 190 | // 调度日志表格数据 |
| 1 | <template> | 1 | <template> |
| 2 | <div class="app-container"> | 2 | <div class="app-container"> |
| 3 | - <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> | 3 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| 4 | <el-form-item label="登录地址" prop="ipaddr"> | 4 | <el-form-item label="登录地址" prop="ipaddr"> |
| 5 | <el-input | 5 | <el-input |
| 6 | v-model="queryParams.ipaddr" | 6 | v-model="queryParams.ipaddr" |
| @@ -50,7 +50,7 @@ | @@ -50,7 +50,7 @@ | ||
| 50 | ></el-date-picker> | 50 | ></el-date-picker> |
| 51 | </el-form-item> | 51 | </el-form-item> |
| 52 | <el-form-item> | 52 | <el-form-item> |
| 53 | - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | 53 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| 54 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | 54 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| 55 | </el-form-item> | 55 | </el-form-item> |
| 56 | </el-form> | 56 | </el-form> |
| @@ -84,6 +84,14 @@ | @@ -84,6 +84,14 @@ | ||
| 84 | v-hasPermi="['system:logininfor:export']" | 84 | v-hasPermi="['system:logininfor:export']" |
| 85 | >导出</el-button> | 85 | >导出</el-button> |
| 86 | </el-col> | 86 | </el-col> |
| 87 | + <div class="top-right-btn"> | ||
| 88 | + <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | ||
| 89 | + <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> | ||
| 90 | + </el-tooltip> | ||
| 91 | + <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top"> | ||
| 92 | + <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> | ||
| 93 | + </el-tooltip> | ||
| 94 | + </div> | ||
| 87 | </el-row> | 95 | </el-row> |
| 88 | 96 | ||
| 89 | <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange"> | 97 | <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange"> |
| @@ -126,6 +134,8 @@ export default { | @@ -126,6 +134,8 @@ export default { | ||
| 126 | ids: [], | 134 | ids: [], |
| 127 | // 非多个禁用 | 135 | // 非多个禁用 |
| 128 | multiple: true, | 136 | multiple: true, |
| 137 | + // 显示搜索条件 | ||
| 138 | + showSearch: true, | ||
| 129 | // 总条数 | 139 | // 总条数 |
| 130 | total: 0, | 140 | total: 0, |
| 131 | // 表格数据 | 141 | // 表格数据 |
| @@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
| 20 | /> | 20 | /> |
| 21 | </el-form-item> | 21 | </el-form-item> |
| 22 | <el-form-item> | 22 | <el-form-item> |
| 23 | - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | 23 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| 24 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | 24 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| 25 | </el-form-item> | 25 | </el-form-item> |
| 26 | </el-form> | 26 | </el-form> |
| 1 | <template> | 1 | <template> |
| 2 | <div class="app-container"> | 2 | <div class="app-container"> |
| 3 | - <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> | 3 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| 4 | <el-form-item label="系统模块" prop="title"> | 4 | <el-form-item label="系统模块" prop="title"> |
| 5 | <el-input | 5 | <el-input |
| 6 | v-model="queryParams.title" | 6 | v-model="queryParams.title" |
| @@ -66,7 +66,7 @@ | @@ -66,7 +66,7 @@ | ||
| 66 | ></el-date-picker> | 66 | ></el-date-picker> |
| 67 | </el-form-item> | 67 | </el-form-item> |
| 68 | <el-form-item> | 68 | <el-form-item> |
| 69 | - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | 69 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| 70 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | 70 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| 71 | </el-form-item> | 71 | </el-form-item> |
| 72 | </el-form> | 72 | </el-form> |
| @@ -100,6 +100,14 @@ | @@ -100,6 +100,14 @@ | ||
| 100 | v-hasPermi="['system:config:export']" | 100 | v-hasPermi="['system:config:export']" |
| 101 | >导出</el-button> | 101 | >导出</el-button> |
| 102 | </el-col> | 102 | </el-col> |
| 103 | + <div class="top-right-btn"> | ||
| 104 | + <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | ||
| 105 | + <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> | ||
| 106 | + </el-tooltip> | ||
| 107 | + <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top"> | ||
| 108 | + <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> | ||
| 109 | + </el-tooltip> | ||
| 110 | + </div> | ||
| 103 | </el-row> | 111 | </el-row> |
| 104 | 112 | ||
| 105 | <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange"> | 113 | <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange"> |
| @@ -195,6 +203,8 @@ export default { | @@ -195,6 +203,8 @@ export default { | ||
| 195 | ids: [], | 203 | ids: [], |
| 196 | // 非多个禁用 | 204 | // 非多个禁用 |
| 197 | multiple: true, | 205 | multiple: true, |
| 206 | + // 显示搜索条件 | ||
| 207 | + showSearch: true, | ||
| 198 | // 总条数 | 208 | // 总条数 |
| 199 | total: 0, | 209 | total: 0, |
| 200 | // 表格数据 | 210 | // 表格数据 |
| 1 | <template> | 1 | <template> |
| 2 | <div class="app-container"> | 2 | <div class="app-container"> |
| 3 | - <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> | 3 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| 4 | <el-form-item label="参数名称" prop="configName"> | 4 | <el-form-item label="参数名称" prop="configName"> |
| 5 | <el-input | 5 | <el-input |
| 6 | v-model="queryParams.configName" | 6 | v-model="queryParams.configName" |
| @@ -44,7 +44,7 @@ | @@ -44,7 +44,7 @@ | ||
| 44 | ></el-date-picker> | 44 | ></el-date-picker> |
| 45 | </el-form-item> | 45 | </el-form-item> |
| 46 | <el-form-item> | 46 | <el-form-item> |
| 47 | - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | 47 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| 48 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | 48 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| 49 | </el-form-item> | 49 | </el-form-item> |
| 50 | </el-form> | 50 | </el-form> |
| @@ -97,6 +97,14 @@ | @@ -97,6 +97,14 @@ | ||
| 97 | v-hasPermi="['system:config:remove']" | 97 | v-hasPermi="['system:config:remove']" |
| 98 | >清理缓存</el-button> | 98 | >清理缓存</el-button> |
| 99 | </el-col> | 99 | </el-col> |
| 100 | + <div class="top-right-btn"> | ||
| 101 | + <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | ||
| 102 | + <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> | ||
| 103 | + </el-tooltip> | ||
| 104 | + <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top"> | ||
| 105 | + <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> | ||
| 106 | + </el-tooltip> | ||
| 107 | + </div> | ||
| 100 | </el-row> | 108 | </el-row> |
| 101 | 109 | ||
| 102 | <el-table v-loading="loading" :data="configList" @selection-change="handleSelectionChange"> | 110 | <el-table v-loading="loading" :data="configList" @selection-change="handleSelectionChange"> |
| @@ -188,6 +196,8 @@ export default { | @@ -188,6 +196,8 @@ export default { | ||
| 188 | single: true, | 196 | single: true, |
| 189 | // 非多个禁用 | 197 | // 非多个禁用 |
| 190 | multiple: true, | 198 | multiple: true, |
| 199 | + // 显示搜索条件 | ||
| 200 | + showSearch: true, | ||
| 191 | // 总条数 | 201 | // 总条数 |
| 192 | total: 0, | 202 | total: 0, |
| 193 | // 参数表格数据 | 203 | // 参数表格数据 |
| 1 | <template> | 1 | <template> |
| 2 | <div class="app-container"> | 2 | <div class="app-container"> |
| 3 | - <el-form :inline="true"> | ||
| 4 | - <el-form-item label="部门名称"> | 3 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"> |
| 4 | + <el-form-item label="部门名称" prop="deptName"> | ||
| 5 | <el-input | 5 | <el-input |
| 6 | v-model="queryParams.deptName" | 6 | v-model="queryParams.deptName" |
| 7 | placeholder="请输入部门名称" | 7 | placeholder="请输入部门名称" |
| @@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
| 10 | @keyup.enter.native="handleQuery" | 10 | @keyup.enter.native="handleQuery" |
| 11 | /> | 11 | /> |
| 12 | </el-form-item> | 12 | </el-form-item> |
| 13 | - <el-form-item label="状态"> | 13 | + <el-form-item label="状态" prop="status"> |
| 14 | <el-select v-model="queryParams.status" placeholder="部门状态" clearable size="small"> | 14 | <el-select v-model="queryParams.status" placeholder="部门状态" clearable size="small"> |
| 15 | <el-option | 15 | <el-option |
| 16 | v-for="dict in statusOptions" | 16 | v-for="dict in statusOptions" |
| @@ -21,23 +21,30 @@ | @@ -21,23 +21,30 @@ | ||
| 21 | </el-select> | 21 | </el-select> |
| 22 | </el-form-item> | 22 | </el-form-item> |
| 23 | <el-form-item> | 23 | <el-form-item> |
| 24 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | ||
| 25 | + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | ||
| 26 | + </el-form-item> | ||
| 27 | + </el-form> | ||
| 28 | + | ||
| 29 | + <el-row :gutter="10" class="mb8"> | ||
| 30 | + <el-col :span="1.5"> | ||
| 24 | <el-button | 31 | <el-button |
| 25 | - class="filter-item" | ||
| 26 | - type="primary" | ||
| 27 | - icon="el-icon-search" | ||
| 28 | - size="mini" | ||
| 29 | - @click="handleQuery" | ||
| 30 | - >搜索</el-button> | ||
| 31 | - <el-button | ||
| 32 | - class="filter-item" | ||
| 33 | type="primary" | 32 | type="primary" |
| 34 | icon="el-icon-plus" | 33 | icon="el-icon-plus" |
| 35 | size="mini" | 34 | size="mini" |
| 36 | @click="handleAdd" | 35 | @click="handleAdd" |
| 37 | v-hasPermi="['system:dept:add']" | 36 | v-hasPermi="['system:dept:add']" |
| 38 | >新增</el-button> | 37 | >新增</el-button> |
| 39 | - </el-form-item> | ||
| 40 | - </el-form> | 38 | + </el-col> |
| 39 | + <div class="top-right-btn"> | ||
| 40 | + <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | ||
| 41 | + <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> | ||
| 42 | + </el-tooltip> | ||
| 43 | + <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top"> | ||
| 44 | + <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> | ||
| 45 | + </el-tooltip> | ||
| 46 | + </div> | ||
| 47 | + </el-row> | ||
| 41 | 48 | ||
| 42 | <el-table | 49 | <el-table |
| 43 | v-loading="loading" | 50 | v-loading="loading" |
| @@ -149,6 +156,8 @@ export default { | @@ -149,6 +156,8 @@ export default { | ||
| 149 | return { | 156 | return { |
| 150 | // 遮罩层 | 157 | // 遮罩层 |
| 151 | loading: true, | 158 | loading: true, |
| 159 | + // 显示搜索条件 | ||
| 160 | + showSearch: true, | ||
| 152 | // 表格树数据 | 161 | // 表格树数据 |
| 153 | deptList: [], | 162 | deptList: [], |
| 154 | // 部门树选项 | 163 | // 部门树选项 |
| @@ -247,6 +256,11 @@ export default { | @@ -247,6 +256,11 @@ export default { | ||
| 247 | handleQuery() { | 256 | handleQuery() { |
| 248 | this.getList(); | 257 | this.getList(); |
| 249 | }, | 258 | }, |
| 259 | + /** 重置按钮操作 */ | ||
| 260 | + resetQuery() { | ||
| 261 | + this.resetForm("queryForm"); | ||
| 262 | + this.handleQuery(); | ||
| 263 | + }, | ||
| 250 | /** 新增按钮操作 */ | 264 | /** 新增按钮操作 */ |
| 251 | handleAdd(row) { | 265 | handleAdd(row) { |
| 252 | this.reset(); | 266 | this.reset(); |
| 1 | <template> | 1 | <template> |
| 2 | <div class="app-container"> | 2 | <div class="app-container"> |
| 3 | - <el-form :model="queryParams" ref="queryForm" :inline="true"> | 3 | + <el-form :model="queryParams" ref="queryForm" v-show="showSearch" :inline="true"> |
| 4 | <el-form-item label="字典名称" prop="dictType"> | 4 | <el-form-item label="字典名称" prop="dictType"> |
| 5 | <el-select v-model="queryParams.dictType" size="small"> | 5 | <el-select v-model="queryParams.dictType" size="small"> |
| 6 | <el-option | 6 | <el-option |
| @@ -31,7 +31,7 @@ | @@ -31,7 +31,7 @@ | ||
| 31 | </el-select> | 31 | </el-select> |
| 32 | </el-form-item> | 32 | </el-form-item> |
| 33 | <el-form-item> | 33 | <el-form-item> |
| 34 | - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | 34 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| 35 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | 35 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| 36 | </el-form-item> | 36 | </el-form-item> |
| 37 | </el-form> | 37 | </el-form> |
| @@ -75,6 +75,14 @@ | @@ -75,6 +75,14 @@ | ||
| 75 | v-hasPermi="['system:dict:export']" | 75 | v-hasPermi="['system:dict:export']" |
| 76 | >导出</el-button> | 76 | >导出</el-button> |
| 77 | </el-col> | 77 | </el-col> |
| 78 | + <div class="top-right-btn"> | ||
| 79 | + <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | ||
| 80 | + <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> | ||
| 81 | + </el-tooltip> | ||
| 82 | + <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top"> | ||
| 83 | + <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> | ||
| 84 | + </el-tooltip> | ||
| 85 | + </div> | ||
| 78 | </el-row> | 86 | </el-row> |
| 79 | 87 | ||
| 80 | <el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange"> | 88 | <el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange"> |
| @@ -170,6 +178,8 @@ export default { | @@ -170,6 +178,8 @@ export default { | ||
| 170 | single: true, | 178 | single: true, |
| 171 | // 非多个禁用 | 179 | // 非多个禁用 |
| 172 | multiple: true, | 180 | multiple: true, |
| 181 | + // 显示搜索条件 | ||
| 182 | + showSearch: true, | ||
| 173 | // 总条数 | 183 | // 总条数 |
| 174 | total: 0, | 184 | total: 0, |
| 175 | // 字典表格数据 | 185 | // 字典表格数据 |
| 1 | <template> | 1 | <template> |
| 2 | <div class="app-container"> | 2 | <div class="app-container"> |
| 3 | - <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> | 3 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| 4 | <el-form-item label="字典名称" prop="dictName"> | 4 | <el-form-item label="字典名称" prop="dictName"> |
| 5 | <el-input | 5 | <el-input |
| 6 | v-model="queryParams.dictName" | 6 | v-model="queryParams.dictName" |
| @@ -50,7 +50,7 @@ | @@ -50,7 +50,7 @@ | ||
| 50 | ></el-date-picker> | 50 | ></el-date-picker> |
| 51 | </el-form-item> | 51 | </el-form-item> |
| 52 | <el-form-item> | 52 | <el-form-item> |
| 53 | - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | 53 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| 54 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | 54 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| 55 | </el-form-item> | 55 | </el-form-item> |
| 56 | </el-form> | 56 | </el-form> |
| @@ -103,6 +103,14 @@ | @@ -103,6 +103,14 @@ | ||
| 103 | v-hasPermi="['system:dict:remove']" | 103 | v-hasPermi="['system:dict:remove']" |
| 104 | >清理缓存</el-button> | 104 | >清理缓存</el-button> |
| 105 | </el-col> | 105 | </el-col> |
| 106 | + <div class="top-right-btn"> | ||
| 107 | + <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | ||
| 108 | + <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> | ||
| 109 | + </el-tooltip> | ||
| 110 | + <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top"> | ||
| 111 | + <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> | ||
| 112 | + </el-tooltip> | ||
| 113 | + </div> | ||
| 106 | </el-row> | 114 | </el-row> |
| 107 | 115 | ||
| 108 | <el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange"> | 116 | <el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange"> |
| @@ -196,6 +204,8 @@ export default { | @@ -196,6 +204,8 @@ export default { | ||
| 196 | single: true, | 204 | single: true, |
| 197 | // 非多个禁用 | 205 | // 非多个禁用 |
| 198 | multiple: true, | 206 | multiple: true, |
| 207 | + // 显示搜索条件 | ||
| 208 | + showSearch: true, | ||
| 199 | // 总条数 | 209 | // 总条数 |
| 200 | total: 0, | 210 | total: 0, |
| 201 | // 字典表格数据 | 211 | // 字典表格数据 |
| 1 | <template> | 1 | <template> |
| 2 | <div class="app-container"> | 2 | <div class="app-container"> |
| 3 | - <el-form :inline="true"> | ||
| 4 | - <el-form-item label="菜单名称"> | 3 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch"> |
| 4 | + <el-form-item label="菜单名称" prop="menuName"> | ||
| 5 | <el-input | 5 | <el-input |
| 6 | v-model="queryParams.menuName" | 6 | v-model="queryParams.menuName" |
| 7 | placeholder="请输入菜单名称" | 7 | placeholder="请输入菜单名称" |
| @@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
| 10 | @keyup.enter.native="handleQuery" | 10 | @keyup.enter.native="handleQuery" |
| 11 | /> | 11 | /> |
| 12 | </el-form-item> | 12 | </el-form-item> |
| 13 | - <el-form-item label="状态"> | 13 | + <el-form-item label="状态" prop="status"> |
| 14 | <el-select v-model="queryParams.status" placeholder="菜单状态" clearable size="small"> | 14 | <el-select v-model="queryParams.status" placeholder="菜单状态" clearable size="small"> |
| 15 | <el-option | 15 | <el-option |
| 16 | v-for="dict in statusOptions" | 16 | v-for="dict in statusOptions" |
| @@ -21,11 +21,31 @@ | @@ -21,11 +21,31 @@ | ||
| 21 | </el-select> | 21 | </el-select> |
| 22 | </el-form-item> | 22 | </el-form-item> |
| 23 | <el-form-item> | 23 | <el-form-item> |
| 24 | - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | ||
| 25 | - <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:menu:add']">新增</el-button> | 24 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| 25 | + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | ||
| 26 | </el-form-item> | 26 | </el-form-item> |
| 27 | </el-form> | 27 | </el-form> |
| 28 | 28 | ||
| 29 | + <el-row :gutter="10" class="mb8"> | ||
| 30 | + <el-col :span="1.5"> | ||
| 31 | + <el-button | ||
| 32 | + type="primary" | ||
| 33 | + icon="el-icon-plus" | ||
| 34 | + size="mini" | ||
| 35 | + @click="handleAdd" | ||
| 36 | + v-hasPermi="['system:menu:add']" | ||
| 37 | + >新增</el-button> | ||
| 38 | + </el-col> | ||
| 39 | + <div class="top-right-btn"> | ||
| 40 | + <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | ||
| 41 | + <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> | ||
| 42 | + </el-tooltip> | ||
| 43 | + <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top"> | ||
| 44 | + <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> | ||
| 45 | + </el-tooltip> | ||
| 46 | + </div> | ||
| 47 | + </el-row> | ||
| 48 | + | ||
| 29 | <el-table | 49 | <el-table |
| 30 | v-loading="loading" | 50 | v-loading="loading" |
| 31 | :data="menuList" | 51 | :data="menuList" |
| @@ -197,6 +217,8 @@ export default { | @@ -197,6 +217,8 @@ export default { | ||
| 197 | return { | 217 | return { |
| 198 | // 遮罩层 | 218 | // 遮罩层 |
| 199 | loading: true, | 219 | loading: true, |
| 220 | + // 显示搜索条件 | ||
| 221 | + showSearch: true, | ||
| 200 | // 菜单表格树数据 | 222 | // 菜单表格树数据 |
| 201 | menuList: [], | 223 | menuList: [], |
| 202 | // 菜单树选项 | 224 | // 菜单树选项 |
| @@ -310,6 +332,11 @@ export default { | @@ -310,6 +332,11 @@ export default { | ||
| 310 | handleQuery() { | 332 | handleQuery() { |
| 311 | this.getList(); | 333 | this.getList(); |
| 312 | }, | 334 | }, |
| 335 | + /** 重置按钮操作 */ | ||
| 336 | + resetQuery() { | ||
| 337 | + this.resetForm("queryForm"); | ||
| 338 | + this.handleQuery(); | ||
| 339 | + }, | ||
| 313 | /** 新增按钮操作 */ | 340 | /** 新增按钮操作 */ |
| 314 | handleAdd(row) { | 341 | handleAdd(row) { |
| 315 | this.reset(); | 342 | this.reset(); |
| 1 | <template> | 1 | <template> |
| 2 | <div class="app-container"> | 2 | <div class="app-container"> |
| 3 | - <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> | 3 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| 4 | <el-form-item label="公告标题" prop="noticeTitle"> | 4 | <el-form-item label="公告标题" prop="noticeTitle"> |
| 5 | <el-input | 5 | <el-input |
| 6 | v-model="queryParams.noticeTitle" | 6 | v-model="queryParams.noticeTitle" |
| @@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
| 30 | </el-select> | 30 | </el-select> |
| 31 | </el-form-item> | 31 | </el-form-item> |
| 32 | <el-form-item> | 32 | <el-form-item> |
| 33 | - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | 33 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| 34 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | 34 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| 35 | </el-form-item> | 35 | </el-form-item> |
| 36 | </el-form> | 36 | </el-form> |
| @@ -65,6 +65,14 @@ | @@ -65,6 +65,14 @@ | ||
| 65 | v-hasPermi="['system:notice:remove']" | 65 | v-hasPermi="['system:notice:remove']" |
| 66 | >删除</el-button> | 66 | >删除</el-button> |
| 67 | </el-col> | 67 | </el-col> |
| 68 | + <div class="top-right-btn"> | ||
| 69 | + <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | ||
| 70 | + <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> | ||
| 71 | + </el-tooltip> | ||
| 72 | + <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top"> | ||
| 73 | + <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> | ||
| 74 | + </el-tooltip> | ||
| 75 | + </div> | ||
| 68 | </el-row> | 76 | </el-row> |
| 69 | 77 | ||
| 70 | <el-table v-loading="loading" :data="noticeList" @selection-change="handleSelectionChange"> | 78 | <el-table v-loading="loading" :data="noticeList" @selection-change="handleSelectionChange"> |
| @@ -190,6 +198,8 @@ export default { | @@ -190,6 +198,8 @@ export default { | ||
| 190 | single: true, | 198 | single: true, |
| 191 | // 非多个禁用 | 199 | // 非多个禁用 |
| 192 | multiple: true, | 200 | multiple: true, |
| 201 | + // 显示搜索条件 | ||
| 202 | + showSearch: true, | ||
| 193 | // 总条数 | 203 | // 总条数 |
| 194 | total: 0, | 204 | total: 0, |
| 195 | // 公告表格数据 | 205 | // 公告表格数据 |
| 1 | <template> | 1 | <template> |
| 2 | <div class="app-container"> | 2 | <div class="app-container"> |
| 3 | - <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> | 3 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| 4 | <el-form-item label="岗位编码" prop="postCode"> | 4 | <el-form-item label="岗位编码" prop="postCode"> |
| 5 | <el-input | 5 | <el-input |
| 6 | v-model="queryParams.postCode" | 6 | v-model="queryParams.postCode" |
| @@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
| 30 | </el-select> | 30 | </el-select> |
| 31 | </el-form-item> | 31 | </el-form-item> |
| 32 | <el-form-item> | 32 | <el-form-item> |
| 33 | - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | 33 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| 34 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | 34 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| 35 | </el-form-item> | 35 | </el-form-item> |
| 36 | </el-form> | 36 | </el-form> |
| @@ -74,6 +74,14 @@ | @@ -74,6 +74,14 @@ | ||
| 74 | v-hasPermi="['system:post:export']" | 74 | v-hasPermi="['system:post:export']" |
| 75 | >导出</el-button> | 75 | >导出</el-button> |
| 76 | </el-col> | 76 | </el-col> |
| 77 | + <div class="top-right-btn"> | ||
| 78 | + <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | ||
| 79 | + <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> | ||
| 80 | + </el-tooltip> | ||
| 81 | + <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top"> | ||
| 82 | + <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> | ||
| 83 | + </el-tooltip> | ||
| 84 | + </div> | ||
| 77 | </el-row> | 85 | </el-row> |
| 78 | 86 | ||
| 79 | <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange"> | 87 | <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange"> |
| @@ -164,6 +172,8 @@ export default { | @@ -164,6 +172,8 @@ export default { | ||
| 164 | single: true, | 172 | single: true, |
| 165 | // 非多个禁用 | 173 | // 非多个禁用 |
| 166 | multiple: true, | 174 | multiple: true, |
| 175 | + // 显示搜索条件 | ||
| 176 | + showSearch: true, | ||
| 167 | // 总条数 | 177 | // 总条数 |
| 168 | total: 0, | 178 | total: 0, |
| 169 | // 岗位表格数据 | 179 | // 岗位表格数据 |
| 1 | <template> | 1 | <template> |
| 2 | <div class="app-container"> | 2 | <div class="app-container"> |
| 3 | - <el-form :model="queryParams" ref="queryForm" :inline="true"> | 3 | + <el-form :model="queryParams" ref="queryForm" v-show="showSearch" :inline="true"> |
| 4 | <el-form-item label="角色名称" prop="roleName"> | 4 | <el-form-item label="角色名称" prop="roleName"> |
| 5 | <el-input | 5 | <el-input |
| 6 | v-model="queryParams.roleName" | 6 | v-model="queryParams.roleName" |
| @@ -50,7 +50,7 @@ | @@ -50,7 +50,7 @@ | ||
| 50 | ></el-date-picker> | 50 | ></el-date-picker> |
| 51 | </el-form-item> | 51 | </el-form-item> |
| 52 | <el-form-item> | 52 | <el-form-item> |
| 53 | - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | 53 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| 54 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | 54 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| 55 | </el-form-item> | 55 | </el-form-item> |
| 56 | </el-form> | 56 | </el-form> |
| @@ -94,6 +94,14 @@ | @@ -94,6 +94,14 @@ | ||
| 94 | v-hasPermi="['system:role:export']" | 94 | v-hasPermi="['system:role:export']" |
| 95 | >导出</el-button> | 95 | >导出</el-button> |
| 96 | </el-col> | 96 | </el-col> |
| 97 | + <div class="top-right-btn"> | ||
| 98 | + <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | ||
| 99 | + <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> | ||
| 100 | + </el-tooltip> | ||
| 101 | + <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top"> | ||
| 102 | + <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> | ||
| 103 | + </el-tooltip> | ||
| 104 | + </div> | ||
| 97 | </el-row> | 105 | </el-row> |
| 98 | 106 | ||
| 99 | <el-table v-loading="loading" :data="roleList" @selection-change="handleSelectionChange"> | 107 | <el-table v-loading="loading" :data="roleList" @selection-change="handleSelectionChange"> |
| @@ -249,6 +257,8 @@ export default { | @@ -249,6 +257,8 @@ export default { | ||
| 249 | single: true, | 257 | single: true, |
| 250 | // 非多个禁用 | 258 | // 非多个禁用 |
| 251 | multiple: true, | 259 | multiple: true, |
| 260 | + // 显示搜索条件 | ||
| 261 | + showSearch: true, | ||
| 252 | // 总条数 | 262 | // 总条数 |
| 253 | total: 0, | 263 | total: 0, |
| 254 | // 角色表格数据 | 264 | // 角色表格数据 |
| @@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
| 27 | </el-col> | 27 | </el-col> |
| 28 | <!--用户数据--> | 28 | <!--用户数据--> |
| 29 | <el-col :span="20" :xs="24"> | 29 | <el-col :span="20" :xs="24"> |
| 30 | - <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> | 30 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| 31 | <el-form-item label="用户名称" prop="userName"> | 31 | <el-form-item label="用户名称" prop="userName"> |
| 32 | <el-input | 32 | <el-input |
| 33 | v-model="queryParams.userName" | 33 | v-model="queryParams.userName" |
| @@ -77,7 +77,7 @@ | @@ -77,7 +77,7 @@ | ||
| 77 | ></el-date-picker> | 77 | ></el-date-picker> |
| 78 | </el-form-item> | 78 | </el-form-item> |
| 79 | <el-form-item> | 79 | <el-form-item> |
| 80 | - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | 80 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| 81 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | 81 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| 82 | </el-form-item> | 82 | </el-form-item> |
| 83 | </el-form> | 83 | </el-form> |
| @@ -130,6 +130,14 @@ | @@ -130,6 +130,14 @@ | ||
| 130 | v-hasPermi="['system:user:export']" | 130 | v-hasPermi="['system:user:export']" |
| 131 | >导出</el-button> | 131 | >导出</el-button> |
| 132 | </el-col> | 132 | </el-col> |
| 133 | + <div class="top-right-btn"> | ||
| 134 | + <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | ||
| 135 | + <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> | ||
| 136 | + </el-tooltip> | ||
| 137 | + <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top"> | ||
| 138 | + <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> | ||
| 139 | + </el-tooltip> | ||
| 140 | + </div> | ||
| 133 | </el-row> | 141 | </el-row> |
| 134 | 142 | ||
| 135 | <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange"> | 143 | <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange"> |
| @@ -356,6 +364,8 @@ export default { | @@ -356,6 +364,8 @@ export default { | ||
| 356 | single: true, | 364 | single: true, |
| 357 | // 非多个禁用 | 365 | // 非多个禁用 |
| 358 | multiple: true, | 366 | multiple: true, |
| 367 | + // 显示搜索条件 | ||
| 368 | + showSearch: true, | ||
| 359 | // 总条数 | 369 | // 总条数 |
| 360 | total: 0, | 370 | total: 0, |
| 361 | // 用户表格数据 | 371 | // 用户表格数据 |
| 1 | <template> | 1 | <template> |
| 2 | <div class="app-container"> | 2 | <div class="app-container"> |
| 3 | - <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> | 3 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| 4 | <el-form-item label="表名称" prop="tableName"> | 4 | <el-form-item label="表名称" prop="tableName"> |
| 5 | <el-input | 5 | <el-input |
| 6 | v-model="queryParams.tableName" | 6 | v-model="queryParams.tableName" |
| @@ -32,7 +32,7 @@ | @@ -32,7 +32,7 @@ | ||
| 32 | ></el-date-picker> | 32 | ></el-date-picker> |
| 33 | </el-form-item> | 33 | </el-form-item> |
| 34 | <el-form-item> | 34 | <el-form-item> |
| 35 | - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | 35 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| 36 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | 36 | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| 37 | </el-form-item> | 37 | </el-form-item> |
| 38 | </el-form> | 38 | </el-form> |
| @@ -76,6 +76,14 @@ | @@ -76,6 +76,14 @@ | ||
| 76 | v-hasPermi="['tool:gen:remove']" | 76 | v-hasPermi="['tool:gen:remove']" |
| 77 | >删除</el-button> | 77 | >删除</el-button> |
| 78 | </el-col> | 78 | </el-col> |
| 79 | + <div class="top-right-btn"> | ||
| 80 | + <el-tooltip class="item" effect="dark" content="刷新" placement="top"> | ||
| 81 | + <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" /> | ||
| 82 | + </el-tooltip> | ||
| 83 | + <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top"> | ||
| 84 | + <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" /> | ||
| 85 | + </el-tooltip> | ||
| 86 | + </div> | ||
| 79 | </el-row> | 87 | </el-row> |
| 80 | 88 | ||
| 81 | <el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange"> | 89 | <el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange"> |
| @@ -186,6 +194,8 @@ export default { | @@ -186,6 +194,8 @@ export default { | ||
| 186 | single: true, | 194 | single: true, |
| 187 | // 非多个禁用 | 195 | // 非多个禁用 |
| 188 | multiple: true, | 196 | multiple: true, |
| 197 | + // 显示搜索条件 | ||
| 198 | + showSearch: true, | ||
| 189 | // 总条数 | 199 | // 总条数 |
| 190 | total: 0, | 200 | total: 0, |
| 191 | // 表数据 | 201 | // 表数据 |
| @@ -30,6 +30,7 @@ module.exports = { | @@ -30,6 +30,7 @@ module.exports = { | ||
| 30 | devServer: { | 30 | devServer: { |
| 31 | host: '0.0.0.0', | 31 | host: '0.0.0.0', |
| 32 | port: port, | 32 | port: port, |
| 33 | + open: true, | ||
| 33 | proxy: { | 34 | proxy: { |
| 34 | // detail: https://cli.vuejs.org/config/#devserver-proxy | 35 | // detail: https://cli.vuejs.org/config/#devserver-proxy |
| 35 | [process.env.VUE_APP_BASE_API]: { | 36 | [process.env.VUE_APP_BASE_API]: { |
| @@ -71,17 +72,6 @@ module.exports = { | @@ -71,17 +72,6 @@ module.exports = { | ||
| 71 | }) | 72 | }) |
| 72 | .end() | 73 | .end() |
| 73 | 74 | ||
| 74 | - // set preserveWhitespace | ||
| 75 | - config.module | ||
| 76 | - .rule('vue') | ||
| 77 | - .use('vue-loader') | ||
| 78 | - .loader('vue-loader') | ||
| 79 | - .tap(options => { | ||
| 80 | - options.compilerOptions.preserveWhitespace = true | ||
| 81 | - return options | ||
| 82 | - }) | ||
| 83 | - .end() | ||
| 84 | - | ||
| 85 | config | 75 | config |
| 86 | .when(process.env.NODE_ENV !== 'development', | 76 | .when(process.env.NODE_ENV !== 'development', |
| 87 | config => { | 77 | config => { |
-
请 注册 或 登录 后发表评论