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,21 +48,40 @@
|
||||
v-hasPermi="['infra:job:delete']"
|
||||
@click="handleDelete(row.id)"
|
||||
/>
|
||||
<!-- 操作:执行 -->
|
||||
<XTextButton
|
||||
preIcon="ep:view"
|
||||
title="执行一次"
|
||||
v-hasPermi="['infra:job:trigger']"
|
||||
@click="handleRun(row)"
|
||||
/>
|
||||
<!-- 操作:日志 -->
|
||||
<XTextButton
|
||||
preIcon="ep:view"
|
||||
title="调度日志"
|
||||
v-hasPermi="['infra:job:query']"
|
||||
@click="handleJobLog(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:view"
|
||||
title="执行一次"
|
||||
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"
|
||||
title="调度日志"
|
||||
v-hasPermi="['infra:job:query']"
|
||||
@click="handleJobLog(row.id)"
|
||||
/>
|
||||
</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,28 +77,40 @@
|
||||
v-hasPermi="['system:user:update']"
|
||||
@click="handleDetail(row.id)"
|
||||
/>
|
||||
<!-- TODO 芋艿:可以重置角色、密码收起来么,形成【更多】 -->
|
||||
<!-- 操作:重置密码 -->
|
||||
<XTextButton
|
||||
preIcon="ep:key"
|
||||
title="重置密码"
|
||||
v-hasPermi="['system:user:update-password']"
|
||||
@click="handleResetPwd(row)"
|
||||
/>
|
||||
<!-- 操作:分配角色 -->
|
||||
<XTextButton
|
||||
preIcon="ep:key"
|
||||
title="分配角色"
|
||||
v-hasPermi="['system:permission:assign-user-role']"
|
||||
@click="handleRole(row)"
|
||||
/>
|
||||
<!-- 操作:删除 -->
|
||||
<XTextButton
|
||||
preIcon="ep:delete"
|
||||
:title="t('action.del')"
|
||||
v-hasPermi="['system:user: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:key"
|
||||
title="重置密码"
|
||||
v-hasPermi="['system:user:update-password']"
|
||||
@click="handleResetPwd(row)"
|
||||
/>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<!-- 操作:分配角色 -->
|
||||
<XTextButton
|
||||
preIcon="ep:key"
|
||||
title="分配角色"
|
||||
v-hasPermi="['system:permission:assign-user-role']"
|
||||
@click="handleRole(row)"
|
||||
/>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<!-- 操作:删除 -->
|
||||
<XTextButton
|
||||
preIcon="ep:delete"
|
||||
:title="t('action.del')"
|
||||
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