v3.12【新增】标签页Chome模式;【优化】优化很多细节

This commit is contained in:
zhuoda
2025-01-08 20:14:53 +08:00
parent 56517b650a
commit 96d498fbbf
77 changed files with 2721 additions and 918 deletions

View File

@@ -19,6 +19,10 @@ export const jobApi = {
executeJob: (param) => {
return postRequest('/support/job/execute', param);
},
// 定时任务-新增-任务信息 @huke
addJob: (param) => {
return postRequest('/support/job/add', param);
},
// 定时任务-更新-任务信息 @huke
updateJob: (param) => {
return postRequest('/support/job/update', param);
@@ -31,4 +35,8 @@ export const jobApi = {
queryJobLog: (param) => {
return postRequest('/support/job/log/query', param);
},
// 定时任务-删除 @zhuoda
deleteJob: (param) => {
return getRequest(`/support/job/delete?jobId=${param}`);
},
};

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="120" height="35" viewBox="0 0 120 35">
<path id="bg" data-name="bg" d="M13.444,35H1.272v0A12.461,12.461,0,0,0,13.444,22.845V8a8,8,0,0,1,8-8H70V35ZM0,34.961v0Z" fill="#e9efff"/>
</svg>

After

Width:  |  Height:  |  Size: 233 B

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="120" height="35" viewBox="0 0 120 35">
<path id="bg_default" data-name="bg_default" d="M13.444,35H1.272v0A12.461,12.461,0,0,0,13.444,22.845V8a8,8,0,0,1,8-8H70V35ZM0,34.961v0Z" fill="#DEE1E6"/>
</svg>

After

Width:  |  Height:  |  Size: 249 B

View File

@@ -24,7 +24,7 @@ export const appDefaultConfig = {
borderRadius: 6,
// 标签页
pageTagFlag: true,
// 标签页样式: default、 antd
// 标签页样式: default、 antd、naive
pageTagStyle: 'default',
// 面包屑
breadCrumbFlag: true,

View File

@@ -31,4 +31,8 @@ export const PAGE_TAG_ENUM = {
value: 'antd',
desc: 'Ant Design',
},
CHROME: {
value: 'chrome',
desc: 'Chrome',
},
};

View File

@@ -73,7 +73,8 @@
<a-form-item :label="$t('setting.pagetag.style')">
<a-radio-group v-model:value="formState.pageTagStyle" button-style="solid" @change="changePageTagStyle">
<a-radio-button value="default">默认</a-radio-button>
<a-radio-button value="antd">Ant Design</a-radio-button>
<a-radio-button value="antd">Ant</a-radio-button>
<a-radio-button value="chrome">Chrome</a-radio-button>
</a-radio-group>
</a-form-item>
<a-form-item :label="$t('setting.pagetag')">

View File

@@ -0,0 +1,342 @@
<!--
* chrome样式 <a-tabs> 组件
*
* @Author: 1024创新实验室-主任卓大
* @Date: 2024-11-27 20:29:12
* @Wechat: zhuda1024
* @Email: lab1024@163.com
* @Copyright 1024创新实验室 https://1024lab.net Since 2012
-->
<template>
<!-- 标签页共两部分1标签 2标签操作区 -->
<a-row style="border-bottom: 1px solid #eeeeee; position: relative" v-show="pageTagFlag">
<a-dropdown :trigger="['contextmenu']">
<div class="smart-page-tag">
<a-tabs style="width: 100%" :tab-position="mode" v-model:activeKey="selectedKey" size="small" @tabClick="selectTab">
<a-tab-pane v-for="item in tagNav" :key="item.menuName">
<template #tab>
<span class="smart-page-tag-content">
<home-outlined style="font-size: 12px" v-if="item.menuName === HOME_PAGE_NAME" class="smart-page-tag-close" />
<component class="smart-page-tag-icon" v-else :is="$antIcons[item.menuIcon]" />
{{ item.menuTitle }}
<close-outlined @click.stop="closeTag(item, false)" v-if="item.menuName !== HOME_PAGE_NAME" class="smart-page-tag-close" />
</span>
</template>
</a-tab-pane>
</a-tabs>
</div>
<template #overlay>
<a-menu>
<a-menu-item @click="closeByMenu(false)">关闭其他</a-menu-item>
<a-menu-item @click="closeByMenu(true)">关闭所有</a-menu-item>
</a-menu>
</template>
</a-dropdown>
<a-dropdown>
<!--标签页操作区-->
<div class="smart-page-tag-operate">
<div class="smart-page-tag-operate-icon">
<AppstoreOutlined />
</div>
</div>
<template #overlay>
<a-menu>
<a-menu-item @click="closeByMenu(false)">关闭其他</a-menu-item>
<a-menu-item @click="closeByMenu(true)">关闭所有</a-menu-item>
</a-menu>
</template>
</a-dropdown>
</a-row>
</template>
<script setup>
import { AppstoreOutlined, CloseOutlined } from '@ant-design/icons-vue';
import { computed, ref, watch } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { HOME_PAGE_NAME } from '/@/constants/system/home-const';
import { useAppConfigStore } from '/@/store/modules/system/app-config';
import { useUserStore } from '/@/store/modules/system/user';
import { theme } from 'ant-design-vue';
//标签页 是否显示
const pageTagFlag = computed(() => useAppConfigStore().$state.pageTagFlag);
const router = useRouter();
const route = useRoute();
const mode = ref('top');
const tagNav = computed(() => useUserStore().getTagNav || []);
const selectedKey = ref(route.name);
watch(
() => route.name,
(newValue, oldValue) => {
selectedKey.value = newValue;
},
{ immediate: true }
);
//选择某个标签页
function selectTab(name) {
if (selectedKey.value === name) {
return;
}
// 寻找tag
let tag = tagNav.value.find((e) => e.menuName === name);
if (!tag) {
router.push({ name: HOME_PAGE_NAME });
return;
}
// router.push({ name, query: Object.assign({ _keepAlive: 1 }, tag.menuQuery) });
router.push({ name, query: tag.menuQuery });
}
//通过菜单关闭
function closeByMenu(closeAll) {
let find = tagNav.value.find((e) => e.menuName === selectedKey.value);
if (!find || closeAll) {
closeTag(null, true);
} else {
closeTag(find, true);
}
}
//直接关闭
function closeTag(item, closeAll) {
// 关闭单个tag
if (item && !closeAll) {
let goName = HOME_PAGE_NAME;
let goQuery = undefined;
if (item.fromMenuName && item.fromMenuName !== item.menuName && tagNav.value.some((e) => e.menuName === item.fromMenuName)) {
goName = item.fromMenuName;
goQuery = item.fromMenuQuery;
} else {
// 查询左侧tag
let index = tagNav.value.findIndex((e) => e.menuName === item.menuName);
if (index > 0) {
// 查询左侧tag
let leftTagNav = tagNav.value[index - 1];
goName = leftTagNav.menuName;
goQuery = leftTagNav.menuQuery;
}
}
// router.push({ name: goName, query: Object.assign({ _keepAlive: 1 }, goQuery) });
router.push({ name: goName, query: goQuery });
} else if (!item && closeAll) {
// 关闭所有tag
router.push({ name: HOME_PAGE_NAME });
}
// 关闭其他tag不做处理 直接调用closeTagNav
useUserStore().closeTagNav(item ? item.menuName : null, closeAll);
}
const { useToken } = theme;
const { token } = useToken();
const borderRadius = 8 + 'px';
</script>
<style scoped lang="less">
@smart-page-tag-operate-width: 40px;
@color-primary: v-bind('token.colorPrimary');
.smart-page-tag-operate {
width: @smart-page-tag-operate-width;
height: @smart-page-tag-operate-width;
background-color: #ffffff;
font-size: 17px;
text-align: center;
vertical-align: middle;
line-height: @smart-page-tag-operate-width;
padding-right: 10px;
cursor: pointer;
color: #606266;
.smart-page-tag-operate-icon {
width: 20px;
height: 20px;
transition: all 1s;
transform-origin: 10px 20px;
}
.smart-page-tag-operate-icon:hover {
width: 20px;
height: 20px;
transform: rotate(360deg);
}
}
.smart-page-tag-operate:hover {
color: @color-primary;
}
.smart-page-tag {
position: relative;
box-sizing: border-box;
display: flex;
align-content: center;
align-items: flex-end;
justify-content: space-between;
min-height: @page-tag-height;
padding-right: 20px;
padding-left: 20px;
user-select: none;
background: #fff;
width: calc(100% - @smart-page-tag-operate-width);
.smart-page-tag-close {
margin-left: 5px;
font-size: 12px;
color: #666666;
}
/** 覆盖 ant design vue的 tabs 样式,变小一点 **/
:deep(.ant-tabs-nav) {
margin: 0;
// padding: 0 0 2px 0;
min-height: 35px;
min-width: 120px;
box-sizing: border-box;
}
:deep(.ant-tabs-nav::before) {
border-bottom: 1px solid #ffffff;
}
:deep(.ant-tabs-small > .ant-tabs-nav .ant-tabs-tab) {
padding: 5px 18px 3px 24px;
border-radius: v-bind(borderRadius) v-bind(borderRadius) 0 0;
margin: 0 -10px;
&:nth-child(1) {
margin-left: 0 !important;
}
&:nth-last-child(2) {
margin-right: 0 !important;
}
}
.smart-page-tag-content {
display: inline-block;
min-width: 100px;
&::after {
content: '';
position: absolute;
width: 1px;
height: 16px;
position: absolute;
right: 9px;
z-index: -2;
top: 10px;
background: #eeeeee;
}
.smart-page-tag-icon{
margin-right:5px;
}
}
:deep(.ant-tabs-tab-active) {
position: relative;
background-size: 60% 100%;
& + .ant-tabs-tab {
margin-left: -50px;
}
&::before {
content: '';
background: url(/@/assets/images/nav/active_bg2.svg) no-repeat left;
width: 50%;
height: 35px;
// background-size: 130%;
z-index: -1;
position: absolute;
left: -4px;
bottom: 0;
}
&::after {
content: '';
background: url(/@/assets/images/nav/active_bg2.svg) no-repeat left;
width: 50%;
height: 35px;
transform: scaleX(-1);
// background-size: 130%;
z-index: -1;
position: absolute;
right: -4px;
bottom: 0;
}
.smart-page-tag-content {
&::before {
content: '';
position: absolute;
height: 35px;
background: #e9efff;
width: 60%;
left: 0;
right: 0;
// top: 0;
bottom: 0;
margin: auto;
z-index: -1;
}
&::after {
display: none;
}
}
.smart-page-tag-close {
color: @color-primary;
}
}
:deep(.ant-tabs-ink-bar) {
display: none;
}
:deep(.ant-tabs-nav .ant-tabs-tab:hover) {
&:not(.ant-tabs-tab-active) {
&::before {
content: '';
background: url(/@/assets/images/nav/active_bg2_default.svg) no-repeat left;
width: 50%;
height: 35px;
// background-size: 130%;
z-index: -2;
position: absolute;
left: -4px;
bottom: 0;
}
&::after {
content: '';
background: url(/@/assets/images/nav/active_bg2_default.svg) no-repeat left;
width: 50%;
height: 35px;
transform: scaleX(-1);
// background-size: 130%;
z-index: -1;
position: absolute;
right: -4px;
bottom: 0;
}
.smart-page-tag-content {
color:rgba(0,0,0,.88);
&::before {
content: '';
position: absolute;
height: 35px;
background: #dee1e6;
width: 60%;
left: 0;
right: 0;
// top: 0;
bottom: 0;
margin: auto;
z-index: -1;
}
&::after {
display: none;
}
}
}
.smart-page-tag-close {
color: @color-primary;
}
}
}
</style>

View File

@@ -11,6 +11,7 @@
<div id="smartAdminPageTag">
<DefaultTab v-if="pageTagStyle === PAGE_TAG_ENUM.DEFAULT.value" />
<AntdTab v-if="pageTagStyle === PAGE_TAG_ENUM.ANTD.value" />
<ChromeTab v-if="pageTagStyle === PAGE_TAG_ENUM.CHROME.value" />
</div>
</template>
@@ -19,6 +20,7 @@
import { useAppConfigStore } from '/@/store/modules/system/app-config';
import DefaultTab from './components/default-tab.vue';
import AntdTab from './components/antd-tab.vue';
import ChromeTab from './components/chrome-tab.vue';
import { PAGE_TAG_ENUM } from '/@/constants/layout-const.js';
const pageTagStyle = computed(() => useAppConfigStore().$state.pageTagStyle);

View File

@@ -14,23 +14,25 @@
<span class="ant-menu">{{ topMenu.menuName }}</span>
</div>
<!-- 次级菜单展示 -->
<a-menu :selectedKeys="selectedKeys" :openKeys="openKeys" mode="inline">
<template v-for="item in topMenu.children" :key="item.menuId">
<template v-if="item.visibleFlag">
<template v-if="$lodash.isEmpty(item.children)">
<a-menu-item :key="item.menuId.toString()" @click="turnToPage(item)">
<template #icon v-if="item.icon">
<component :is="$antIcons[item.icon]" />
</template>
{{ item.menuName }}
</a-menu-item>
</template>
<template v-else>
<SubMenu :menu-info="item" :key="item.menuId" @turnToPage="turnToPage" />
<div class="bottom-menu">
<a-menu :selectedKeys="selectedKeys" :openKeys="openKeys" mode="inline">
<template v-for="item in topMenu.children" :key="item.menuId">
<template v-if="item.visibleFlag">
<template v-if="$lodash.isEmpty(item.children)">
<a-menu-item :key="item.menuId.toString()" @click="turnToPage(item)">
<template #icon v-if="item.icon">
<component :is="$antIcons[item.icon]" />
</template>
{{ item.menuName }}
</a-menu-item>
</template>
<template v-else>
<SubMenu :menu-info="item" :key="item.menuId" @turnToPage="turnToPage" />
</template>
</template>
</template>
</template>
</a-menu>
</a-menu>
</div>
</div>
</template>
<script setup>
@@ -84,10 +86,15 @@
</script>
<style scoped lang="less">
.recursion-container {
height: 100%;
height: 100vh;
background: #ffffff;
}
.bottom-menu{
overflow: auto;
display: flex;
height: 90%;
color: #515a6e;
}
.top-menu {
overflow: hidden;
display: flex;

View File

@@ -75,6 +75,7 @@
import watermark from '../lib/smart-watermark';
import { useUserStore } from '/@/store/modules/system/user';
import HeaderAvatar from './components/header-user-space/header-avatar.vue';
import { LAYOUT_ELEMENT_IDS } from '/@/layout/layout-const';
const websiteName = computed(() => useAppConfigStore().websiteName);
const windowHeight = window.innerHeight;

View File

@@ -206,6 +206,7 @@ export const useUserStore = defineStore({
// @ts-ignore
menuTitle: route.meta.title,
menuQuery: route.query,
menuIcon:route.meta?.icon,
// @ts-ignore
fromMenuName: from.name,
fromMenuQuery: from.query,

View File

@@ -100,7 +100,7 @@
<a-tag v-show="!text" color="success">未删除</a-tag>
</template>
<template v-else-if="column.dataIndex === 'action'">
<div class="smart-table-operate">
<div class="smart-table-operate" v-if="!record.deletedFlag">
<a-button type="link" @click="addOrUpdate(record.noticeId)" v-privilege="'oa:notice:update'">编辑</a-button>
<a-button type="link" @click="onDelete(record.noticeId)" v-privilege="'oa:notice:delete'" danger>删除</a-button>
</div>

View File

@@ -1,11 +1,11 @@
<!--
* 代码生成 配置信息
*
* @Author: 1024创新实验室-主任卓大
* @Date: 2022-09-22 21:50:41
* @Wechat: zhuda1024
* @Email: lab1024@163.com
* @Copyright 1024创新实验室 https://1024lab.net Since 2012
*
* @Author: 1024创新实验室-主任卓大
* @Date: 2022-09-22 21:50:41
* @Wechat: zhuda1024
* @Email: lab1024@163.com
* @Copyright 1024创新实验室 https://1024lab.net Since 2012
-->
<template>
<a-alert
@@ -76,7 +76,7 @@
<pre class="preview-block">
&lt;!--
* {{ formData.description }}
*
*
* @Author: {{ formData.frontAuthor }}
* @Date: {{ formData.frontDate }}
* @Copyright {{ formData.copyright }}
@@ -182,7 +182,7 @@
//命名
let removePrefixTableName = tableInfo.tableName;
if (_.startsWith(tableInfo.tableName, tablePrefix.value)) {
removePrefixTableName = _.trim(removePrefixTableName, tablePrefix.value);
removePrefixTableName = _.trimStart(removePrefixTableName, tablePrefix.value);
}
formData.moduleName = basic && basic.moduleName ? basic.moduleName : removePrefixTableName;
formData.moduleName = convertUpperCamel(formData.moduleName);

View File

@@ -0,0 +1,283 @@
<!--
* 已删除的 JOB 列表
* @Author: zhuoda
* @Date: 2025/01/05
-->
<template>
<div>
<a-form class="smart-query-form">
<a-row class="smart-query-form-row">
<a-form-item label="关键字" class="smart-query-form-item">
<a-input style="width: 200px" v-model:value="queryForm.searchWord" placeholder="请输入关键字" :maxlength="30" />
</a-form-item>
<a-form-item label="触发类型" class="smart-query-form-item">
<a-select style="width: 155px" v-model:value="queryForm.triggerType" placeholder="请选择触发类型" allowClear>
<a-select-option v-for="item in $smartEnumPlugin.getValueDescList('TRIGGER_TYPE_ENUM')" :key="item.value" :value="item.value">
{{ item.desc }}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="状态" class="smart-query-form-item">
<a-select style="width: 150px" v-model:value="queryForm.enabledFlag" placeholder="请选择状态" allowClear>
<a-select-option :key="1"> 开启 </a-select-option>
<a-select-option :key="0"> 停止 </a-select-option>
</a-select>
</a-form-item>
<a-form-item class="smart-query-form-item smart-margin-left10">
<a-button-group>
<a-button type="primary" @click="onSearch" v-privilege="'support:job:query'">
<template #icon>
<ReloadOutlined />
</template>
查询
</a-button>
<a-button @click="resetQuery" v-privilege="'support:job:query'">
<template #icon>
<SearchOutlined />
</template>
重置
</a-button>
</a-button-group>
</a-form-item>
</a-row>
</a-form>
<a-flex align="end" vertical>
<div class="smart-table-setting-block smart-margin-bottom10">
<TableOperator
class="smart-margin-bottom5 pull-right"
v-model="columns"
:tableId="TABLE_ID_CONST.SUPPORT.JOB"
:refresh="queryJobList"
/>
</div>
</a-flex>
<a-table
:scroll="{ x: 1800 }"
size="small"
:loading="tableLoading"
bordered
:dataSource="tableData"
:columns="columns"
rowKey="jobId"
:pagination="false"
>
<template #bodyCell="{ record, column }">
<template v-if="column.dataIndex === 'jobClass'">
<a-tooltip>
<template #title>{{ record.jobClass }}</template>
{{ handleJobClass(record.jobClass) }}
</a-tooltip>
</template>
<template v-if="column.dataIndex === 'triggerType'">
<a-tag v-if="record.triggerType === TRIGGER_TYPE_ENUM.CRON.value" color="success">{{ record.triggerTypeDesc }}</a-tag>
<a-tag v-else-if="record.triggerType === TRIGGER_TYPE_ENUM.FIXED_DELAY.value" color="processing">{{ record.triggerTypeDesc }}</a-tag>
<a-tag v-else color="pink">{{ record.triggerTypeDesc }}</a-tag>
</template>
<template v-if="column.dataIndex === 'lastJob'">
<div v-if="record.lastJobLog">
<a-tooltip>
<template #title>{{ handleExecuteResult(record.lastJobLog.executeResult) }}</template>
<CheckOutlined v-if="record.lastJobLog.successFlag" style="color: #39c710" />
<WarningOutlined v-else style="color: #f50" />
{{ record.lastJobLog.executeStartTime }}
</a-tooltip>
</div>
</template>
<template v-if="column.dataIndex === 'nextJob'">
<a-tooltip v-if="record.enabledFlag && record.nextJobExecuteTimeList">
<template #title>
<div>下次执行(预估时间)</div>
<div v-for="item in record.nextJobExecuteTimeList" :key="item">{{ item }}</div>
</template>
{{ record.nextJobExecuteTimeList[0] }}
</a-tooltip>
</template>
<template v-if="column.dataIndex === 'enabledFlag'">
<a-switch checked-children="已启用" un-checked-children="已禁用" v-model:checked="record.enabledFlag" disabled :loading="record.enabledLoading" />
</template>
<template v-if="column.dataIndex === 'action'">
<div class="smart-table-operate">
<a-button v-privilege="'support:job:log:query'" @click="openJobLogModal(record.jobId, record.jobName)" type="link">记录</a-button>
</div>
</template>
</template>
</a-table>
<div class="smart-query-table-page">
<a-pagination
showSizeChanger
showQuickJumper
show-less-items
:pageSizeOptions="PAGE_SIZE_OPTIONS"
:defaultPageSize="queryForm.pageSize"
v-model:current="queryForm.pageNum"
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="queryJobList"
@showSizeChange="queryJobList"
:show-total="(total) => `${total}`"
/>
</div>
<!-- 记录 -->
<JobLogListModal ref="jobLogModal" />
</div>
</template>
<script setup>
import { onMounted, reactive, ref } from 'vue';
import { jobApi } from '/@/api/support/job-api';
import { PAGE_SIZE_OPTIONS } from '/@/constants/common-const';
import { smartSentry } from '/@/lib/smart-sentry';
import { TRIGGER_TYPE_ENUM } from '/@/constants/support/job-const.js';
import JobLogListModal from './job-log-list-modal.vue';
import {TABLE_ID_CONST} from "/@/constants/support/table-id-const.js";
import TableOperator from "/@/components/support/table-operator/index.vue";
const columns = ref([
{
title: 'id',
width: 50,
dataIndex: 'jobId',
},
{
title: '任务名称',
dataIndex: 'jobName',
minWidth: 150,
ellipsis: true,
},
{
title: '执行类',
dataIndex: 'jobClass',
minWidth: 180,
ellipsis: true,
},
{
title: '触发类型',
dataIndex: 'triggerType',
width: 110,
},
{
title: '触发配置',
dataIndex: 'triggerValue',
width: 150,
},
{
title: '上次执行',
width: 180,
dataIndex: 'lastJob',
},
{
title: '下次执行',
width: 150,
dataIndex: 'nextJob',
},
{
title: '启用状态',
dataIndex: 'enabledFlag',
width: 100,
},
{
title: '执行参数',
dataIndex: 'param',
ellipsis: true,
},
{
title: '任务描述',
dataIndex: 'remark',
ellipsis: true,
},
{
title: '排序',
dataIndex: 'sort',
width: 65,
},
{
title: '更新人',
dataIndex: 'updateName',
width: 90,
},
{
title: '更新时间',
dataIndex: 'updateTime',
width: 150,
},
{
title: '操作',
dataIndex: 'action',
fixed: 'right',
width: 70,
},
]);
// ---------------- 查询数据 -----------------------
const queryFormState = {
searchWord: '',
enabledFlag: null,
triggerType: null,
deletedFlag: true,
pageNum: 1,
pageSize: 10,
};
const queryForm = reactive({ ...queryFormState });
const tableLoading = ref(false);
const tableData = ref([]);
const total = ref(0);
function resetQuery() {
Object.assign(queryForm, queryFormState);
queryJobList();
}
function onSearch() {
queryForm.pageNum = 1;
queryJobList();
}
// 处理执行类展示 默认返回类
function handleJobClass(jobClass) {
return jobClass.split('.').pop();
}
// 上次处理结果展示
function handleExecuteResult(result) {
let num = 400;
return result ? result.substring(0, num) + (result.length > num ? ' ...' : '') : '';
}
async function queryJobList() {
try {
tableLoading.value = true;
let responseModel = await jobApi.queryJob(queryForm);
const list = responseModel.data.list;
total.value = responseModel.data.total;
tableData.value = list;
} catch (e) {
smartSentry.captureError(e);
} finally {
tableLoading.value = false;
}
}
onMounted(queryJobList);
// 查询任务详情
async function queryJobInfo(jobId) {
try {
let res = await jobApi.queryJobInfo(jobId);
return res.data;
} catch (e) {
smartSentry.captureError(e);
}
}
// ------------------------------------ 执行记录 -------------------------------------
const jobLogModal = ref();
function openJobLogModal(jobId, name) {
jobLogModal.value.show(jobId, name);
}
</script>

View File

@@ -6,47 +6,47 @@
<template>
<div>
<!-- 编辑 -->
<a-modal :open="updateModalShow" :width="650" title="编辑" ok-text="确认" cancel-text="取消" @cancel="closeUpdateModal" @ok="confirmUpdateJob">
<a-modal :open="updateModalShow" :width="650" :title="isAdd ? '添加':'编辑'" ok-text="确认" cancel-text="取消" @cancel="closeUpdateModal" @ok="confirmUpdateJob">
<a-form ref="updateFormRef" :model="updateForm" :rules="updateRules" :label-col="{ span: 4 }">
<a-form-item label="任务名称" name="jobName">
<a-input placeholder="请输入任务名称" v-model:value="updateForm.jobName" :maxlength="100" :showCount="true" />
</a-form-item>
<a-form-item label="任务描述" name="remark">
<a-textarea
:auto-size="{ minRows: 2, maxRows: 4 }"
v-model:value="updateForm.remark"
placeholder="(可选)请输入任务备注描述"
:maxlength="250"
:showCount="true"
:auto-size="{ minRows: 2, maxRows: 4 }"
v-model:value="updateForm.remark"
placeholder="(可选)请输入任务备注描述"
:maxlength="250"
:showCount="true"
/>
</a-form-item>
<a-form-item label="排序" name="sort">
<a-input-number
v-model:value="updateForm.sort"
:min="-99999999"
:max="99999999"
:precision="0"
style="width: 100%"
placeholder="值越小越靠前"
v-model:value="updateForm.sort"
:min="-99999999"
:max="99999999"
:precision="0"
style="width: 100%"
placeholder="值越小越靠前"
>
</a-input-number>
</a-form-item>
<a-form-item label="执行类" name="jobClass">
<a-textarea
:auto-size="{ minRows: 2, maxRows: 4 }"
v-model:value="updateForm.jobClass"
placeholder="示例net.lab1024.sa.base.module.support.job.sample.SmartJobSample1"
:maxlength="200"
:showCount="true"
:auto-size="{ minRows: 2, maxRows: 4 }"
v-model:value="updateForm.jobClass"
placeholder="示例net.lab1024.sa.base.module.support.job.sample.SmartJobSample1"
:maxlength="200"
:showCount="true"
/>
</a-form-item>
<a-form-item label="任务参数" name="param">
<a-textarea
:auto-size="{ minRows: 3, maxRows: 6 }"
v-model:value="updateForm.param"
placeholder="(可选)请输入任务执行参数"
:maxlength="1000"
:showCount="true"
:auto-size="{ minRows: 3, maxRows: 6 }"
v-model:value="updateForm.param"
placeholder="(可选)请输入任务执行参数"
:maxlength="1000"
:showCount="true"
/>
</a-form-item>
<a-form-item label="触发类型" name="triggerType">
@@ -57,19 +57,18 @@
</a-form-item>
<a-form-item label="触发时间" name="triggerTime">
<a-input
v-if="updateForm.triggerType === TRIGGER_TYPE_ENUM.CRON.value"
placeholder="示例10 15 0/1 * * *"
v-model:value="updateForm.cron"
:maxlength="100"
:showCount="true"
v-if="updateForm.triggerType === TRIGGER_TYPE_ENUM.CRON.value"
placeholder="示例10 15 0/1 * * *"
v-model:value="updateForm.cron"
:maxlength="100"
:showCount="true"
/>
<a-input-number
v-else-if="updateForm.triggerType === TRIGGER_TYPE_ENUM.FIXED_DELAY.value"
v-model:value="updateForm.fixedDelay"
:min="1"
:max="100000000"
:precision="0"
:defaultValue="100"
v-else-if="updateForm.triggerType === TRIGGER_TYPE_ENUM.FIXED_DELAY.value"
v-model:value="updateForm.fixedDelay"
:min="1"
:max="100000000"
:precision="0"
>
<template #addonBefore>每隔</template>
<template #addonAfter></template>
@@ -83,13 +82,13 @@
<!-- 立即执行 -->
<a-modal
:open="executeModalShow"
:width="650"
title="执行任务"
ok-text="执行"
cancel-text="取消"
@cancel="closeExecuteModal"
@ok="confirmExecuteJob"
:open="executeModalShow"
:width="650"
title="执行任务"
ok-text="执行"
cancel-text="取消"
@cancel="closeExecuteModal"
@ok="confirmExecuteJob"
>
<br />
<a-alert type="info" show-icon style="margin-left: 25px">
@@ -105,11 +104,11 @@
</a-form-item>
<a-form-item label="任务参数" name="param">
<a-textarea
:auto-size="{ minRows: 3, maxRows: 6 }"
v-model:value="executeForm.param"
placeholder="(可选)请输入任务执行参数"
:maxlength="1000"
:showCount="true"
:auto-size="{ minRows: 3, maxRows: 6 }"
v-model:value="executeForm.param"
placeholder="(可选)请输入任务执行参数"
:maxlength="1000"
:showCount="true"
/>
</a-form-item>
</a-form>
@@ -117,42 +116,46 @@
</div>
</template>
<script setup>
import { message } from 'ant-design-vue';
import { reactive, ref } from 'vue';
import { jobApi } from '/@/api/support/job-api';
import { smartSentry } from '/@/lib/smart-sentry';
import { SmartLoading } from '/@/components/framework/smart-loading/index.js';
import { TRIGGER_TYPE_ENUM } from '/@/constants/support/job-const.js';
import { message } from 'ant-design-vue';
import { reactive, ref } from 'vue';
import { jobApi } from '/@/api/support/job-api';
import { smartSentry } from '/@/lib/smart-sentry';
import { SmartLoading } from '/@/components/framework/smart-loading/index.js';
import { TRIGGER_TYPE_ENUM } from '/@/constants/support/job-const.js';
// emit
const emit = defineEmits(['reloadList']);
// emit
const emit = defineEmits(['reloadList']);
const updateModalShow = ref(false);
const updateFormRef = ref();
const isAdd = ref(false);
const updateModalShow = ref(false);
const updateFormRef = ref();
const updateFormDefault = {
jobId: null,
jobName: '',
jobClass: '',
triggerType: null,
triggerValue: null,
cron: '',
fixedDelay: null,
param: '',
enabledFlag: false,
remark: '',
sort: null,
};
let updateForm = reactive({ ...updateFormDefault });
const updateRules = {
jobName: [{ required: true, message: '请输入任务名称' }],
jobClass: [{ required: true, message: '请输入执行类' }],
triggerType: [{ required: true, message: '请选择触发类型' }],
sort: [{ required: true, message: '请输入排序' }],
};
const updateFormDefault = {
jobId: null,
jobName: '',
jobClass: '',
triggerType: TRIGGER_TYPE_ENUM.CRON.value,
triggerValue: null,
cron: '',
fixedDelay: null,
param: '',
enabledFlag: false,
remark: '',
sort: null,
};
let updateForm = reactive({ ...updateFormDefault });
const updateRules = {
jobName: [{ required: true, message: '请输入任务名称' }],
jobClass: [{ required: true, message: '请输入执行类' }],
triggerType: [{ required: true, message: '请选择触发类型' }],
sort: [{ required: true, message: '请输入排序' }],
};
// 打开编辑弹框
function openUpdateModal(record) {
// 打开编辑弹框
function openUpdateModal(record) {
isAdd.value = null == record;
// 更新
if(!isAdd.value){
Object.assign(updateForm, record);
if (TRIGGER_TYPE_ENUM.CRON.value === record.triggerType) {
updateForm.cron = record.triggerValue;
@@ -160,30 +163,43 @@
if (TRIGGER_TYPE_ENUM.FIXED_DELAY.value === record.triggerType) {
updateForm.fixedDelay = record.triggerValue;
}
updateModalShow.value = true;
}
updateModalShow.value = true;
}
// 关闭编辑弹框
function closeUpdateModal() {
Object.assign(updateForm, updateFormDefault);
updateModalShow.value = false;
}
// 关闭编辑弹框
function closeUpdateModal() {
Object.assign(updateForm, updateFormDefault);
updateModalShow.value = false;
}
// 确认更新
async function confirmUpdateJob() {
updateFormRef.value
// 确认更新
async function confirmUpdateJob() {
updateFormRef.value
.validate()
.then(async () => {
SmartLoading.show();
if (TRIGGER_TYPE_ENUM.CRON.value === updateForm.triggerType) {
updateForm.triggerValue = updateForm.cron;
}
if (TRIGGER_TYPE_ENUM.FIXED_DELAY.value === updateForm.triggerType) {
updateForm.triggerValue = updateForm.fixedDelay;
}
if(!updateForm.triggerValue){
message.error('请填写 触发时间');
return;
}
try {
await jobApi.updateJob(updateForm);
message.success('更新成功');
SmartLoading.show();
if(isAdd.value){
await jobApi.addJob(updateForm)
message.success('添加成功');
}else {
await jobApi.updateJob(updateForm);
message.success('更新成功');
}
closeUpdateModal();
emit('reloadList');
} catch (error) {
@@ -196,53 +212,53 @@
console.log('error', error);
message.error('参数验证错误,请检查表单数据');
});
}
// ------------------------------------ 执行任务 -------------------------------------
const executeModalShow = ref(false);
const executeFormDefault = {
jobId: null,
jobName: '',
jobClass: '',
param: null,
};
let executeForm = reactive({ ...executeFormDefault });
// 打开执行弹框
function openExecuteModal(record) {
Object.assign(executeForm, record);
executeModalShow.value = true;
}
// 关闭执行弹框
function closeExecuteModal() {
Object.assign(executeForm, executeFormDefault);
executeModalShow.value = false;
}
// 确认执行
async function confirmExecuteJob() {
try {
let executeParam = {
jobId: executeForm.jobId,
param: executeForm.param,
};
await jobApi.executeJob(executeParam);
// loading 延迟后再提示刷新
SmartLoading.show();
await new Promise((resolve) => setTimeout(resolve, 2000));
message.success('执行成功');
closeExecuteModal();
emit('reloadList');
} catch (e) {
smartSentry.captureError(e);
} finally {
SmartLoading.hide();
}
}
// ------------------------------------ 执行任务 -------------------------------------
const executeModalShow = ref(false);
const executeFormDefault = {
jobId: null,
jobName: '',
jobClass: '',
param: null,
};
let executeForm = reactive({ ...executeFormDefault });
// 打开执行弹框
function openExecuteModal(record) {
Object.assign(executeForm, record);
executeModalShow.value = true;
}
// 关闭执行弹框
function closeExecuteModal() {
Object.assign(executeForm, executeFormDefault);
executeModalShow.value = false;
}
// 确认执行
async function confirmExecuteJob() {
try {
let executeParam = {
jobId: executeForm.jobId,
param: executeForm.param,
};
await jobApi.executeJob(executeParam);
// loading 延迟后再提示刷新
SmartLoading.show();
await new Promise((resolve) => setTimeout(resolve, 2000));
message.success('执行成功');
closeExecuteModal();
emit('reloadList');
} catch (e) {
smartSentry.captureError(e);
} finally {
SmartLoading.hide();
}
}
defineExpose({
openUpdateModal,
openExecuteModal,
});
defineExpose({
openUpdateModal,
openExecuteModal,
});
</script>

View File

@@ -5,122 +5,143 @@
-->
<template>
<div>
<a-form class="smart-query-form">
<a-row class="smart-query-form-row">
<a-form-item label="关键字" class="smart-query-form-item">
<a-input style="width: 200px" v-model:value="queryForm.searchWord" placeholder="请输入关键字" :maxlength="30" />
</a-form-item>
<a-form-item label="触发类型" class="smart-query-form-item">
<a-select style="width: 155px" v-model:value="queryForm.triggerType" placeholder="请选择触发类型" allowClear>
<a-select-option v-for="item in $smartEnumPlugin.getValueDescList('TRIGGER_TYPE_ENUM')" :key="item.value" :value="item.value">
{{ item.desc }}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="状态" class="smart-query-form-item">
<a-select style="width: 150px" v-model:value="queryForm.enabledFlag" placeholder="请选择状态" allowClear>
<a-select-option :key="1"> 开启 </a-select-option>
<a-select-option :key="0"> 停止 </a-select-option>
</a-select>
</a-form-item>
<a-form-item class="smart-query-form-item smart-margin-left10">
<a-button-group>
<a-button type="primary" @click="onSearch" v-privilege="'support:job:query'">
<template #icon>
<ReloadOutlined />
</template>
查询
</a-button>
<a-button @click="resetQuery" v-privilege="'support:job:query'">
<template #icon>
<SearchOutlined />
</template>
重置
</a-button>
</a-button-group>
</a-form-item>
</a-row>
</a-form>
<a-card size="small" :bordered="false" :hoverable="true">
<a-row justify="end">
<TableOperator class="smart-margin-bottom5" v-model="columns" :tableId="TABLE_ID_CONST.SUPPORT.JOB" :refresh="queryJobList" />
</a-row>
<a-tabs v-model:activeKey="activeKey">
<a-tab-pane key="1" tab="有效任务">
<a-form class="smart-query-form">
<a-row class="smart-query-form-row">
<a-form-item label="关键字" class="smart-query-form-item">
<a-input style="width: 200px" v-model:value="queryForm.searchWord" placeholder="请输入关键字" :maxlength="30" />
</a-form-item>
<a-form-item label="触发类型" class="smart-query-form-item">
<a-select style="width: 155px" v-model:value="queryForm.triggerType" placeholder="请选择触发类型" allowClear>
<a-select-option v-for="item in $smartEnumPlugin.getValueDescList('TRIGGER_TYPE_ENUM')" :key="item.value" :value="item.value">
{{ item.desc }}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="状态" class="smart-query-form-item">
<a-select style="width: 150px" v-model:value="queryForm.enabledFlag" placeholder="请选择状态" allowClear>
<a-select-option :key="1"> 开启 </a-select-option>
<a-select-option :key="0"> 停止 </a-select-option>
</a-select>
</a-form-item>
<a-table
:scroll="{ x: 1800 }"
size="small"
:loading="tableLoading"
bordered
:dataSource="tableData"
:columns="columns"
rowKey="jobId"
:pagination="false"
>
<template #bodyCell="{ record, column }">
<template v-if="column.dataIndex === 'jobClass'">
<a-tooltip>
<template #title>{{ record.jobClass }}</template>
{{ handleJobClass(record.jobClass) }}
</a-tooltip>
</template>
<template v-if="column.dataIndex === 'triggerType'">
<a-tag v-if="record.triggerType === TRIGGER_TYPE_ENUM.CRON.value" color="success">{{ record.triggerTypeDesc }}</a-tag>
<a-tag v-else-if="record.triggerType === TRIGGER_TYPE_ENUM.FIXED_DELAY.value" color="processing">{{ record.triggerTypeDesc }}</a-tag>
<a-tag v-else color="pink">{{ record.triggerTypeDesc }}</a-tag>
</template>
<template v-if="column.dataIndex === 'lastJob'">
<div v-if="record.lastJobLog">
<a-tooltip>
<template #title>{{ handleExecuteResult(record.lastJobLog.executeResult) }}</template>
<CheckOutlined v-if="record.lastJobLog.successFlag" style="color: #39c710" />
<WarningOutlined v-else style="color: #f50" />
{{ record.lastJobLog.executeStartTime }}
</a-tooltip>
<a-form-item class="smart-query-form-item smart-margin-left10">
<a-button-group>
<a-button type="primary" @click="onSearch" v-privilege="'support:job:query'">
<template #icon>
<ReloadOutlined />
</template>
查询
</a-button>
<a-button @click="resetQuery" v-privilege="'support:job:query'">
<template #icon>
<SearchOutlined />
</template>
重置
</a-button>
</a-button-group>
<a-button class="smart-margin-left20" type="primary" @click="openUpdateModal()" v-privilege="'support:job:add'">
<template #icon>
<plus-outlined />
</template>
添加任务
</a-button>
</a-form-item>
</a-row>
</a-form>
<a-flex align="end" vertical>
<div class="smart-table-setting-block smart-margin-bottom10">
<TableOperator
class="smart-margin-bottom5 pull-right"
v-model="columns"
:tableId="TABLE_ID_CONST.SUPPORT.JOB"
:refresh="queryJobList"
/>
</div>
</template>
<template v-if="column.dataIndex === 'nextJob'">
<a-tooltip v-if="record.enabledFlag && record.nextJobExecuteTimeList">
<template #title>
<div>下次执行(预估时间)</div>
<div v-for="item in record.nextJobExecuteTimeList" :key="item">{{ item }}</div>
</a-flex>
<a-table
:scroll="{ x: 1800 }"
size="small"
:loading="tableLoading"
bordered
:dataSource="tableData"
:columns="columns"
rowKey="jobId"
:pagination="false"
>
<template #bodyCell="{ record, column }">
<template v-if="column.dataIndex === 'jobClass'">
<a-tooltip>
<template #title>{{ record.jobClass }}</template>
{{ handleJobClass(record.jobClass) }}
</a-tooltip>
</template>
{{ record.nextJobExecuteTimeList[0] }}
</a-tooltip>
</template>
<template v-if="column.dataIndex === 'enabledFlag'">
<a-switch
v-model:checked="record.enabledFlag"
@change="(checked) => handleEnabledUpdate(checked, record)"
:loading="record.enabledLoading"
<template v-if="column.dataIndex === 'triggerType'">
<a-tag v-if="record.triggerType === TRIGGER_TYPE_ENUM.CRON.value" color="success">{{ record.triggerTypeDesc }}</a-tag>
<a-tag v-else-if="record.triggerType === TRIGGER_TYPE_ENUM.FIXED_DELAY.value" color="processing">{{ record.triggerTypeDesc }}</a-tag>
<a-tag v-else color="pink">{{ record.triggerTypeDesc }}</a-tag>
</template>
<template v-if="column.dataIndex === 'lastJob'">
<div v-if="record.lastJobLog">
<a-tooltip>
<template #title>{{ handleExecuteResult(record.lastJobLog.executeResult) }}</template>
<CheckOutlined v-if="record.lastJobLog.successFlag" style="color: #39c710" />
<WarningOutlined v-else style="color: #f50" />
{{ record.lastJobLog.executeStartTime }}
</a-tooltip>
</div>
</template>
<template v-if="column.dataIndex === 'nextJob'">
<a-tooltip v-if="record.enabledFlag && record.nextJobExecuteTimeList">
<template #title>
<div>下次执行(预估时间)</div>
<div v-for="item in record.nextJobExecuteTimeList" :key="item">{{ item }}</div>
</template>
{{ record.nextJobExecuteTimeList[0] }}
</a-tooltip>
</template>
<template v-if="column.dataIndex === 'enabledFlag'">
<a-switch
v-model:checked="record.enabledFlag"
checked-children="已启用" un-checked-children="已禁用"
@change="(checked) => handleEnabledUpdate(checked, record)"
:loading="record.enabledLoading"
/>
</template>
<template v-if="column.dataIndex === 'action'">
<div class="smart-table-operate">
<a-button v-privilege="'support:job:update'" @click="openUpdateModal(record)" type="link">编辑</a-button>
<a-button v-privilege="'support:job:execute'" type="link" @click="openExecuteModal(record)">执行</a-button>
<a-button v-privilege="'support:job:log:query'" @click="openJobLogModal(record.jobId, record.jobName)" type="link">记录</a-button>
<a-button danger v-privilege="'support:job:log:delete'" @click="confirmDelete(record.jobId, record.jobName)" type="link">删除</a-button>
</div>
</template>
</template>
</a-table>
<div class="smart-query-table-page">
<a-pagination
showSizeChanger
showQuickJumper
show-less-items
:pageSizeOptions="PAGE_SIZE_OPTIONS"
:defaultPageSize="queryForm.pageSize"
v-model:current="queryForm.pageNum"
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="queryJobList"
@showSizeChange="queryJobList"
:show-total="(total) => `${total}`"
/>
</template>
<template v-if="column.dataIndex === 'action'">
<div class="smart-table-operate">
<a-button v-privilege="'support:job:update'" @click="openUpdateModal(record)" type="link">编辑</a-button>
<a-button v-privilege="'support:job:execute'" type="link" @click="openExecuteModal(record)">执行</a-button>
<a-button v-privilege="'support:job:log:query'" @click="openJobLogModal(record.jobId, record.jobName)" type="link">记录</a-button>
</div>
</template>
</template>
</a-table>
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="已删除任务"><DeletedJobList /></a-tab-pane>
</a-tabs>
<div class="smart-query-table-page">
<a-pagination
showSizeChanger
showQuickJumper
show-less-items
:pageSizeOptions="PAGE_SIZE_OPTIONS"
:defaultPageSize="queryForm.pageSize"
v-model:current="queryForm.pageNum"
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="queryJobList"
@showSizeChange="queryJobList"
:show-total="(total) => `${total}`"
/>
</div>
</a-card>
<!-- 表单操作 -->
@@ -131,17 +152,18 @@
</div>
</template>
<script setup>
import { message } from 'ant-design-vue';
import {message, Modal} from 'ant-design-vue';
import { onMounted, reactive, ref } from 'vue';
import { jobApi } from '/@/api/support/job-api';
import { PAGE_SIZE_OPTIONS } from '/@/constants/common-const';
import { smartSentry } from '/@/lib/smart-sentry';
import TableOperator from '/@/components/support/table-operator/index.vue';
import { TABLE_ID_CONST } from '/@/constants/support/table-id-const';
import { useRouter } from 'vue-router';
import DeletedJobList from './components/deleted-job-list.vue';
import { TRIGGER_TYPE_ENUM } from '/@/constants/support/job-const.js';
import JobFormModal from './components/job-form-modal.vue';
import JobLogListModal from './components/job-log-list-modal.vue';
import {SmartLoading} from "/@/components/framework/smart-loading/index.js";
const columns = ref([
{
@@ -182,9 +204,9 @@
dataIndex: 'nextJob',
},
{
title: '状态',
title: '启用状态',
dataIndex: 'enabledFlag',
width: 80,
width: 100,
},
{
title: '执行参数',
@@ -215,7 +237,7 @@
title: '操作',
dataIndex: 'action',
fixed: 'right',
width: 130,
width: 170,
},
]);
@@ -225,6 +247,7 @@
searchWord: '',
enabledFlag: null,
triggerType: null,
deletedFlag: false,
pageNum: 1,
pageSize: 10,
};
@@ -249,7 +272,7 @@
return jobClass.split('.').pop();
}
// 上次处理结果展示 最多展示300
// 上次处理结果展示
function handleExecuteResult(result) {
let num = 400;
return result ? result.substring(0, num) + (result.length > num ? ' ...' : '') : '';
@@ -308,6 +331,35 @@
jobLogModal.value.show(jobId, name);
}
// ------------------------------------ 删除操作 -------------------------------------
function confirmDelete(jobId, jobName){
Modal.confirm({
title: '警告',
content: `确定要删除【${jobName}】任务吗?`,
okText: '删除',
okType: 'danger',
onOk() {
deleteJob(jobId);
},
cancelText: '取消',
onCancel() {},
});
}
async function deleteJob(jobId){
try{
SmartLoading.show();
await jobApi.deleteJob(jobId);
message.success('删除成功!');
queryJobList();
}catch (e){
smartSentry.captureError(e);
}finally {
SmartLoading.hide();
}
}
// ------------------------------------ 表单操作 -------------------------------------
const jobFormModal = ref();

View File

@@ -57,10 +57,10 @@
<a-form-item v-if="form.menuType === MENU_TYPE_ENUM.MENU.value" label="是否外链" name="frameFlag">
<a-switch v-model:checked="form.frameFlag" checked-children="是外链" un-checked-children="不是外链" />
</a-form-item>
<a-form-item label="显示状态" name="frameFlag">
<a-form-item label="显示状态" name="visibleFlag">
<a-switch v-model:checked="form.visibleFlag" checked-children="显示" un-checked-children="不显示" />
</a-form-item>
<a-form-item label="禁用状态" name="frameFlag">
<a-form-item label="禁用状态" name="disabledFlag">
<a-switch v-model:checked="form.disabledFlag" :checkedValue="false" :unCheckedValue="true" checked-children="启用" un-checked-children="禁用" />
</a-form-item>
</template>
@@ -73,7 +73,7 @@
<a-form-item label="功能点关联菜单">
<MenuTreeSelect ref="contextMenuTreeSelect" v-model:value="form.contextMenuId" />
</a-form-item>
<a-form-item label="功能点状态" name="frameFlag">
<a-form-item label="功能点状态" name="funcDisabledFlag">
<a-switch v-model:checked="form.disabledFlag" :checkedValue="false" :unCheckedValue="true" checked-children="启用" un-checked-children="禁用" />
</a-form-item>
<a-form-item label="权限类型" name="permsType">