Commit fc3aa2047c0d612cd545e3d8400193a6117c14ff

Authored by YunaiV
1 parent ec378d75

v3.7.0 定时任务新增更多操作

yudao-ui-admin/src/assets/styles/ruoyi.scss
@@ -37,7 +37,7 @@ @@ -37,7 +37,7 @@
37 .mb10 { 37 .mb10 {
38 margin-bottom: 10px; 38 margin-bottom: 10px;
39 } 39 }
40 -.ml0 { 40 +.ml10 {
41 margin-left: 10px; 41 margin-left: 10px;
42 } 42 }
43 .mt20 { 43 .mt20 {
@@ -49,14 +49,28 @@ @@ -49,14 +49,28 @@
49 .mb20 { 49 .mb20 {
50 margin-bottom: 20px; 50 margin-bottom: 20px;
51 } 51 }
52 -.m20 { 52 +.ml20 {
53 margin-left: 20px; 53 margin-left: 20px;
54 } 54 }
55 55
56 -.el-dialog:not(.is-fullscreen){ 56 +.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
  57 + font-family: inherit;
  58 + font-weight: 500;
  59 + line-height: 1.1;
  60 + color: inherit;
  61 +}
  62 +
  63 +.el-dialog:not(.is-fullscreen) {
57 margin-top: 6vh !important; 64 margin-top: 6vh !important;
58 } 65 }
59 66
  67 +.el-dialog__wrapper.scrollbar .el-dialog .el-dialog__body {
  68 + overflow: auto;
  69 + overflow-x: hidden;
  70 + max-height: 70vh;
  71 + padding: 10px 20px 0;
  72 +}
  73 +
60 .el-table { 74 .el-table {
61 .el-table__header-wrapper, .el-table__fixed-header-wrapper { 75 .el-table__header-wrapper, .el-table__fixed-header-wrapper {
62 th { 76 th {
@@ -120,6 +134,17 @@ @@ -120,6 +134,17 @@
120 width: inherit; 134 width: inherit;
121 } 135 }
122 136
  137 +/** 表格更多操作下拉样式 */
  138 +.el-table .el-dropdown-link {
  139 + cursor: pointer;
  140 + color: #409EFF;
  141 + margin-left: 5px;
  142 +}
  143 +
  144 +.el-table .el-dropdown, .el-icon-arrow-down {
  145 + font-size: 12px;
  146 +}
  147 +
123 .el-tree-node__content > .el-checkbox { 148 .el-tree-node__content > .el-checkbox {
124 margin-right: 8px; 149 margin-right: 8px;
125 } 150 }
yudao-ui-admin/src/views/infra/job/index.vue
@@ -48,20 +48,27 @@ @@ -48,20 +48,27 @@
48 <el-table-column label="CRON 表达式" align="center" prop="cronExpression" /> 48 <el-table-column label="CRON 表达式" align="center" prop="cronExpression" />
49 <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> 49 <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
50 <template slot-scope="scope"> 50 <template slot-scope="scope">
51 - <el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)"  
52 - v-hasPermi="['infra:job:query']">详细</el-button>  
53 - <el-button size="mini" icon="el-icon-s-operation" @click="handleJobLog(scope.row)"  
54 - v-hasPermi="['infra:job:query']">执行日志</el-button>  
55 <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" 51 <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
56 v-hasPermi="['infra:job:update']">修改</el-button> 52 v-hasPermi="['infra:job:update']">修改</el-button>
57 <el-button size="mini" type="text" icon="el-icon-check" @click="handleChangeStatus(scope.row, true)" 53 <el-button size="mini" type="text" icon="el-icon-check" @click="handleChangeStatus(scope.row, true)"
58 v-if="scope.row.status === InfJobStatusEnum.STOP" v-hasPermi="['infra:job:update']">开启</el-button> 54 v-if="scope.row.status === InfJobStatusEnum.STOP" v-hasPermi="['infra:job:update']">开启</el-button>
59 <el-button size="mini" type="text" icon="el-icon-close" @click="handleChangeStatus(scope.row, false)" 55 <el-button size="mini" type="text" icon="el-icon-close" @click="handleChangeStatus(scope.row, false)"
60 v-if="scope.row.status === InfJobStatusEnum.NORMAL" v-hasPermi="['infra:job:update']">暂停</el-button> 56 v-if="scope.row.status === InfJobStatusEnum.NORMAL" v-hasPermi="['infra:job:update']">暂停</el-button>
61 - <el-button size="mini" type="text" icon="el-icon-caret-right" @click="handleRun(scope.row)"  
62 - v-hasPermi="['infra:job:trigger']">执行一次</el-button>  
63 <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" 57 <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
64 v-hasPermi="['infra:job:delete']">删除</el-button> 58 v-hasPermi="['infra:job:delete']">删除</el-button>
  59 + <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)">
  60 + <span class="el-dropdown-link">
  61 + <i class="el-icon-d-arrow-right el-icon--right"></i>更多
  62 + </span>
  63 + <el-dropdown-menu slot="dropdown">
  64 + <el-dropdown-item command="handleRun" icon="el-icon-caret-right"
  65 + v-hasPermi="['infra:job:trigger']">执行一次</el-dropdown-item>
  66 + <el-dropdown-item command="handleView" icon="el-icon-view"
  67 + v-hasPermi="['infra:job:query']">任务详细</el-dropdown-item>
  68 + <el-dropdown-item command="handleJobLog" icon="el-icon-s-operation"
  69 + v-hasPermi="['infra:job:query']">调度日志</el-dropdown-item>
  70 + </el-dropdown-menu>
  71 + </el-dropdown>
65 </template> 72 </template>
66 </el-table-column> 73 </el-table-column>
67 </el-table> 74 </el-table>
@@ -323,6 +330,22 @@ export default { @@ -323,6 +330,22 @@ export default {
323 this.msgSuccess(statusStr + "成功"); 330 this.msgSuccess(statusStr + "成功");
324 }).catch(() => {}); 331 }).catch(() => {});
325 }, 332 },
  333 + // 更多操作触发
  334 + handleCommand(command, row) {
  335 + switch (command) {
  336 + case "handleRun":
  337 + this.handleRun(row);
  338 + break;
  339 + case "handleView":
  340 + this.handleView(row);
  341 + break;
  342 + case "handleJobLog":
  343 + this.handleJobLog(row);
  344 + break;
  345 + default:
  346 + break;
  347 + }
  348 + },
