mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-26 17:21:53 +08:00
style: 更多按钮
This commit is contained in:
parent
58ef8a6b1d
commit
8cadd6abc8
@ -35,21 +35,11 @@
|
||||
v-hasPermi="['infra:job:update']"
|
||||
@click="handleUpdate(row.id)"
|
||||
/>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
<XTextButton
|
||||
preIcon="ep:edit"
|
||||
:title="row.status === InfraJobStatusEnum.STOP ? '开启' : '暂停'"
|
||||
v-hasPermi="['infra:job:update']"
|
||||
@click="handleChangeStatus(row)"
|
||||
>
|
||||
<Icon icon="ep:edit" class="mr-1px" />
|
||||
{{ row.status === InfraJobStatusEnum.STOP ? '开启' : '暂停' }}
|
||||
</el-button>
|
||||
<!-- 操作:详情 -->
|
||||
<XTextButton
|
||||
preIcon="ep:view"
|
||||
:title="t('action.detail')"
|
||||
v-hasPermi="['infra:job:query']"
|
||||
@click="handleDetail(row.id)"
|
||||
/>
|
||||
<!-- 操作:删除 -->
|
||||
<XTextButton
|
||||
@ -58,6 +48,11 @@
|
||||
v-hasPermi="['infra:job:delete']"
|
||||
@click="handleDelete(row.id)"
|
||||
/>
|
||||
<el-dropdown class="p-0.5" v-hasPermi="['infra:job:trigger', 'infra:job:query']">
|
||||
<XTextButton title="更多" postIcon="ep:arrow-down" />
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item>
|
||||
<!-- 操作:执行 -->
|
||||
<XTextButton
|
||||
preIcon="ep:view"
|
||||
@ -65,6 +60,17 @@
|
||||
v-hasPermi="['infra:job:trigger']"
|
||||
@click="handleRun(row)"
|
||||
/>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<!-- 操作:详情 -->
|
||||
<XTextButton
|
||||
preIcon="ep:view"
|
||||
:title="t('action.detail')"
|
||||
v-hasPermi="['infra:job:query']"
|
||||
@click="handleDetail(row.id)"
|
||||
/>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<!-- 操作:日志 -->
|
||||
<XTextButton
|
||||
preIcon="ep:view"
|
||||
@ -72,7 +78,10 @@
|
||||
v-hasPermi="['infra:job:query']"
|
||||
@click="handleJobLog(row.id)"
|
||||
/>
|
||||
<!-- TODO @星语:执行一次、任务详情、调度日志,可以收成【更多】 -->
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</vxe-grid>
|
||||
</ContentWrap>
|
||||
@ -122,6 +131,7 @@
|
||||
<script setup lang="ts" name="Job">
|
||||
import { ref, unref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ElDropdown, ElDropdownMenu, ElDropdownItem } from 'element-plus'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { useMessage } from '@/hooks/web/useMessage'
|
||||
import { useVxeGrid } from '@/hooks/web/useVxeGrid'
|
||||
|
@ -18,7 +18,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
|
||||
primaryType: 'seq',
|
||||
primaryTitle: '任务编号',
|
||||
action: true,
|
||||
actionWidth: '500px',
|
||||
actionWidth: '280px',
|
||||
columns: [
|
||||
{
|
||||
title: '任务名称',
|
||||
|
@ -77,7 +77,11 @@
|
||||
v-hasPermi="['system:user:update']"
|
||||
@click="handleDetail(row.id)"
|
||||
/>
|
||||
<!-- TODO 芋艿:可以重置角色、密码收起来么,形成【更多】 -->
|
||||
<el-dropdown class="p-0.5" v-hasPermi="['infra:job:trigger', 'infra:job:query']">
|
||||
<XTextButton title="更多" postIcon="ep:arrow-down" />
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item>
|
||||
<!-- 操作:重置密码 -->
|
||||
<XTextButton
|
||||
preIcon="ep:key"
|
||||
@ -85,6 +89,8 @@
|
||||
v-hasPermi="['system:user:update-password']"
|
||||
@click="handleResetPwd(row)"
|
||||
/>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<!-- 操作:分配角色 -->
|
||||
<XTextButton
|
||||
preIcon="ep:key"
|
||||
@ -92,6 +98,8 @@
|
||||
v-hasPermi="['system:permission:assign-user-role']"
|
||||
@click="handleRole(row)"
|
||||
/>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<!-- 操作:删除 -->
|
||||
<XTextButton
|
||||
preIcon="ep:delete"
|
||||
@ -99,6 +107,10 @@
|
||||
v-hasPermi="['system:user:delete']"
|
||||
@click="handleDelete(row.id)"
|
||||
/>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</vxe-grid>
|
||||
</el-card>
|
||||
@ -260,6 +272,9 @@ import {
|
||||
ElUpload,
|
||||
ElSwitch,
|
||||
ElCheckbox,
|
||||
ElDropdown,
|
||||
ElDropdownMenu,
|
||||
ElDropdownItem,
|
||||
UploadInstance,
|
||||
UploadRawFile
|
||||
} from 'element-plus'
|
||||
|
@ -26,7 +26,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
|
||||
primaryType: 'seq',
|
||||
primaryTitle: '用户编号',
|
||||
action: true,
|
||||
actionWidth: '400px',
|
||||
actionWidth: '200px',
|
||||
columns: [
|
||||
{
|
||||
title: '用户账号',
|
||||
|
Loading…
Reference in New Issue
Block a user