Commit 8cadd6abc87da52491a65f562365addba8b3dc57
1 parent
58ef8a6b
style: 更多按钮
Showing
4 changed files
with
77 additions
and
52 deletions
yudao-ui-admin-vue3/src/views/infra/job/index.vue
| @@ -35,21 +35,11 @@ | @@ -35,21 +35,11 @@ | ||
| 35 | v-hasPermi="['infra:job:update']" | 35 | v-hasPermi="['infra:job:update']" |
| 36 | @click="handleUpdate(row.id)" | 36 | @click="handleUpdate(row.id)" |
| 37 | /> | 37 | /> |
| 38 | - <el-button | ||
| 39 | - link | ||
| 40 | - type="primary" | 38 | + <XTextButton |
| 39 | + preIcon="ep:edit" | ||
| 40 | + :title="row.status === InfraJobStatusEnum.STOP ? '开启' : '暂停'" | ||
| 41 | v-hasPermi="['infra:job:update']" | 41 | v-hasPermi="['infra:job:update']" |
| 42 | @click="handleChangeStatus(row)" | 42 | @click="handleChangeStatus(row)" |
| 43 | - > | ||
| 44 | - <Icon icon="ep:edit" class="mr-1px" /> | ||
| 45 | - {{ row.status === InfraJobStatusEnum.STOP ? '开启' : '暂停' }} | ||
| 46 | - </el-button> | ||
| 47 | - <!-- 操作:详情 --> | ||
| 48 | - <XTextButton | ||
| 49 | - preIcon="ep:view" | ||
| 50 | - :title="t('action.detail')" | ||
| 51 | - v-hasPermi="['infra:job:query']" | ||
| 52 | - @click="handleDetail(row.id)" | ||
| 53 | /> | 43 | /> |
| 54 | <!-- 操作:删除 --> | 44 | <!-- 操作:删除 --> |
| 55 | <XTextButton | 45 | <XTextButton |
| @@ -58,21 +48,40 @@ | @@ -58,21 +48,40 @@ | ||
| 58 | v-hasPermi="['infra:job:delete']" | 48 | v-hasPermi="['infra:job:delete']" |
| 59 | @click="handleDelete(row.id)" | 49 | @click="handleDelete(row.id)" |
| 60 | /> | 50 | /> |
| 61 | - <!-- 操作:执行 --> | ||
| 62 | - <XTextButton | ||
| 63 | - preIcon="ep:view" | ||
| 64 | - title="执行一次" | ||
| 65 | - v-hasPermi="['infra:job:trigger']" | ||
| 66 | - @click="handleRun(row)" | ||
| 67 | - /> | ||
| 68 | - <!-- 操作:日志 --> | ||
| 69 | - <XTextButton | ||
| 70 | - preIcon="ep:view" | ||
| 71 | - title="调度日志" | ||
| 72 | - v-hasPermi="['infra:job:query']" | ||
| 73 | - @click="handleJobLog(row.id)" | ||
| 74 | - /> | ||
| 75 | - <!-- TODO @星语:执行一次、任务详情、调度日志,可以收成【更多】 --> | 51 | + <el-dropdown class="p-0.5" v-hasPermi="['infra:job:trigger', 'infra:job:query']"> |
| 52 | + <XTextButton title="更多" postIcon="ep:arrow-down" /> | ||
| 53 | + <template #dropdown> | ||
| 54 | + <el-dropdown-menu> | ||
| 55 | + <el-dropdown-item> | ||
| 56 | + <!-- 操作:执行 --> | ||
| 57 | + <XTextButton | ||
| 58 | + preIcon="ep:view" | ||
| 59 | + title="执行一次" | ||
| 60 | + v-hasPermi="['infra:job:trigger']" | ||
| 61 | + @click="handleRun(row)" | ||
| 62 | + /> | ||
| 63 | + </el-dropdown-item> | ||
| 64 | + <el-dropdown-item> | ||
| 65 | + <!-- 操作:详情 --> | ||
| 66 | + <XTextButton | ||
| 67 | + preIcon="ep:view" | ||
| 68 | + :title="t('action.detail')" | ||
| 69 | + v-hasPermi="['infra:job:query']" | ||
| 70 | + @click="handleDetail(row.id)" | ||
| 71 | + /> | ||
| 72 | + </el-dropdown-item> | ||
| 73 | + <el-dropdown-item> | ||
| 74 | + <!-- 操作:日志 --> | ||
| 75 | + <XTextButton | ||
| 76 | + preIcon="ep:view" | ||
| 77 | + title="调度日志" | ||
| 78 | + v-hasPermi="['infra:job:query']" | ||
| 79 | + @click="handleJobLog(row.id)" | ||
| 80 | + /> | ||
| 81 | + </el-dropdown-item> | ||
| 82 | + </el-dropdown-menu> | ||
| 83 | + </template> | ||
| 84 | + </el-dropdown> | ||
| 76 | </template> | 85 | </template> |
| 77 | </vxe-grid> | 86 | </vxe-grid> |
| 78 | </ContentWrap> | 87 | </ContentWrap> |
| @@ -122,6 +131,7 @@ | @@ -122,6 +131,7 @@ | ||
| 122 | <script setup lang="ts" name="Job"> | 131 | <script setup lang="ts" name="Job"> |
| 123 | import { ref, unref } from 'vue' | 132 | import { ref, unref } from 'vue' |
| 124 | import { useRouter } from 'vue-router' | 133 | import { useRouter } from 'vue-router' |
| 134 | +import { ElDropdown, ElDropdownMenu, ElDropdownItem } from 'element-plus' | ||
| 125 | import { useI18n } from '@/hooks/web/useI18n' | 135 | import { useI18n } from '@/hooks/web/useI18n' |
| 126 | import { useMessage } from '@/hooks/web/useMessage' | 136 | import { useMessage } from '@/hooks/web/useMessage' |
| 127 | import { useVxeGrid } from '@/hooks/web/useVxeGrid' | 137 | import { useVxeGrid } from '@/hooks/web/useVxeGrid' |
yudao-ui-admin-vue3/src/views/infra/job/job.data.ts
| @@ -18,7 +18,7 @@ const crudSchemas = reactive<VxeCrudSchema>({ | @@ -18,7 +18,7 @@ const crudSchemas = reactive<VxeCrudSchema>({ | ||
| 18 | primaryType: 'seq', | 18 | primaryType: 'seq', |
| 19 | primaryTitle: '任务编号', | 19 | primaryTitle: '任务编号', |
| 20 | action: true, | 20 | action: true, |
| 21 | - actionWidth: '500px', | 21 | + actionWidth: '280px', |
| 22 | columns: [ | 22 | columns: [ |
| 23 | { | 23 | { |
| 24 | title: '任务名称', | 24 | title: '任务名称', |
yudao-ui-admin-vue3/src/views/system/user/index.vue
| @@ -77,28 +77,40 @@ | @@ -77,28 +77,40 @@ | ||
| 77 | v-hasPermi="['system:user:update']" | 77 | v-hasPermi="['system:user:update']" |
| 78 | @click="handleDetail(row.id)" | 78 | @click="handleDetail(row.id)" |
| 79 | /> | 79 | /> |
| 80 | - <!-- TODO 芋艿:可以重置角色、密码收起来么,形成【更多】 --> | ||
| 81 | - <!-- 操作:重置密码 --> | ||
| 82 | - <XTextButton | ||
| 83 | - preIcon="ep:key" | ||
| 84 | - title="重置密码" | ||
| 85 | - v-hasPermi="['system:user:update-password']" | ||
| 86 | - @click="handleResetPwd(row)" | ||
| 87 | - /> | ||
| 88 | - <!-- 操作:分配角色 --> | ||
| 89 | - <XTextButton | ||
| 90 | - preIcon="ep:key" | ||
| 91 | - title="分配角色" | ||
| 92 | - v-hasPermi="['system:permission:assign-user-role']" | ||
| 93 | - @click="handleRole(row)" | ||
| 94 | - /> | ||
| 95 | - <!-- 操作:删除 --> | ||
| 96 | - <XTextButton | ||
| 97 | - preIcon="ep:delete" | ||
| 98 | - :title="t('action.del')" | ||
| 99 | - v-hasPermi="['system:user:delete']" | ||
| 100 | - @click="handleDelete(row.id)" | ||
| 101 | - /> | 80 | + <el-dropdown class="p-0.5" v-hasPermi="['infra:job:trigger', 'infra:job:query']"> |
| 81 | + <XTextButton title="更多" postIcon="ep:arrow-down" /> | ||
| 82 | + <template #dropdown> | ||
| 83 | + <el-dropdown-menu> | ||
| 84 | + <el-dropdown-item> | ||
| 85 | + <!-- 操作:重置密码 --> | ||
| 86 | + <XTextButton | ||
| 87 | + preIcon="ep:key" | ||
| 88 | + title="重置密码" | ||
| 89 | + v-hasPermi="['system:user:update-password']" | ||
| 90 | + @click="handleResetPwd(row)" | ||
| 91 | + /> | ||
| 92 | + </el-dropdown-item> | ||
| 93 | + <el-dropdown-item> | ||
| 94 | + <!-- 操作:分配角色 --> | ||
| 95 | + <XTextButton | ||
| 96 | + preIcon="ep:key" | ||
| 97 | + title="分配角色" | ||
| 98 | + v-hasPermi="['system:permission:assign-user-role']" | ||
| 99 | + @click="handleRole(row)" | ||
| 100 | + /> | ||
| 101 | + </el-dropdown-item> | ||
| 102 | + <el-dropdown-item> | ||
| 103 | + <!-- 操作:删除 --> | ||
| 104 | + <XTextButton | ||
| 105 | + preIcon="ep:delete" | ||
| 106 | + :title="t('action.del')" | ||
| 107 | + v-hasPermi="['system:user:delete']" | ||
| 108 | + @click="handleDelete(row.id)" | ||
| 109 | + /> | ||
| 110 | + </el-dropdown-item> | ||
| 111 | + </el-dropdown-menu> | ||
| 112 | + </template> | ||
| 113 | + </el-dropdown> | ||
| 102 | </template> | 114 | </template> |
| 103 | </vxe-grid> | 115 | </vxe-grid> |
| 104 | </el-card> | 116 | </el-card> |
| @@ -260,6 +272,9 @@ import { | @@ -260,6 +272,9 @@ import { | ||
| 260 | ElUpload, | 272 | ElUpload, |
| 261 | ElSwitch, | 273 | ElSwitch, |
| 262 | ElCheckbox, | 274 | ElCheckbox, |
| 275 | + ElDropdown, | ||
| 276 | + ElDropdownMenu, | ||
| 277 | + ElDropdownItem, | ||
| 263 | UploadInstance, | 278 | UploadInstance, |
| 264 | UploadRawFile | 279 | UploadRawFile |
| 265 | } from 'element-plus' | 280 | } from 'element-plus' |
yudao-ui-admin-vue3/src/views/system/user/user.data.ts
| @@ -26,7 +26,7 @@ const crudSchemas = reactive<VxeCrudSchema>({ | @@ -26,7 +26,7 @@ const crudSchemas = reactive<VxeCrudSchema>({ | ||
| 26 | primaryType: 'seq', | 26 | primaryType: 'seq', |
| 27 | primaryTitle: '用户编号', | 27 | primaryTitle: '用户编号', |
| 28 | action: true, | 28 | action: true, |
| 29 | - actionWidth: '400px', | 29 | + actionWidth: '200px', |
| 30 | columns: [ | 30 | columns: [ |
| 31 | { | 31 | { |
| 32 | title: '用户账号', | 32 | title: '用户账号', |