326 /** 导出按钮操作 */ 349 /** 导出按钮操作 */
327 handleExport() { 350 handleExport() {
328 const queryParams = this.queryParams; 351 const queryParams = this.queryParams;
yudao-ui-admin/src/views/system/user/index.vue
@@ -71,12 +71,12 @@ @@ -71,12 +71,12 @@
71 </el-table-column> 71 </el-table-column>
72 <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width"> 72 <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
73 <template slot-scope="scope"> 73 <template slot-scope="scope">
74 - <el-button size="large" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" 74 + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
75 v-hasPermi="['system:user:update']">修改</el-button> 75 v-hasPermi="['system:user:update']">修改</el-button>
76 <el-dropdown @command="(command) => handleCommand(command, scope.$index, scope.row)"> 76 <el-dropdown @command="(command) => handleCommand(command, scope.$index, scope.row)">
77 - <span class="el-dropdown-link">  
78 - 更多操作<i class="el-icon-arrow-down el-icon--right"></i>  
79 - </span> 77 + <span class="el-dropdown-link">
  78 + <i class="el-icon-d-arrow-right el-icon--right"></i>更多
  79 + </span>
80 <el-dropdown-menu slot="dropdown"> 80 <el-dropdown-menu slot="dropdown">
81 <el-dropdown-item command="handleDelete" v-if="scope.row.id !== 1" size="mini" type="text" icon="el-icon-delete" 81 <el-dropdown-item command="handleDelete" v-if="scope.row.id !== 1" size="mini" type="text" icon="el-icon-delete"
82 v-hasPermi="['system:user:delete']">删除</el-dropdown-item> 82 v-hasPermi="['system:user:delete']">删除</el-dropdown-item>
@@ -657,13 +657,3 @@ export default { @@ -657,13 +657,3 @@ export default {
657 } 657 }
658 }; 658 };
659 </script> 659 </script>
660 -<style>  
661 - .el-dropdown-link {  
662 - cursor: pointer;  
663 - color: #1890ff;  
664 - margin-left: 5px;  
665 - }  
666 - .el-icon-arrow-down {  
667 - font-size: 14px;  
668 - }  
669 -</style>  
更新日志.md
@@ -37,7 +37,7 @@ @@ -37,7 +37,7 @@
37 * 【新增】前端的网页标题支持根据选择的菜单,动态展示标题 [commit](https://gitee.com/zhijiantianya/ruoyi-vue-pro/commit/7bf9a85263e0c44b2bc88485b83557c129583f5c) 37 * 【新增】前端的网页标题支持根据选择的菜单,动态展示标题 [commit](https://gitee.com/zhijiantianya/ruoyi-vue-pro/commit/7bf9a85263e0c44b2bc88485b83557c129583f5c)
38 * 【新增】字典标签样式回显,例如说开启的状态展示为 primary 蓝色,禁用的状态为 info 灰色 [commit](https://gitee.com/zhijiantianya/ruoyi-vue-pro/commit/986d1328e0a0d37e2de2fb9d937faeed9d9bee7b) 38 * 【新增】字典标签样式回显,例如说开启的状态展示为 primary 蓝色,禁用的状态为 info 灰色 [commit](https://gitee.com/zhijiantianya/ruoyi-vue-pro/commit/986d1328e0a0d37e2de2fb9d937faeed9d9bee7b)
39 * 【新增】前端的 iframe 组件,方便内嵌网页 [commit](https://gitee.com/zhijiantianya/ruoyi-vue-pro/commit/4a8129bffa9e3928c56333e29f5874f55a079764) 39 * 【新增】前端的 iframe 组件,方便内嵌网页 [commit](https://gitee.com/zhijiantianya/ruoyi-vue-pro/commit/4a8129bffa9e3928c56333e29f5874f55a079764)
40 -* 【新增】在基础设施-配置管理菜单,可通过修改 `yudao.captcha.enable` 配置项,动态修改登录是否需要验证码 [commit]() 40 +* 【新增】在基础设施-配置管理菜单,可通过修改 `yudao.captcha.enable` 配置项,动态修改登录是否需要验证码 [commit](https://gitee.com/zhijiantianya/ruoyi-vue-pro/commit/ec378d75de5660d873514fa16cfabb3671b9eeb4)
41 41
42 ### 🐞 Bug Fixes 42 ### 🐞 Bug Fixes
43 43