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