fix: 🧩 任务调度权限按钮显示
This commit is contained in:
parent
41e310dbf0
commit
eaf6165cff
|
@ -1,8 +0,0 @@
|
||||||
// 分页查询
|
|
||||||
export const search = [];
|
|
||||||
// 添加操作
|
|
||||||
export const add = [];
|
|
||||||
// 更新操作
|
|
||||||
export const update = [];
|
|
||||||
// 删除操作
|
|
||||||
export const deleted = [];
|
|
|
@ -13,6 +13,8 @@ import { useMessageSendStore } from '@/store/message/messageSend';
|
||||||
import { usePublicHooks } from '@/views/hooks';
|
import { usePublicHooks } from '@/views/hooks';
|
||||||
import { Plus } from '@element-plus/icons-vue';
|
import { Plus } from '@element-plus/icons-vue';
|
||||||
import ImageLoading from '@/components/Upload/ImageLoading.vue';
|
import ImageLoading from '@/components/Upload/ImageLoading.vue';
|
||||||
|
import { hasAuth } from '@/router/utils';
|
||||||
|
import { auth } from '@/views/message-management/message-editing/utils/auth';
|
||||||
|
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
// 用户是否停用样式
|
// 用户是否停用样式
|
||||||
|
@ -133,7 +135,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<!-- 提交 -->
|
<!-- 提交 -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<div class="grid grid-cols-2 w-[100%]">
|
<div v-if="hasAuth(auth.add)" class="grid grid-cols-2 w-[100%]">
|
||||||
<el-button bg class="w-[100%]" text type="primary" @click="submitForm(formRef)">{{ $t('submit') }}</el-button>
|
<el-button bg class="w-[100%]" text type="primary" @click="submitForm(formRef)">{{ $t('submit') }}</el-button>
|
||||||
<el-button bg class="w-[100%]" text @click="resetForm(formRef)">{{ $t('buttons.reset') }}</el-button>
|
<el-button bg class="w-[100%]" text @click="resetForm(formRef)">{{ $t('buttons.reset') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
// 分页查询
|
export const auth = {
|
||||||
export const search = [];
|
|
||||||
// 添加操作
|
// 添加操作
|
||||||
export const add = [];
|
add: ['message::addMessage'],
|
||||||
// 更新操作
|
};
|
||||||
export const update = [];
|
|
||||||
// 删除操作
|
|
||||||
export const deleted = [];
|
|
||||||
|
|
|
@ -15,6 +15,8 @@ import { isReadStatus } from '@/enums/baseConstant';
|
||||||
import { useMessageReceivedStore } from '@/store/message/messageReceived';
|
import { useMessageReceivedStore } from '@/store/message/messageReceived';
|
||||||
import { useMessageTypeStore } from '@/store/message/messageType';
|
import { useMessageTypeStore } from '@/store/message/messageType';
|
||||||
import { Message } from '@element-plus/icons-vue';
|
import { Message } from '@element-plus/icons-vue';
|
||||||
|
import { auth } from '@/views/message-management/message-received/utils/auth';
|
||||||
|
import { hasAuth } from '@/router/utils';
|
||||||
|
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
|
@ -27,27 +29,18 @@ const onCurrentPageChange = async (value: number) => {
|
||||||
await onSearch();
|
await onSearch();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 当分页发生变化 */
|
||||||
* * 当分页发生变化
|
|
||||||
* @param value
|
|
||||||
*/
|
|
||||||
const onPageSizeChange = async (value: number) => {
|
const onPageSizeChange = async (value: number) => {
|
||||||
messageReceivedStore.pagination.pageSize = value;
|
messageReceivedStore.pagination.pageSize = value;
|
||||||
await onSearch();
|
await onSearch();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 选择多行 */
|
||||||
* * 选择多行
|
|
||||||
* @param rows
|
|
||||||
*/
|
|
||||||
const onSelectionChange = (rows: Array<any>) => {
|
const onSelectionChange = (rows: Array<any>) => {
|
||||||
selectIds.value = rows.map((row: any) => row.id);
|
selectIds.value = rows.map((row: any) => row.id);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 重置表单 */
|
||||||
* 重置表单
|
|
||||||
* @param formEl
|
|
||||||
*/
|
|
||||||
const resetForm = async (formEl: FormInstance | undefined) => {
|
const resetForm = async (formEl: FormInstance | undefined) => {
|
||||||
if (!formEl) return;
|
if (!formEl) return;
|
||||||
formEl.resetFields();
|
formEl.resetFields();
|
||||||
|
@ -61,6 +54,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
|
<Auth :value="auth.search">
|
||||||
<el-form ref="formRef" :inline="true" :model="messageReceivedStore.form" class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px] overflow-auto">
|
<el-form ref="formRef" :inline="true" :model="messageReceivedStore.form" class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px] overflow-auto">
|
||||||
<!-- 消息标题 -->
|
<!-- 消息标题 -->
|
||||||
<el-form-item :label="$t('title')" prop="title">
|
<el-form-item :label="$t('title')" prop="title">
|
||||||
|
@ -110,21 +104,22 @@ onMounted(() => {
|
||||||
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)"> {{ $t('buttons.reset') }}</el-button>
|
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)"> {{ $t('buttons.reset') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
</Auth>
|
||||||
|
|
||||||
<PureTableBar :columns="columns" title="系统消息" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
<PureTableBar :columns="columns" title="系统消息" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<!-- 标为已读 -->
|
<!-- 标为已读 -->
|
||||||
<el-button :disabled="!(selectIds.length > 0)" :icon="useRenderIcon('octicon:read-24')" type="primary" @click="updateMarkMessageReceived(true)">
|
<el-button v-if="hasAuth(auth.update)" :disabled="!(selectIds.length > 0)" :icon="useRenderIcon('octicon:read-24')" type="primary" @click="updateMarkMessageReceived(true)">
|
||||||
{{ $t('markAsRead') }}
|
{{ $t('markAsRead') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<!-- 标为未读 -->
|
<!-- 标为未读 -->
|
||||||
<el-button :disabled="!(selectIds.length > 0)" :icon="Message" type="primary" @click="updateMarkMessageReceived(false)">
|
<el-button v-if="hasAuth(auth.update)" :disabled="!(selectIds.length > 0)" :icon="Message" type="primary" @click="updateMarkMessageReceived(false)">
|
||||||
{{ $t('markAsUnread') }}
|
{{ $t('markAsUnread') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<!-- 批量删除按钮 -->
|
<!-- 批量删除按钮 -->
|
||||||
<el-button :disabled="!(selectIds.length > 0)" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
<el-button v-if="hasAuth(auth.deleted)" :disabled="!(selectIds.length > 0)" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
||||||
{{ $t('delete_batches') }}
|
{{ $t('delete_batches') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
export const auth = {
|
||||||
// 分页查询
|
// 分页查询
|
||||||
export const search = [];
|
search: ['messageReceived::getMessageReceivedList'],
|
||||||
// 添加操作
|
|
||||||
export const add = [];
|
|
||||||
// 更新操作
|
// 更新操作
|
||||||
export const update = [];
|
update: ['messageReceived::updateMarkMessageReceived'],
|
||||||
// 删除操作
|
// 删除操作
|
||||||
export const deleted = [];
|
deleted: ['messageReceived::deleteMessageReceivedByIds'],
|
||||||
|
};
|
||||||
|
|
|
@ -15,6 +15,8 @@ import { messageLevel } from '@/views/message-management/message-editing/utils/c
|
||||||
import { isReadStatus } from '@/enums/baseConstant';
|
import { isReadStatus } from '@/enums/baseConstant';
|
||||||
import { useMessageSendStore } from '@/store/message/messageSend';
|
import { useMessageSendStore } from '@/store/message/messageSend';
|
||||||
import { useMessageTypeStore } from '@/store/message/messageType';
|
import { useMessageTypeStore } from '@/store/message/messageType';
|
||||||
|
import { auth } from '@/views/message-management/message-send/utils/auth';
|
||||||
|
import { hasAuth } from '@/router/utils';
|
||||||
|
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
|
@ -27,27 +29,18 @@ const onCurrentPageChange = async (value: number) => {
|
||||||
await onSearch();
|
await onSearch();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 当分页发生变化 */
|
||||||
* * 当分页发生变化
|
|
||||||
* @param value
|
|
||||||
*/
|
|
||||||
const onPageSizeChange = async (value: number) => {
|
const onPageSizeChange = async (value: number) => {
|
||||||
messageSendStore.pagination.pageSize = value;
|
messageSendStore.pagination.pageSize = value;
|
||||||
await onSearch();
|
await onSearch();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 选择多行 */
|
||||||
* * 选择多行
|
|
||||||
* @param rows
|
|
||||||
*/
|
|
||||||
const onSelectionChange = (rows: Array<any>) => {
|
const onSelectionChange = (rows: Array<any>) => {
|
||||||
deleteIds.value = rows.map((row: any) => row.id);
|
deleteIds.value = rows.map((row: any) => row.id);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 重置表单 */
|
||||||
* 重置表单
|
|
||||||
* @param formEl
|
|
||||||
*/
|
|
||||||
const resetForm = async (formEl: FormInstance | undefined) => {
|
const resetForm = async (formEl: FormInstance | undefined) => {
|
||||||
if (!formEl) return;
|
if (!formEl) return;
|
||||||
formEl.resetFields();
|
formEl.resetFields();
|
||||||
|
@ -61,6 +54,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
|
<Auth :value="auth.search">
|
||||||
<el-form ref="formRef" :inline="true" :model="messageSendStore.form" class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px] overflow-auto">
|
<el-form ref="formRef" :inline="true" :model="messageSendStore.form" class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px] overflow-auto">
|
||||||
<!-- 消息标题 -->
|
<!-- 消息标题 -->
|
||||||
<el-form-item :label="$t('title')" prop="title">
|
<el-form-item :label="$t('title')" prop="title">
|
||||||
|
@ -110,11 +104,12 @@ onMounted(() => {
|
||||||
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)"> {{ $t('buttons.reset') }}</el-button>
|
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)"> {{ $t('buttons.reset') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
</Auth>
|
||||||
|
|
||||||
<PureTableBar :columns="columns" title="系统消息" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
<PureTableBar :columns="columns" title="系统消息" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<!-- 批量删除按钮 -->
|
<!-- 批量删除按钮 -->
|
||||||
<el-button :disabled="!(deleteIds.length > 0)" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
<el-button v-if="hasAuth(auth.deleted)" :disabled="!(deleteIds.length > 0)" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
||||||
{{ $t('delete_batches') }}
|
{{ $t('delete_batches') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -171,8 +166,8 @@ onMounted(() => {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #operation="{ row }">
|
<template #operation="{ row }">
|
||||||
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
|
<el-button v-if="hasAuth(auth.update)" :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
|
||||||
<el-popconfirm :title="`${$t('delete')}${row.title}?`" @confirm="onDelete(row)">
|
<el-popconfirm v-if="hasAuth(auth.deleted)" :title="`${$t('delete')}${row.title}?`" @confirm="onDelete(row)">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
||||||
{{ $t('delete') }}
|
{{ $t('delete') }}
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
|
export const auth = {
|
||||||
// 分页查询
|
// 分页查询
|
||||||
export const search = [];
|
search: ['message::getMessageList'],
|
||||||
// 添加操作
|
// 添加操作
|
||||||
export const add = [];
|
add: ['message::addMessage'],
|
||||||
// 更新操作
|
// 更新操作
|
||||||
export const update = [];
|
update: ['message::updateMessage'],
|
||||||
// 删除操作
|
// 删除操作
|
||||||
export const deleted = [];
|
deleted: ['message::deleteMessage'],
|
||||||
|
};
|
||||||
|
|
|
@ -15,6 +15,8 @@ import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||||
import { FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
import { enabledOrNotStatus } from '@/enums/baseConstant';
|
import { enabledOrNotStatus } from '@/enums/baseConstant';
|
||||||
import { usePublicHooks } from '@/views/hooks';
|
import { usePublicHooks } from '@/views/hooks';
|
||||||
|
import { auth } from '@/views/message-management/message-type/utils/auth';
|
||||||
|
import { hasAuth } from '@/router/utils';
|
||||||
|
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
|
@ -28,27 +30,18 @@ const onCurrentPageChange = async (value: number) => {
|
||||||
await onSearch();
|
await onSearch();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 当分页发生变化 */
|
||||||
* * 当分页发生变化
|
|
||||||
* @param value
|
|
||||||
*/
|
|
||||||
const onPageSizeChange = async (value: number) => {
|
const onPageSizeChange = async (value: number) => {
|
||||||
messageTypeStore.pagination.pageSize = value;
|
messageTypeStore.pagination.pageSize = value;
|
||||||
await onSearch();
|
await onSearch();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 选择多行 */
|
||||||
* * 选择多行
|
|
||||||
* @param rows
|
|
||||||
*/
|
|
||||||
const onSelectionChange = (rows: Array<any>) => {
|
const onSelectionChange = (rows: Array<any>) => {
|
||||||
deleteIds.value = rows.map((row: any) => row.id);
|
deleteIds.value = rows.map((row: any) => row.id);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 重置表单 */
|
||||||
* 重置表单
|
|
||||||
* @param formEl
|
|
||||||
*/
|
|
||||||
const resetForm = async (formEl: FormInstance | undefined) => {
|
const resetForm = async (formEl: FormInstance | undefined) => {
|
||||||
if (!formEl) return;
|
if (!formEl) return;
|
||||||
formEl.resetFields();
|
formEl.resetFields();
|
||||||
|
@ -62,6 +55,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
|
<Auth :value="auth.search">
|
||||||
<el-form ref="formRef" :inline="true" :model="messageTypeStore.form" class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px] overflow-auto">
|
<el-form ref="formRef" :inline="true" :model="messageTypeStore.form" class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px] overflow-auto">
|
||||||
<!-- 消息名称 -->
|
<!-- 消息名称 -->
|
||||||
<el-form-item :label="$t('messageName')" prop="messageName">
|
<el-form-item :label="$t('messageName')" prop="messageName">
|
||||||
|
@ -90,13 +84,16 @@ onMounted(() => {
|
||||||
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)"> {{ $t('buttons.reset') }}</el-button>
|
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)"> {{ $t('buttons.reset') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
</Auth>
|
||||||
|
|
||||||
<PureTableBar :columns="columns" title="系统消息类型" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
<PureTableBar :columns="columns" title="系统消息类型" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('addNew') }}</el-button>
|
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd">
|
||||||
|
{{ $t('addNew') }}
|
||||||
|
</el-button>
|
||||||
|
|
||||||
<!-- 批量删除按钮 -->
|
<!-- 批量删除按钮 -->
|
||||||
<el-button :disabled="!(deleteIds.length > 0)" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
<el-button v-if="hasAuth(auth.deleted)" :disabled="!(deleteIds.length > 0)" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
||||||
{{ $t('delete_batches') }}
|
{{ $t('delete_batches') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -139,9 +136,8 @@ onMounted(() => {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #operation="{ row }">
|
<template #operation="{ row }">
|
||||||
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
|
<el-button v-if="hasAuth(auth.update)" :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
|
||||||
<el-button :icon="useRenderIcon(AddFill)" :size="size" class="reset-margin" link type="primary" @click="onAdd"> {{ $t('addNew') }} </el-button>
|
<el-popconfirm v-if="hasAuth(auth.deleted)" :title="`${$t('delete')}${row.messageName}?`" @confirm="onDelete(row)">
|
||||||
<el-popconfirm :title="`${$t('delete')}${row.messageName}?`" @confirm="onDelete(row)">
|
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
||||||
{{ $t('delete') }}
|
{{ $t('delete') }}
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
|
export const auth = {
|
||||||
// 分页查询
|
// 分页查询
|
||||||
export const search = [];
|
search: ['messageType::getMessageTypeList'],
|
||||||
// 添加操作
|
// 添加操作
|
||||||
export const add = [];
|
add: ['messageType::addMessageType'],
|
||||||
// 更新操作
|
// 更新操作
|
||||||
export const update = [];
|
update: ['messageType::updateMessageType'],
|
||||||
// 删除操作
|
// 删除操作
|
||||||
export const deleted = [];
|
deleted: ['messageType::deleteMessageType'],
|
||||||
|
};
|
||||||
|
|
|
@ -14,40 +14,31 @@ import { FormInstance } from 'element-plus';
|
||||||
import View from '@iconify-icons/ep/view';
|
import View from '@iconify-icons/ep/view';
|
||||||
import VueJsonPretty from 'vue-json-pretty';
|
import VueJsonPretty from 'vue-json-pretty';
|
||||||
import 'vue-json-pretty/lib/styles.css';
|
import 'vue-json-pretty/lib/styles.css';
|
||||||
|
import { auth } from '@/views/monitor/schedulerExecuteLog/utils/auth';
|
||||||
|
import { hasAuth } from '@/router/utils';
|
||||||
|
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const quartzExecuteLogStore = useQuartzExecuteLogStore();
|
const quartzExecuteLogStore = useQuartzExecuteLogStore();
|
||||||
|
|
||||||
/**
|
/** 当前页改变时 */
|
||||||
* * 当前页改变时
|
|
||||||
*/
|
|
||||||
const onCurrentPageChange = async (value: number) => {
|
const onCurrentPageChange = async (value: number) => {
|
||||||
quartzExecuteLogStore.pagination.currentPage = value;
|
quartzExecuteLogStore.pagination.currentPage = value;
|
||||||
await onSearch();
|
await onSearch();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 当分页发生变化 */
|
||||||
* * 当分页发生变化
|
|
||||||
* @param value
|
|
||||||
*/
|
|
||||||
const onPageSizeChange = async (value: number) => {
|
const onPageSizeChange = async (value: number) => {
|
||||||
quartzExecuteLogStore.pagination.pageSize = value;
|
quartzExecuteLogStore.pagination.pageSize = value;
|
||||||
await onSearch();
|
await onSearch();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 选择多行 */
|
||||||
* * 选择多行
|
|
||||||
* @param rows
|
|
||||||
*/
|
|
||||||
const onSelectionChange = (rows: Array<any>) => {
|
const onSelectionChange = (rows: Array<any>) => {
|
||||||
deleteIds.value = rows.map((row: any) => row.id);
|
deleteIds.value = rows.map((row: any) => row.id);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 重置表单 */
|
||||||
* 重置表单
|
|
||||||
* @param formEl
|
|
||||||
*/
|
|
||||||
const resetForm = async (formEl: FormInstance | undefined) => {
|
const resetForm = async (formEl: FormInstance | undefined) => {
|
||||||
if (!formEl) return;
|
if (!formEl) return;
|
||||||
formEl.resetFields();
|
formEl.resetFields();
|
||||||
|
@ -61,6 +52,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
|
<Auth :value="auth.search">
|
||||||
<el-form ref="formRef" :inline="true" :model="quartzExecuteLogStore.form" class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px] overflow-auto">
|
<el-form ref="formRef" :inline="true" :model="quartzExecuteLogStore.form" class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px] overflow-auto">
|
||||||
<el-form-item :label="$t('quartzExecuteLog_jobName')" prop="jobName">
|
<el-form-item :label="$t('quartzExecuteLog_jobName')" prop="jobName">
|
||||||
<el-input v-model="quartzExecuteLogStore.form.jobName" :placeholder="`${$t('input')}${$t('quartzExecuteLog_jobName')}`" class="!w-[180px]" clearable />
|
<el-input v-model="quartzExecuteLogStore.form.jobName" :placeholder="`${$t('input')}${$t('quartzExecuteLog_jobName')}`" class="!w-[180px]" clearable />
|
||||||
|
@ -82,11 +74,12 @@ onMounted(() => {
|
||||||
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)"> {{ $t('buttons.reset') }}</el-button>
|
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)"> {{ $t('buttons.reset') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
</Auth>
|
||||||
|
|
||||||
<PureTableBar :columns="columns" :title="$t('quartzExecuteLog')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
<PureTableBar :columns="columns" :title="$t('quartzExecuteLog')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<!-- 批量删除按钮 -->
|
<!-- 批量删除按钮 -->
|
||||||
<el-button :disabled="!(deleteIds.length > 0)" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
<el-button v-if="hasAuth(auth.deleted)" :disabled="!(deleteIds.length > 0)" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
||||||
{{ $t('deleteBatches') }}
|
{{ $t('deleteBatches') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -139,8 +132,8 @@ onMounted(() => {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #operation="{ row }">
|
<template #operation="{ row }">
|
||||||
<el-button :icon="useRenderIcon(View)" :size="size" class="reset-margin" link type="primary" @click="onView(row)"> {{ $t('view') }} </el-button>
|
<el-button v-if="hasAuth(auth.search)" :icon="useRenderIcon(View)" :size="size" class="reset-margin" link type="primary" @click="onView(row)"> {{ $t('view') }} </el-button>
|
||||||
<el-popconfirm :title="`${$t('delete')}${row.jobName}?`" @confirm="onDelete(row)">
|
<el-popconfirm v-if="hasAuth(auth.deleted)" :title="`${$t('delete')}${row.jobName}?`" @confirm="onDelete(row)">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
||||||
{{ $t('delete') }}
|
{{ $t('delete') }}
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
|
export const auth = {
|
||||||
// 分页查询
|
// 分页查询
|
||||||
export const search = [];
|
search: ['quartzExecuteLog::getQuartzExecuteLogList'],
|
||||||
// 添加操作
|
|
||||||
export const add = [];
|
|
||||||
// 更新操作
|
|
||||||
export const update = [];
|
|
||||||
// 删除操作
|
// 删除操作
|
||||||
export const deleted = [];
|
deleted: ['quartzExecuteLog::deleteQuartzExecuteLog'],
|
||||||
|
};
|
||||||
|
|
|
@ -12,40 +12,31 @@ import { $t } from '@/plugins/i18n';
|
||||||
import { useUserLoginLogStore } from '@/store/monitor/userLoginLog';
|
import { useUserLoginLogStore } from '@/store/monitor/userLoginLog';
|
||||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||||
import { FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
|
import { auth } from '@/views/monitor/userLoginLog/utils/auth';
|
||||||
|
import { hasAuth } from '@/router/utils';
|
||||||
|
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const userLoginLogStore = useUserLoginLogStore();
|
const userLoginLogStore = useUserLoginLogStore();
|
||||||
|
|
||||||
/**
|
/** 当前页改变时 */
|
||||||
* * 当前页改变时
|
|
||||||
*/
|
|
||||||
const onCurrentPageChange = async (value: number) => {
|
const onCurrentPageChange = async (value: number) => {
|
||||||
userLoginLogStore.pagination.currentPage = value;
|
userLoginLogStore.pagination.currentPage = value;
|
||||||
await onSearch();
|
await onSearch();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 当分页发生变化 */
|
||||||
* * 当分页发生变化
|
|
||||||
* @param value
|
|
||||||
*/
|
|
||||||
const onPageSizeChange = async (value: number) => {
|
const onPageSizeChange = async (value: number) => {
|
||||||
userLoginLogStore.pagination.pageSize = value;
|
userLoginLogStore.pagination.pageSize = value;
|
||||||
await onSearch();
|
await onSearch();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 选择多行 */
|
||||||
* * 选择多行
|
|
||||||
* @param rows
|
|
||||||
*/
|
|
||||||
const onSelectionChange = (rows: Array<any>) => {
|
const onSelectionChange = (rows: Array<any>) => {
|
||||||
deleteIds.value = rows.map((row: any) => row.id);
|
deleteIds.value = rows.map((row: any) => row.id);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 重置表单 */
|
||||||
* 重置表单
|
|
||||||
* @param formEl
|
|
||||||
*/
|
|
||||||
const resetForm = async (formEl: FormInstance | undefined) => {
|
const resetForm = async (formEl: FormInstance | undefined) => {
|
||||||
if (!formEl) return;
|
if (!formEl) return;
|
||||||
formEl.resetFields();
|
formEl.resetFields();
|
||||||
|
@ -90,11 +81,12 @@ onMounted(() => {
|
||||||
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)"> {{ $t('buttons.reset') }}</el-button>
|
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)"> {{ $t('buttons.reset') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
<Auth :value="auth.search" />
|
||||||
|
|
||||||
<PureTableBar :columns="columns" :title="$t('userLoginLog')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
<PureTableBar :columns="columns" :title="$t('userLoginLog')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<!-- 批量删除按钮 -->
|
<!-- 批量删除按钮 -->
|
||||||
<el-button :disabled="!(deleteIds.length > 0)" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
<el-button v-if="hasAuth(auth.deleted)" :disabled="!(deleteIds.length > 0)" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
||||||
{{ $t('deleteBatches') }}
|
{{ $t('deleteBatches') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -133,8 +125,8 @@ onMounted(() => {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #operation="{ row }">
|
<template #operation="{ row }">
|
||||||
<el-button :icon="useRenderIcon(View)" :size="size" class="reset-margin" link type="primary" @click="onView(row)"> {{ $t('view') }} </el-button>
|
<el-button v-if="hasAuth(auth.search)" :icon="useRenderIcon(View)" :size="size" class="reset-margin" link type="primary" @click="onView(row)"> {{ $t('view') }} </el-button>
|
||||||
<el-popconfirm :title="`${$t('delete')}${row.username}?`" @confirm="onDelete(row)">
|
<el-popconfirm v-if="hasAuth(auth.deleted)" :title="`${$t('delete')}${row.username}?`" @confirm="onDelete(row)">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
||||||
{{ $t('delete') }}
|
{{ $t('delete') }}
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
|
export const auth = {
|
||||||
// 分页查询
|
// 分页查询
|
||||||
export const search = [];
|
search: ['userLoginLog::getUserLoginLogList'],
|
||||||
// 添加操作
|
|
||||||
export const add = [];
|
|
||||||
// 更新操作
|
|
||||||
export const update = [];
|
|
||||||
// 删除操作
|
// 删除操作
|
||||||
export const deleted = [];
|
deleted: ['userLoginLog::deleteUserLoginLog'],
|
||||||
|
};
|
||||||
|
|
|
@ -13,32 +13,26 @@ import { $t } from '@/plugins/i18n';
|
||||||
import { useSchedulersStore } from '@/store/scheduler/schedulers';
|
import { useSchedulersStore } from '@/store/scheduler/schedulers';
|
||||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||||
import { FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
|
import { auth } from '@/views/scheduler/schedulers/utils/auth';
|
||||||
|
import { hasAuth } from '@/router/utils';
|
||||||
|
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const schedulersStore = useSchedulersStore();
|
const schedulersStore = useSchedulersStore();
|
||||||
|
|
||||||
/**
|
/** 当前页改变时 */
|
||||||
* * 当前页改变时
|
|
||||||
*/
|
|
||||||
const onCurrentPageChange = async (value: number) => {
|
const onCurrentPageChange = async (value: number) => {
|
||||||
schedulersStore.pagination.currentPage = value;
|
schedulersStore.pagination.currentPage = value;
|
||||||
await onSearch();
|
await onSearch();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 当分页发生变化 */
|
||||||
* * 当分页发生变化
|
|
||||||
* @param value
|
|
||||||
*/
|
|
||||||
const onPageSizeChange = async (value: number) => {
|
const onPageSizeChange = async (value: number) => {
|
||||||
schedulersStore.pagination.pageSize = value;
|
schedulersStore.pagination.pageSize = value;
|
||||||
await onSearch();
|
await onSearch();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 重置表单 */
|
||||||
* 重置表单
|
|
||||||
* @param formEl
|
|
||||||
*/
|
|
||||||
const resetForm = async (formEl: FormInstance | undefined) => {
|
const resetForm = async (formEl: FormInstance | undefined) => {
|
||||||
if (!formEl) return;
|
if (!formEl) return;
|
||||||
formEl.resetFields();
|
formEl.resetFields();
|
||||||
|
@ -52,6 +46,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
|
<Auth :value="auth.search">
|
||||||
<el-form ref="formRef" :inline="true" :model="schedulersStore.form" class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px] overflow-auto">
|
<el-form ref="formRef" :inline="true" :model="schedulersStore.form" class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px] overflow-auto">
|
||||||
<el-form-item :label="$t('schedulers_jobName')" prop="jobName">
|
<el-form-item :label="$t('schedulers_jobName')" prop="jobName">
|
||||||
<el-input v-model="schedulersStore.form.jobName" :placeholder="`${$t('input')}${$t('schedulers_jobName')}`" class="!w-[180px]" clearable />
|
<el-input v-model="schedulersStore.form.jobName" :placeholder="`${$t('input')}${$t('schedulers_jobName')}`" class="!w-[180px]" clearable />
|
||||||
|
@ -76,10 +71,13 @@ onMounted(() => {
|
||||||
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)"> {{ $t('buttons.reset') }}</el-button>
|
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)"> {{ $t('buttons.reset') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
</Auth>
|
||||||
|
|
||||||
<PureTableBar :columns="columns" title="Schedulers视图" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
<PureTableBar :columns="columns" title="Schedulers视图" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('addNew') }}</el-button>
|
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd">
|
||||||
|
{{ $t('addNew') }}
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-slot="{ size, dynamicColumns }">
|
<template v-slot="{ size, dynamicColumns }">
|
||||||
|
@ -118,17 +116,21 @@ onMounted(() => {
|
||||||
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
|
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
|
||||||
|
|
||||||
<!-- 暂停-->
|
<!-- 暂停-->
|
||||||
|
<Auth :value="auth.pause">
|
||||||
<el-button v-if="row.triggerState === 'ACQUIRED'" :icon="useRenderIcon('line-md:pause')" :size="size" class="reset-margin" link type="primary" @click="onPause(row)">
|
<el-button v-if="row.triggerState === 'ACQUIRED'" :icon="useRenderIcon('line-md:pause')" :size="size" class="reset-margin" link type="primary" @click="onPause(row)">
|
||||||
{{ $t('pause') }}
|
{{ $t('pause') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
</Auth>
|
||||||
|
|
||||||
<!-- 恢复 -->
|
<!-- 恢复 -->
|
||||||
|
<Auth :value="auth.resume">
|
||||||
<el-button v-if="row.triggerState === 'PAUSED'" :icon="useRenderIcon('material-symbols:resume')" :size="size" class="reset-margin" link type="primary" @click="onResume(row)">
|
<el-button v-if="row.triggerState === 'PAUSED'" :icon="useRenderIcon('material-symbols:resume')" :size="size" class="reset-margin" link type="primary" @click="onResume(row)">
|
||||||
{{ $t('resume') }}
|
{{ $t('resume') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
</Auth>
|
||||||
|
|
||||||
<!-- 删除 -->
|
<!-- 删除 -->
|
||||||
<el-popconfirm :title="`${$t('delete')}${row.jobName}?`" @confirm="onDelete(row)">
|
<el-popconfirm v-if="hasAuth(auth.deleted)" :title="`${$t('delete')}${row.jobName}?`" @confirm="onDelete(row)">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
||||||
{{ $t('delete') }}
|
{{ $t('delete') }}
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
|
export const auth = {
|
||||||
// 分页查询
|
// 分页查询
|
||||||
export const search = [];
|
search: ['schedulers::getSchedulersList'],
|
||||||
// 添加操作
|
// 添加操作
|
||||||
export const add = [];
|
add: ['schedulers::addSchedulers'],
|
||||||
// 更新操作
|
// 暂停
|
||||||
export const update = [];
|
pause: ['schedulers::pauseSchedulers'],
|
||||||
|
// 恢复
|
||||||
|
resume: ['schedulers::resumeSchedulers'],
|
||||||
// 删除操作
|
// 删除操作
|
||||||
export const deleted = [];
|
deleted: ['schedulers::deleteSchedulers'],
|
||||||
|
};
|
||||||
|
|
|
@ -13,40 +13,31 @@ import { $t } from '@/plugins/i18n';
|
||||||
import { useSchedulersGroupStore } from '@/store/scheduler/schedulersGroup';
|
import { useSchedulersGroupStore } from '@/store/scheduler/schedulersGroup';
|
||||||
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
|
||||||
import { FormInstance } from 'element-plus';
|
import { FormInstance } from 'element-plus';
|
||||||
|
import { auth } from '@/views/scheduler/schedulersGroup/utils/auth';
|
||||||
|
import { hasAuth } from '@/router/utils';
|
||||||
|
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const schedulersGroupStore = useSchedulersGroupStore();
|
const schedulersGroupStore = useSchedulersGroupStore();
|
||||||
|
|
||||||
/**
|
/** 当前页改变时 */
|
||||||
* * 当前页改变时
|
|
||||||
*/
|
|
||||||
const onCurrentPageChange = async (value: number) => {
|
const onCurrentPageChange = async (value: number) => {
|
||||||
schedulersGroupStore.pagination.currentPage = value;
|
schedulersGroupStore.pagination.currentPage = value;
|
||||||
await onSearch();
|
await onSearch();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 当分页发生变化 */
|
||||||
* * 当分页发生变化
|
|
||||||
* @param value
|
|
||||||
*/
|
|
||||||
const onPageSizeChange = async (value: number) => {
|
const onPageSizeChange = async (value: number) => {
|
||||||
schedulersGroupStore.pagination.pageSize = value;
|
schedulersGroupStore.pagination.pageSize = value;
|
||||||
await onSearch();
|
await onSearch();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 选择多行 */
|
||||||
* * 选择多行
|
|
||||||
* @param rows
|
|
||||||
*/
|
|
||||||
const onSelectionChange = (rows: Array<any>) => {
|
const onSelectionChange = (rows: Array<any>) => {
|
||||||
deleteIds.value = rows.map((row: any) => row.id);
|
deleteIds.value = rows.map((row: any) => row.id);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** 重置表单 */
|
||||||
* 重置表单
|
|
||||||
* @param formEl
|
|
||||||
*/
|
|
||||||
const resetForm = async (formEl: FormInstance | undefined) => {
|
const resetForm = async (formEl: FormInstance | undefined) => {
|
||||||
if (!formEl) return;
|
if (!formEl) return;
|
||||||
formEl.resetFields();
|
formEl.resetFields();
|
||||||
|
@ -60,6 +51,7 @@ onMounted(() => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
|
<Auth :value="auth.search">
|
||||||
<el-form ref="formRef" :inline="true" :model="schedulersGroupStore.form" class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px] overflow-auto">
|
<el-form ref="formRef" :inline="true" :model="schedulersGroupStore.form" class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px] overflow-auto">
|
||||||
<el-form-item :label="$t('schedulersGroup_groupName')" prop="groupName">
|
<el-form-item :label="$t('schedulersGroup_groupName')" prop="groupName">
|
||||||
<el-input v-model="schedulersGroupStore.form.groupName" :placeholder="`${$t('input')}${$t('schedulersGroup_groupName')}`" class="!w-[180px]" clearable />
|
<el-input v-model="schedulersGroupStore.form.groupName" :placeholder="`${$t('input')}${$t('schedulersGroup_groupName')}`" class="!w-[180px]" clearable />
|
||||||
|
@ -72,13 +64,16 @@ onMounted(() => {
|
||||||
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)"> {{ $t('buttons.reset') }}</el-button>
|
<el-button :icon="useRenderIcon(Refresh)" @click="resetForm(formRef)"> {{ $t('buttons.reset') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
</Auth>
|
||||||
|
|
||||||
<PureTableBar :columns="columns" :title="$t('schedulersGroup')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
<PureTableBar :columns="columns" :title="$t('schedulersGroup')" @fullscreen="tableRef.setAdaptive()" @refresh="onSearch">
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<el-button :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd"> {{ $t('addNew') }}</el-button>
|
<el-button v-if="hasAuth(auth.add)" :icon="useRenderIcon(AddFill)" type="primary" @click="onAdd">
|
||||||
|
{{ $t('addNew') }}
|
||||||
|
</el-button>
|
||||||
|
|
||||||
<!-- 批量删除按钮 -->
|
<!-- 批量删除按钮 -->
|
||||||
<el-button :disabled="!(deleteIds.length > 0)" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
<el-button v-if="hasAuth(auth.deleted)" :disabled="!(deleteIds.length > 0)" :icon="useRenderIcon(Delete)" type="danger" @click="onDeleteBatch">
|
||||||
{{ $t('deleteBatches') }}
|
{{ $t('deleteBatches') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
@ -117,9 +112,8 @@ onMounted(() => {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #operation="{ row }">
|
<template #operation="{ row }">
|
||||||
<el-button :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
|
<el-button v-if="hasAuth(auth.update)" :icon="useRenderIcon(EditPen)" :size="size" class="reset-margin" link type="primary" @click="onUpdate(row)"> {{ $t('modify') }} </el-button>
|
||||||
<el-button :icon="useRenderIcon(AddFill)" :size="size" class="reset-margin" link type="primary" @click="onAdd"> {{ $t('addNew') }} </el-button>
|
<el-popconfirm v-if="hasAuth(auth.deleted)" :title="`${$t('delete')}${row.groupName}?`" @confirm="onDelete(row)">
|
||||||
<el-popconfirm :title="`${$t('delete')}${row.groupName}?`" @confirm="onDelete(row)">
|
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
<el-button :icon="useRenderIcon(Delete)" :size="size" class="reset-margin" link type="primary">
|
||||||
{{ $t('delete') }}
|
{{ $t('delete') }}
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
|
export const auth = {
|
||||||
// 分页查询
|
// 分页查询
|
||||||
export const search = [];
|
search: ['schedulersGroup::getSchedulersGroupList'],
|
||||||
// 添加操作
|
// 添加操作
|
||||||
export const add = [];
|
add: ['schedulersGroup::addSchedulersGroup'],
|
||||||
// 更新操作
|
// 更新操作
|
||||||
export const update = [];
|
update: ['schedulersGroup::updateSchedulersGroup'],
|
||||||
// 删除操作
|
// 删除操作
|
||||||
export const deleted = [];
|
deleted: ['schedulersGroup::deleteSchedulersGroup'],
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in New Issue