Commit fc3aa2047c0d612cd545e3d8400193a6117c14ff

Authored by YunaiV
1 parent ec378d75

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

yudao-ui-admin/src/assets/styles/ruoyi.scss
... ... @@ -37,7 +37,7 @@
37 37 .mb10 {
38 38 margin-bottom: 10px;
39 39 }
40   -.ml0 {
  40 +.ml10 {
41 41 margin-left: 10px;
42 42 }
43 43 .mt20 {
... ... @@ -49,14 +49,28 @@
49 49 .mb20 {
50 50 margin-bottom: 20px;
51 51 }
52   -.m20 {
  52 +.ml20 {
53 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 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 74 .el-table {
61 75 .el-table__header-wrapper, .el-table__fixed-header-wrapper {
62 76 th {
... ... @@ -120,6 +134,17 @@
120 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 148 .el-tree-node__content > .el-checkbox {
124 149 margin-right: 8px;
125 150 }
... ...
yudao-ui-admin/src/views/infra/job/index.vue
... ... @@ -48,20 +48,27 @@
48 48 <el-table-column label="CRON 表达式" align="center" prop="cronExpression" />
49 49 <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
50 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 51 <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
56 52 v-hasPermi="['infra:job:update']">修改</el-button>
57 53 <el-button size="mini" type="text" icon="el-icon-check" @click="handleChangeStatus(scope.row, true)"
58 54 v-if="scope.row.status === InfJobStatusEnum.STOP" v-hasPermi="['infra:job:update']">开启</el-button>
59 55 <el-button size="mini" type="text" icon="el-icon-close" @click="handleChangeStatus(scope.row, false)"
60 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 57 <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
64 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 72 </template>
66 73 </el-table-column>
67 74 </el-table>
... ... @@ -323,6 +330,22 @@ export default {
323 330 this.msgSuccess(statusStr + "成功");
324 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 350 handleExport() {
328 351 const queryParams = this.queryParams;
... ...
yudao-ui-admin/src/views/system/user/index.vue
... ... @@ -71,12 +71,12 @@
71 71 </el-table-column>
72 72 <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
73 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 75 v-hasPermi="['system:user:update']">修改</el-button>
76 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 80 <el-dropdown-menu slot="dropdown">
81 81 <el-dropdown-item command="handleDelete" v-if="scope.row.id !== 1" size="mini" type="text" icon="el-icon-delete"
82 82 v-hasPermi="['system:user:delete']">删除</el-dropdown-item>
... ... @@ -657,13 +657,3 @@ export default {
657 657 }
658 658 };
659 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 37 * 【新增】前端的网页标题支持根据选择的菜单,动态展示标题 [commit](https://gitee.com/zhijiantianya/ruoyi-vue-pro/commit/7bf9a85263e0c44b2bc88485b83557c129583f5c)
38 38 * 【新增】字典标签样式回显,例如说开启的状态展示为 primary 蓝色,禁用的状态为 info 灰色 [commit](https://gitee.com/zhijiantianya/ruoyi-vue-pro/commit/986d1328e0a0d37e2de2fb9d937faeed9d9bee7b)
39 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 42 ### 🐞 Bug Fixes
43 43  
... ...