Commit 8fda06df authored by baiyinhao's avatar baiyinhao

修改提出的问题

parent e468e745
...@@ -223,7 +223,7 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -223,7 +223,7 @@ export const searchFormSchema: FormSchema[] = [
export const searchFormSchematab2: FormSchema[] = [ export const searchFormSchematab2: FormSchema[] = [
{ {
field: 'search', field: 'search',
label: ' ', label: '',
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '搜索', placeholder: '搜索',
......
<template> <template>
<div> <div>
<tabs v-model:value="activeKey" @change="handleTabChange"> <tabs v-model:value="activeKey" @change="handleTabChange" style="margin-left: 2%">
<Tabs.TabPane key="1" tab=" 用户操作记录"> <Tabs.TabPane key="1" tab=" 用户操作记录">
<BasicTable @register="registerTable" class="p-2"> <BasicTable @register="registerTable" class="p-2">
<template #toolbar> <template #toolbar>
<!-- <a-button type="primary" @click="handleCreate"> 新增角色 </a-button> --> <!-- <a-button type="primary" @click="handleCreate"> 新增角色 </a-button> -->
<a-button type="primary" @click="handleExport"> 日志下载 </a-button> <a-button type="primary" @click="handleExport"> 日志下载 </a-button>
<a-button type="primary"> 日志清理配置 </a-button> <a-button type="primary" @click="handleExportClear"> 日志清理配置 </a-button>
</template> </template>
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
<TableAction <TableAction
:actions="[ :actions="[
// {
// icon: 'clarity:note-edit-line',
// // label: '编22222222222辑',
// onClick: handleEdit.bind(null, record),
// },
{ {
icon: 'clarity:note-edit-line', icon: 'clarity:search-line',
// label: '编22222222222辑', label: '查看详情',
onClick: handleEdit.bind(null, record), onClick: handleView.bind(null, record),
}, },
{ {
icon: 'ant-design:delete-outlined', icon: 'ant-design:delete-outlined',
...@@ -94,7 +99,7 @@ ...@@ -94,7 +99,7 @@
import AudiModalEmail from './audiModalEmail.vue'; import AudiModalEmail from './audiModalEmail.vue';
import { useModal } from '@/components/Modal'; import { useModal } from '@/components/Modal';
import { getMenuListByPage } from '@/api/system/menu/menu'; import { getMenuListByPage } from '@/api/system/menu/menu';
import { Tabs, Descriptions, Alert } from 'ant-design-vue'; import { Tabs, Descriptions, Alert, Modal, message } from 'ant-design-vue';
import { tableListtab1, tableListtab2 } from './mock'; import { tableListtab1, tableListtab2 } from './mock';
defineOptions({ name: 'RoleManagement' }); defineOptions({ name: 'RoleManagement' });
...@@ -135,7 +140,7 @@ ...@@ -135,7 +140,7 @@
bordered: true, bordered: true,
showIndexColumn: false, showIndexColumn: false,
actionColumn: { actionColumn: {
width: 50, width: 100,
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
// slots: { customRender: 'action' }, // slots: { customRender: 'action' },
...@@ -166,7 +171,7 @@ ...@@ -166,7 +171,7 @@
}, },
formConfig: { formConfig: {
labelWidth: 80, labelWidth: 80,
schemas: searchFormSchema, schemas: searchFormSchematab2,
autoSubmitOnEnter: true, autoSubmitOnEnter: true,
}, },
useSearchForm: true, useSearchForm: true,
...@@ -201,7 +206,19 @@ ...@@ -201,7 +206,19 @@
const data = await exportRoleList(params); const data = await exportRoleList(params);
downloadByData(data, '操作记录' + '.xlsx'); downloadByData(data, '操作记录' + '.xlsx');
} }
/** 日志清理配置按钮*/
async function handleExportClear() {
Modal.confirm({
title: '日志清理',
content: '是否清理日志?',
okText: '确认',
cancelText: '取消',
onOk: () => {
console.log('日志清理');
message.success('清理成功');
},
});
}
/** tab2导出按钮*/ /** tab2导出按钮*/
async function handleExporttab2() { async function handleExporttab2() {
console.log('导出----'); console.log('导出----');
...@@ -217,6 +234,20 @@ ...@@ -217,6 +234,20 @@
}); });
} }
/**查看详情按钮*/
function handleView() {
Modal.confirm({
title: '跳转到详情页面',
content: '是否查看详情?',
okText: '确认',
cancelText: '取消',
onOk: () => {
console.log('查看详情');
message.success('查看成功');
},
});
}
/**数据权限按钮*/ /**数据权限按钮*/
function dataPermiss(record: Recordable) { function dataPermiss(record: Recordable) {
openModal(true, { openModal(true, {
...@@ -247,32 +278,42 @@ ...@@ -247,32 +278,42 @@
} }
/**批量删除*/ /**批量删除*/
function handleDeleteBatch() { function handleDeleteBatch() {
const rowSelection = getRowSelection().selectedRowKeys; Modal.confirm({
for (let i = 0; i < rowSelection.length; i++) { title: '确认删除',
tableData.value.splice( content: '是否删除选中的记录?',
tableData.value.findIndex((item) => item.businessId === rowSelection[i]), onOk: () => {
1, const rowSelection = getRowSelection().selectedRowKeys;
); for (let i = 0; i < rowSelection.length; i++) {
} tableData.value.splice(
rowSelection.length = 0; tableData.value.findIndex((item) => item.businessId === rowSelection[i]),
createMessage.success('删除成功!'); 1,
reload(); );
}
rowSelection.length = 0;
createMessage.success('删除成功!');
reload();
},
});
} }
/**批量删除tab2*/ /**批量删除tab2*/
function handleDeleteBatch2() { function handleDeleteBatch2() {
const rowSelection = getRowSelection2().selectedRowKeys; Modal.confirm({
for (let i = 0; i < rowSelection.length; i++) { title: '确认删除',
tableDatatab2.value.splice( content: '是否删除选中的记录?',
tableDatatab2.value.findIndex((item) => item.businessId === rowSelection[i]), onOk: () => {
1, const rowSelection = getRowSelection2().selectedRowKeys;
); for (let i = 0; i < rowSelection.length; i++) {
} tableDatatab2.value.splice(
createMessage.success('删除成功!'); tableDatatab2.value.findIndex((item) => item.businessId === rowSelection[i]),
rowSelection.length = 0; 1,
reload2(); );
}
createMessage.success('删除成功!');
rowSelection.length = 0;
reload2();
},
});
} }
function handleSuccess() { function handleSuccess() {
reload(); reload();
} }
......
<template> <template>
<div> <div>
<tabs v-model:value="activeKey" @change="handleTabChange"> <tabs v-model:value="activeKey" @change="handleTabChange" style="margin-left: 2%">
<Tabs.TabPane key="1" tab=" 通知记录"> <Tabs.TabPane key="1" tab=" 通知记录">
<BasicTable @register="registerTable" class="p-2"> <BasicTable @register="registerTable" class="p-2">
<template #toolbar> <template #toolbar>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<!-- <a-button type="primary" @click="handleCreate"> 新增角色 </a-button> <!-- <a-button type="primary" @click="handleCreate"> 新增角色 </a-button>
<a-button type="primary" @click="handleExport"> 导出 </a-button> --> <a-button type="primary" @click="handleExport"> 导出 </a-button> -->
<Alert message="请先配置用于发送告警通知的邮箱/短信" show-icon type="warning" /> <Alert message="请先配置用于发送告警通知的邮箱/短信" show-icon type="warning" />
<a-button type="primary" @click="handleCreate"> 新建通知规则(配置完成后显示)</a-button> <a-button type="primary" @click="handleCreate"> 新建通知规则</a-button>
<a-button type="primary" @click="handleEmail"> 邮箱/短信配置</a-button> <a-button type="primary" @click="handleEmail"> 邮箱/短信配置</a-button>
<a-button type="error" @click="handleDeleteBatch2"> 删除选中的规则 </a-button> <a-button type="error" @click="handleDeleteBatch2"> 删除选中的规则 </a-button>
</template> </template>
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
import notiModalEmail from './notiModalEmail.vue'; import notiModalEmail from './notiModalEmail.vue';
import { useModal } from '@/components/Modal'; import { useModal } from '@/components/Modal';
import { getMenuListByPage } from '@/api/system/menu/menu'; import { getMenuListByPage } from '@/api/system/menu/menu';
import { Tabs, Descriptions, Alert } from 'ant-design-vue'; import { Tabs, Descriptions, Alert, Popconfirm, message, Modal } from 'ant-design-vue';
import { tableListtab1, tableListtab2 } from './mock'; import { tableListtab1, tableListtab2 } from './mock';
import page from '@/router/routes/modules/demo/page'; import page from '@/router/routes/modules/demo/page';
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
}, },
formConfig: { formConfig: {
labelWidth: 10, labelWidth: 10,
schemas: searchFormSchema, schemas: searchFormSchematab2,
autoSubmitOnEnter: true, autoSubmitOnEnter: true,
}, },
useSearchForm: true, useSearchForm: true,
...@@ -225,28 +225,42 @@ ...@@ -225,28 +225,42 @@
/**批量删除*/ /**批量删除*/
function handleDeleteBatch() { function handleDeleteBatch() {
const rowSelection = getRowSelection().selectedRowKeys; Modal.confirm({
for (let i = 0; i < rowSelection.length; i++) { title: '确认删除',
tableData.value.splice( content: '是否删除选中的记录?',
tableData.value.findIndex((item) => item.businessId === rowSelection[i]), onOk: () => {
1, const rowSelection = getRowSelection().selectedRowKeys;
); for (let i = 0; i < rowSelection.length; i++) {
} tableData.value.splice(
createMessage.success('删除成功!'); tableData.value.findIndex((item) => item.businessId === rowSelection[i]),
reload(); 1,
);
}
rowSelection.length = 0;
createMessage.success('删除成功!');
reload();
},
});
} }
/**批量删除tab2*/ /**批量删除tab2*/
function handleDeleteBatch2() { function handleDeleteBatch2() {
const rowSelection = getRowSelection2().selectedRowKeys; Modal.confirm({
for (let i = 0; i < rowSelection.length; i++) { title: '确认删除',
tableDatatab2.value.splice( content: '是否删除选中的记录?',
tableDatatab2.value.findIndex((item) => item.businessId === rowSelection[i]), onOk: () => {
1, const rowSelection = getRowSelection2().selectedRowKeys;
); for (let i = 0; i < rowSelection.length; i++) {
} tableDatatab2.value.splice(
createMessage.success('删除成功!'); tableDatatab2.value.findIndex((item) => item.businessId === rowSelection[i]),
reload2(); 1,
);
}
rowSelection.length = 0;
createMessage.success('删除成功!');
reload2();
},
});
} }
/** 删除按钮*/ /** 删除按钮*/
......
...@@ -5,6 +5,8 @@ export const tableListtab1: any[] = [ ...@@ -5,6 +5,8 @@ export const tableListtab1: any[] = [
alarmLevel: '紧急', alarmLevel: '紧急',
resourceType: '资源类型1', resourceType: '资源类型1',
triggerType: '触发方式1', triggerType: '触发方式1',
businessId: 401,
institutionId: null,
}, },
{ {
createDate: '2024-10-24 10:04:04', createDate: '2024-10-24 10:04:04',
...@@ -12,6 +14,8 @@ export const tableListtab1: any[] = [ ...@@ -12,6 +14,8 @@ export const tableListtab1: any[] = [
alarmLevel: '紧急', alarmLevel: '紧急',
resourceType: '资源类型1', resourceType: '资源类型1',
triggerType: '触发方式1', triggerType: '触发方式1',
businessId: 402,
institutionId: null,
}, },
{ {
createDate: '2024-10-24 10:04:04', createDate: '2024-10-24 10:04:04',
...@@ -19,6 +23,8 @@ export const tableListtab1: any[] = [ ...@@ -19,6 +23,8 @@ export const tableListtab1: any[] = [
alarmLevel: '紧急', alarmLevel: '紧急',
resourceType: '资源类型2', resourceType: '资源类型2',
triggerType: '触发方式1', triggerType: '触发方式1',
businessId: 403,
institutionId: null,
}, },
{ {
createDate: '2024-10-24 10:04:04', createDate: '2024-10-24 10:04:04',
...@@ -26,6 +32,8 @@ export const tableListtab1: any[] = [ ...@@ -26,6 +32,8 @@ export const tableListtab1: any[] = [
alarmLevel: '紧急', alarmLevel: '紧急',
resourceType: '资源类型2', resourceType: '资源类型2',
triggerType: '触发方式1', triggerType: '触发方式1',
businessId: 404,
institutionId: null,
}, },
{ {
createDate: '2024-10-24 10:04:04', createDate: '2024-10-24 10:04:04',
...@@ -33,6 +41,8 @@ export const tableListtab1: any[] = [ ...@@ -33,6 +41,8 @@ export const tableListtab1: any[] = [
alarmLevel: '紧急', alarmLevel: '紧急',
resourceType: '资源类型1', resourceType: '资源类型1',
triggerType: '触发方式3', triggerType: '触发方式3',
businessId: 405,
institutionId: null,
}, },
]; ];
export const tableListtab2: any[] = [ export const tableListtab2: any[] = [
...@@ -41,29 +51,39 @@ export const tableListtab2: any[] = [ ...@@ -41,29 +51,39 @@ export const tableListtab2: any[] = [
resourceType: '资源类型1', resourceType: '资源类型1',
alarmLevel: '紧急', alarmLevel: '紧急',
status: '状态1', status: '状态1',
businessId: 401,
institutionId: null,
}, },
{ {
alarmRuleName: '元数据变更', alarmRuleName: '元数据变更',
resourceType: '资源类型1', resourceType: '资源类型1',
alarmLevel: '紧急', alarmLevel: '紧急',
status: '状态2', status: '状态2',
businessId: 402,
institutionId: null,
}, },
{ {
alarmRuleName: '元数据变更', alarmRuleName: '元数据变更',
resourceType: '资源类型1', resourceType: '资源类型1',
alarmLevel: '紧急', alarmLevel: '紧急',
status: '状态3', status: '状态3',
businessId: 403,
institutionId: null,
}, },
{ {
alarmRuleName: '元数据变更', alarmRuleName: '元数据变更',
resourceType: '资源类型1', resourceType: '资源类型1',
alarmLevel: '紧急', alarmLevel: '紧急',
status: '状态4', status: '状态4',
businessId: 404,
institutionId: null,
}, },
{ {
alarmRuleName: '元数据变更', alarmRuleName: '元数据变更',
resourceType: '资源类型1', resourceType: '资源类型1',
alarmLevel: '紧急', alarmLevel: '紧急',
status: '状态5', status: '状态5',
businessId: 405,
institutionId: null,
}, },
]; ];
...@@ -67,11 +67,15 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -67,11 +67,15 @@ export const searchFormSchema: FormSchema[] = [
colProps: { span: 4 }, colProps: { span: 4 },
}, },
{ {
field: 'alarmRule1', field: 'alarmScope',
label: ' ', label: ' ',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: [{ label: '全部通知规则', value: '1' }], options: [
{ label: '全部通知', value: '1' },
{ label: '通知范围1', value: '2' },
{ label: '通知范围2', value: '3' },
],
placeholder: '请选择通知规则范围', placeholder: '请选择通知规则范围',
defaultValue: '1', defaultValue: '1',
}, },
...@@ -128,41 +132,41 @@ export const searchFormSchematab2: FormSchema[] = [ ...@@ -128,41 +132,41 @@ export const searchFormSchematab2: FormSchema[] = [
colProps: { span: 4 }, colProps: { span: 4 },
}, },
{ {
field: 'alarmRule', field: 'resourceType',
label: ' ', label: ' ',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: [ options: [
{ label: '元数据变更', value: '元数据变更' }, { label: '资源类型1', value: '资源类型1' },
{ label: '元数据处理', value: '元数据处理' }, { label: '资源类型2', value: '资源类型2' },
], ],
placeholder: '请选择通知规则', placeholder: '请选择资源类型',
}, },
colProps: { span: 4 }, colProps: { span: 4 },
}, },
{ {
field: 'resourceType', field: 'alarmLevel',
label: ' ', label: ' ',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: [ options: [
{ label: '资源类型1', value: '资源类型1' }, { label: '紧急', value: '紧急' },
{ label: '资源类型2', value: '资源类型2' }, { label: '不紧急', value: '不紧急' },
], ],
placeholder: '请选择资源类型', placeholder: '请选择紧急程度',
}, },
colProps: { span: 4 }, colProps: { span: 4 },
}, },
{ {
field: 'alarmLevel', field: 'status',
label: ' ', label: ' ',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: [ options: [
{ label: '紧急', value: '紧急' }, { label: '状态1', value: '状态1' },
{ label: '不紧急', value: '不紧急' }, { label: '状态2', value: '状态2' },
], ],
placeholder: '请选择紧急程度', placeholder: '请选择状态',
}, },
colProps: { span: 4 }, colProps: { span: 4 },
}, },
...@@ -230,6 +234,12 @@ export const formSchema: FormSchema[] = [ ...@@ -230,6 +234,12 @@ export const formSchema: FormSchema[] = [
{ label: '元数据处理', value: '2' }, { label: '元数据处理', value: '2' },
], ],
}, },
rules: [
{
required: true,
message: '请选择触发方式',
},
],
}, },
{ {
field: 'alarmType', field: 'alarmType',
...@@ -241,6 +251,12 @@ export const formSchema: FormSchema[] = [ ...@@ -241,6 +251,12 @@ export const formSchema: FormSchema[] = [
{ label: '元数据处理', value: '2' }, { label: '元数据处理', value: '2' },
], ],
}, },
rules: [
{
required: true,
message: '请选择通知方式',
},
],
}, },
{ {
field: 'alarmLevel', field: 'alarmLevel',
...@@ -252,5 +268,11 @@ export const formSchema: FormSchema[] = [ ...@@ -252,5 +268,11 @@ export const formSchema: FormSchema[] = [
{ label: '不紧急', value: '2' }, { label: '不紧急', value: '2' },
], ],
}, },
rules: [
{
required: true,
message: '请选择紧急程度',
},
],
}, },
]; ];
...@@ -134,15 +134,16 @@ export const ModelFormSchema: FormSchema[] = [ ...@@ -134,15 +134,16 @@ export const ModelFormSchema: FormSchema[] = [
disabled: false, disabled: false,
}, },
}, },
{ // 未解决问题:无法把按钮添加到表单已有的按钮中
field: 'testLink', // {
label: '测试链接', // field: 'testLink',
component: 'Button', // label: '测试链接',
componentProps: { // component: 'Button',
type: 'primary', // componentProps: {
title: '测试链接', // type: 'primary',
}, // title: '测试链接',
}, // },
// },
]; ];
export const ModelFormSchema2: FormSchema[] = [ export const ModelFormSchema2: FormSchema[] = [
// 未解决问题:原型文件没有短信配置页面截图!! // 未解决问题:原型文件没有短信配置页面截图!!
...@@ -163,6 +164,92 @@ export const ModelFormSchema2: FormSchema[] = [ ...@@ -163,6 +164,92 @@ export const ModelFormSchema2: FormSchema[] = [
}, },
], ],
}, },
{
field: 'hostName',
label: '主机名',
component: 'Input',
rules: [
{
required: true,
message: '请输入主机名',
},
],
componentProps: {
disabled: false,
},
},
{
field: 'port',
label: '端口',
component: 'InputNumber',
rules: [
{
required: true,
message: '请输入端口号',
},
],
componentProps: {
disabled: false,
},
},
{
field: 'Username',
label: '用户名',
component: 'Input',
rules: [
{
required: true,
message: '请输入用户名',
},
],
componentProps: {
disabled: false,
},
},
{
field: 'password',
label: '密码',
component: 'InputPassword',
rules: [
{
required: true,
message: '请输入密码',
},
],
componentProps: {
disabled: false,
},
},
{
field: 'url',
label: 'url地址',
component: 'Input',
componentProps: {
disabled: false,
},
rules: [
{
required: true,
message: '请输入url地址',
},
],
},
{
field: 'linkTimeOut',
label: '链接超时',
component: 'Input',
componentProps: {
disabled: false,
},
},
{
field: 'TLS',
label: 'TLS',
component: 'Checkbox',
componentProps: {
disabled: false,
},
},
{ {
field: 'textContent', field: 'textContent',
label: '短信内容', label: '短信内容',
...@@ -177,4 +264,14 @@ export const ModelFormSchema2: FormSchema[] = [ ...@@ -177,4 +264,14 @@ export const ModelFormSchema2: FormSchema[] = [
}, },
], ],
}, },
// 未解决问题:无法把按钮添加到表单已有的按钮中
// {
// field: 'testLink',
// label: '测试链接',
// component: 'Button',
// componentProps: {
// type: 'primary',
// title: '测试链接',
// },
// },
]; ];
<template> <template>
<div> <div>
<tabs v-model:value="activeKey" @change="handleTabChange"> <tabs v-model:value="activeKey" @change="handleTabChange" style="margin-left: 2%">
<Tabs.TabPane key="1" tab="我的待办事项"> <Tabs.TabPane key="1" tab="我的待办事项">
<BasicTable @register="registerTable" class="p-2"> <BasicTable @register="registerTable" class="p-2">
<!-- <template #toolbar> <!-- <template #toolbar>
...@@ -12,14 +12,9 @@ ...@@ -12,14 +12,9 @@
<TableAction <TableAction
:actions="[ :actions="[
{ {
// icon: 'ant-design:delete-outlined', icon: 'clarity:note-edit-line',
label: '删除', label: '审批',
color: 'error', onClick: handleEdit.bind(null, record),
popConfirm: {
title: '是否确认删除',
placement: 'left',
confirm: handleDelete.bind(null, record),
},
}, },
]" ]"
/> />
...@@ -42,9 +37,9 @@ ...@@ -42,9 +37,9 @@
<TableAction <TableAction
:actions="[ :actions="[
{ {
icon: 'clarity:note-edit-line', icon: 'clarity:search-line',
// label: '编辑', label: '查看详情',
onClick: handleEdit.bind(null, record), onClick: handleView.bind(null, record),
}, },
// { // {
// // icon: 'clarity:note-edit-line', // // icon: 'clarity:note-edit-line',
...@@ -82,9 +77,9 @@ ...@@ -82,9 +77,9 @@
<TableAction <TableAction
:actions="[ :actions="[
{ {
icon: 'clarity:note-edit-line', icon: 'clarity:search-line',
// label: '编辑', label: '查看详情',
onClick: handleEdit.bind(null, record), onClick: handleView.bind(null, record),
}, },
// { // {
// // icon: 'clarity:note-edit-line', // // icon: 'clarity:note-edit-line',
...@@ -136,7 +131,7 @@ ...@@ -136,7 +131,7 @@
import ProcenterModalEmail from './processCenterModalEmail.vue'; import ProcenterModalEmail from './processCenterModalEmail.vue';
import { useModal } from '@/components/Modal'; import { useModal } from '@/components/Modal';
import { getMenuListByPage } from '@/api/system/menu/menu'; import { getMenuListByPage } from '@/api/system/menu/menu';
import { Tabs, Descriptions, Alert } from 'ant-design-vue'; import { Tabs, Descriptions, Alert, Modal } from 'ant-design-vue';
import { tableListtab1, tableListtab2, tableListtab3 } from './mock'; import { tableListtab1, tableListtab2, tableListtab3 } from './mock';
defineOptions({ name: 'RoleManagement' }); defineOptions({ name: 'RoleManagement' });
...@@ -178,7 +173,7 @@ ...@@ -178,7 +173,7 @@
bordered: true, bordered: true,
showIndexColumn: false, showIndexColumn: false,
actionColumn: { actionColumn: {
width: 50, width: 70,
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
// slots: { customRender: 'action' }, // slots: { customRender: 'action' },
...@@ -216,13 +211,13 @@ ...@@ -216,13 +211,13 @@
showTableSetting: true, showTableSetting: true,
bordered: true, bordered: true,
showIndexColumn: false, showIndexColumn: false,
// actionColumn: { actionColumn: {
// width: 50, width: 70,
// title: '操作', title: '操作',
// dataIndex: 'action', dataIndex: 'action',
// // slots: { customRender: 'action' }, // slots: { customRender: 'action' },
// fixed: undefined, fixed: undefined,
// }, },
}); });
const [ const [
registerTable3, registerTable3,
...@@ -255,13 +250,13 @@ ...@@ -255,13 +250,13 @@
showTableSetting: true, showTableSetting: true,
bordered: true, bordered: true,
showIndexColumn: false, showIndexColumn: false,
// actionColumn: { actionColumn: {
// width: 50, width: 70,
// title: '操作', title: '操作',
// dataIndex: 'action', dataIndex: 'action',
// // slots: { customRender: 'action' }, // slots: { customRender: 'action' },
// fixed: undefined, fixed: undefined,
// }, },
}); });
/***新增规则按钮*/ /***新增规则按钮*/
function handleCreate() { function handleCreate() {
...@@ -298,14 +293,26 @@ ...@@ -298,14 +293,26 @@
const data = await exportRoleList(params); const data = await exportRoleList(params);
downloadByData(data, '角色列表' + '.xlsx'); downloadByData(data, '角色列表' + '.xlsx');
} }
/**编辑按钮*/ /**审批按钮*/
function handleEdit(record: Recordable) { function handleEdit(record: Recordable) {
openDrawer(true, { Modal.confirm({
record, title: '确认审批内容',
isUpdate: true, content: `${record.title}审批通过`,
okText: '确认',
cancelText: '取消',
}); });
} }
/**查看详情按钮*/
function handleView() {
Modal.confirm({
title: '跳转到详情页面',
content: '是否查看详情?',
okText: '确认',
cancelText: '取消',
onOk: () => {},
});
}
/**数据权限按钮*/ /**数据权限按钮*/
function dataPermiss(record: Recordable) { function dataPermiss(record: Recordable) {
openModal(true, { openModal(true, {
...@@ -346,28 +353,41 @@ ...@@ -346,28 +353,41 @@
} }
/**批量删除*/ /**批量删除*/
function handleDeleteBatch() { function handleDeleteBatch() {
const rowSelection = getRowSelection().selectedRowKeys; Modal.confirm({
for (let i = 0; i < rowSelection.length; i++) { title: '确认删除',
tableData.value.splice( content: '是否删除选中的记录?',
tableData.value.findIndex((item) => item.businessId === rowSelection[i]), onOk: () => {
1, const rowSelection = getRowSelection().selectedRowKeys;
); for (let i = 0; i < rowSelection.length; i++) {
} tableData.value.splice(
createMessage.success('删除成功!'); tableData.value.findIndex((item) => item.businessId === rowSelection[i]),
reload(); 1,
);
}
rowSelection.length = 0;
createMessage.success('删除成功!');
reload();
},
});
} }
/**批量删除tab2*/ /**批量删除tab2*/
function handleDeleteBatch2() { function handleDeleteBatch2() {
const rowSelection = getRowSelection2().selectedRowKeys; Modal.confirm({
for (let i = 0; i < rowSelection.length; i++) { title: '确认删除',
tableDatatab2.value.splice( content: '是否删除选中的记录?',
tableDatatab2.value.findIndex((item) => item.businessId === rowSelection[i]), onOk: () => {
1, const rowSelection = getRowSelection2().selectedRowKeys;
); for (let i = 0; i < rowSelection.length; i++) {
} tableDatatab2.value.splice(
createMessage.success('删除成功!'); tableDatatab2.value.findIndex((item) => item.businessId === rowSelection[i]),
reload2(); 1,
);
}
createMessage.success('删除成功!');
reload2();
},
});
} }
/**批量删除tab3*/ /**批量删除tab3*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment