Commit 9614b526 authored by baiyinhao's avatar baiyinhao

修改流程中心样式

parent 7a596ddd
...@@ -137,24 +137,41 @@ ...@@ -137,24 +137,41 @@
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 } from 'ant-design-vue';
import { tableListtab1, tableListtab2, tableListtab3 } from './mock';
defineOptions({ name: 'RoleManagement' }); defineOptions({ name: 'RoleManagement' });
const filterStore = useFilterStore(); const filterStore = useFilterStore();
const route = useRoute(); const route = useRoute();
const { createMessage } = useMessage(); const { createMessage } = useMessage();
const tableData = ref([]);
const tableDatatab2 = ref([]);
const tableDatatab3 = ref([]);
const [registerDrawer, { openDrawer }] = useDrawer(); const [registerDrawer, { openDrawer }] = useDrawer();
const [registerModal, { openModal }] = useModal(); const [registerModal, { openModal }] = useModal();
const [registerModalEmail, { openModal: openModalEmail }] = useModal(); const [registerModalEmail, { openModal: openModalEmail }] = useModal();
const [registerTable, { reload, getForm }] = useTable({ const [registerTable, { reload, getForm, getRowSelection }] = useTable({
title: '', title: '',
api: getRoleListByPage, api: async (params) => {
console.log('params', params);
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: tableListtab1.length,
code: '',
message: '',
data: tableListtab1,
};
return { ...response };
},
columns, columns,
rowSelection: { rowSelection: {
type: 'checkbox', type: 'checkbox',
}, },
formConfig: { formConfig: {
labelWidth: 120, labelWidth: 10,
schemas: searchFormSchema, schemas: searchFormSchema,
autoSubmitOnEnter: true,
}, },
useSearchForm: true, useSearchForm: true,
showTableSetting: true, showTableSetting: true,
...@@ -168,16 +185,32 @@ ...@@ -168,16 +185,32 @@
fixed: undefined, fixed: undefined,
}, },
}); });
const [registerTable2, { reload: reload2, getForm: getForm2 }] = useTable({ const [
registerTable2,
{ reload: reload2, getForm: getForm2, getRowSelection: getRowSelection2 },
] = useTable({
title: '', title: '',
api: getRoleListByPage, api: async (params) => {
console.log('params', params);
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: tableListtab2.length,
code: '',
message: '',
data: tableListtab2,
};
return { ...response };
},
columns: columnstab2, columns: columnstab2,
rowSelection: { rowSelection: {
type: 'checkbox', type: 'checkbox',
}, },
formConfig: { formConfig: {
labelWidth: 120, labelWidth: 10,
schemas: searchFormSchematab2, schemas: searchFormSchema,
autoSubmitOnEnter: true,
}, },
useSearchForm: true, useSearchForm: true,
showTableSetting: true, showTableSetting: true,
...@@ -191,16 +224,32 @@ ...@@ -191,16 +224,32 @@
// fixed: undefined, // fixed: undefined,
// }, // },
}); });
const [registerTable3, { reload: reload3, getForm: getForm3 }] = useTable({ const [
registerTable3,
{ reload: reload3, getForm: getForm3, getRowSelection: getRowSelection3 },
] = useTable({
title: '', title: '',
api: getRoleListByPage, api: async (params) => {
console.log('params', params);
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: tableListtab2.length,
code: '',
message: '',
data: tableListtab2,
};
return { ...response };
},
columns: columnstab3, columns: columnstab3,
rowSelection: { rowSelection: {
type: 'checkbox', type: 'checkbox',
}, },
formConfig: { formConfig: {
labelWidth: 120, labelWidth: 10,
schemas: searchFormSchematab3, schemas: searchFormSchema,
autoSubmitOnEnter: true,
}, },
useSearchForm: true, useSearchForm: true,
showTableSetting: true, showTableSetting: true,
...@@ -265,25 +314,75 @@ ...@@ -265,25 +314,75 @@
}); });
} }
/**删除按钮*/ /** 删除按钮*/
async function handleDelete(record: Recordable) { function handleDelete(record: Recordable) {
await deleteById(record.businessId); tableData.value.splice(
tableData.value.findIndex((item) => item.businessId === record.businessId),
1,
);
createMessage.success('删除成功!'); createMessage.success('删除成功!');
await reload(); reload();
} }
/**tab2删除按钮*/ /**tab2删除按钮*/
async function handleDeletetab2(record: Recordable) {
await deleteById(record.businessId); function handleDeletetab2(record: Recordable) {
tableDatatab2.value.splice(
tableDatatab2.value.findIndex((item) => item.businessId === record.businessId),
1,
);
createMessage.success('删除成功!'); createMessage.success('删除成功!');
await reload2(); reload2();
} }
/**tab3删除按钮*/ /**tab3删除按钮*/
async function handleDeletetab3(record: Recordable) {
await deleteById(record.businessId); function handleDeletetab3(record: Recordable) {
tableDatatab3.value.splice(
tableDatatab3.value.findIndex((item) => item.businessId === record.businessId),
1,
);
createMessage.success('删除成功!'); createMessage.success('删除成功!');
await reload3(); reload3();
} }
/**批量删除*/
function handleDeleteBatch() {
const rowSelection = getRowSelection().selectedRowKeys;
for (let i = 0; i < rowSelection.length; i++) {
tableData.value.splice(
tableData.value.findIndex((item) => item.businessId === rowSelection[i]),
1,
);
}
createMessage.success('删除成功!');
reload();
}
/**批量删除tab2*/
function handleDeleteBatch2() {
const rowSelection = getRowSelection2().selectedRowKeys;
for (let i = 0; i < rowSelection.length; i++) {
tableDatatab2.value.splice(
tableDatatab2.value.findIndex((item) => item.businessId === rowSelection[i]),
1,
);
}
createMessage.success('删除成功!');
reload2();
}
/**批量删除tab3*/
function handleDeleteBatch3() {
const rowSelection = getRowSelection3().selectedRowKeys;
for (let i = 0; i < rowSelection.length; i++) {
tableDatatab3.value.splice(
tableDatatab3.value.findIndex((item) => item.businessId === rowSelection[i]),
1,
);
}
createMessage.success('删除成功!');
reload3();
}
function handleSuccess() { function handleSuccess() {
reload(); reload();
} }
...@@ -297,6 +396,9 @@ ...@@ -297,6 +396,9 @@
/**进入页面的初始化方法 getForm2是给tab2用的*/ /**进入页面的初始化方法 getForm2是给tab2用的*/
onMounted(() => { onMounted(() => {
const path = route.path; const path = route.path;
tableData.value = tableListtab1;
tableDatatab2.value = tableListtab2;
tableDatatab3.value = tableListtab3;
if (filterStore.getSearchParams[path]) { if (filterStore.getSearchParams[path]) {
if (JSON.parse(filterStore.getSearchParams[path] !== {})) { if (JSON.parse(filterStore.getSearchParams[path] !== {})) {
const params = JSON.parse(filterStore.getSearchParams[path]); const params = JSON.parse(filterStore.getSearchParams[path]);
......
export const tableListtab1: any[] = [
{
title: '申请标题1',
reason: '申请理由1',
createBy: '申请人1',
deptName: '机构1',
type: '申请类型1',
createTime: '2024-10-25 18:04:05',
status: '状态1',
},
{
title: '申请标题1',
reason: '申请理由1',
createBy: '申请人1',
deptName: '机构1',
type: '申请类型1',
createTime: '2024-10-25 18:04:05',
status: '状态1',
},
{
title: '申请标题2',
reason: '申请理由1',
createBy: '申请人1',
deptName: '机构1',
type: '申请类型1',
createTime: '2024-10-25 18:04:05',
status: '状态1',
},
{
title: '申请标题1',
reason: '申请理由1',
createBy: '申请人1',
deptName: '机构2',
type: '申请类型1',
createTime: '2024-10-25 18:04:05',
status: '状态1',
},
{
title: '申请标题1',
reason: '申请理由1',
createBy: '申请人2',
deptName: '机构1',
type: '申请类型1',
createTime: '2024-10-25 18:04:05',
status: '状态1',
},
{
title: '申请标题1',
reason: '申请理由1',
createBy: '申请人1',
deptName: '机构1',
type: '申请类型1',
createTime: '2024-10-25 18:04:05',
status: '状态1',
},
];
export const tableListtab2: any[] = [
{
title: '申请标题1',
reason: '申请理由1',
createBy: '申请人1',
deptName: '机构1',
type: '申请类型1',
createTime: '2024-10-25 18:04:05',
status: '状态1',
},
{
title: '申请标题1',
reason: '申请理由1',
createBy: '申请人1',
deptName: '机构1',
type: '申请类型1',
createTime: '2024-10-25 18:04:05',
status: '状态1',
},
{
title: '申请标题2',
reason: '申请理由1',
createBy: '申请人1',
deptName: '机构1',
type: '申请类型1',
createTime: '2024-10-25 18:04:05',
status: '状态1',
},
{
title: '申请标题1',
reason: '申请理由1',
createBy: '申请人1',
deptName: '机构2',
type: '申请类型1',
createTime: '2024-10-25 18:04:05',
status: '状态1',
},
{
title: '申请标题1',
reason: '申请理由1',
createBy: '申请人2',
deptName: '机构1',
type: '申请类型1',
createTime: '2024-10-25 18:04:05',
status: '状态1',
},
{
title: '申请标题1',
reason: '申请理由1',
createBy: '申请人1',
deptName: '机构1',
type: '申请类型1',
createTime: '2024-10-25 18:04:05',
status: '状态1',
},
];
export const tableListtab3: any[] = [
{
title: '申请标题1',
reason: '申请理由1',
createBy: '申请人1',
deptName: '机构1',
type: '申请类型1',
createTime: '2024-10-25 18:04:05',
status: '状态1',
},
{
title: '申请标题1',
reason: '申请理由1',
createBy: '申请人1',
deptName: '机构1',
type: '申请类型1',
createTime: '2024-10-25 18:04:05',
status: '状态1',
},
{
title: '申请标题2',
reason: '申请理由1',
createBy: '申请人1',
deptName: '机构1',
type: '申请类型1',
createTime: '2024-10-25 18:04:05',
status: '状态1',
},
{
title: '申请标题1',
reason: '申请理由1',
createBy: '申请人1',
deptName: '机构2',
type: '申请类型1',
createTime: '2024-10-25 18:04:05',
status: '状态1',
},
{
title: '申请标题1',
reason: '申请理由1',
createBy: '申请人2',
deptName: '机构1',
type: '申请类型1',
createTime: '2024-10-25 18:04:05',
status: '状态1',
},
{
title: '申请标题1',
reason: '申请理由1',
createBy: '申请人1',
deptName: '机构1',
type: '申请类型1',
createTime: '2024-10-25 18:04:05',
status: '状态1',
},
];
...@@ -123,7 +123,7 @@ export const columnstab3: BasicColumn[] = [ ...@@ -123,7 +123,7 @@ export const columnstab3: BasicColumn[] = [
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
{ {
field: 'keyword', field: 'keyword',
label: '', label: ' ',
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '输入关键字搜索', placeholder: '输入关键字搜索',
...@@ -132,7 +132,7 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -132,7 +132,7 @@ export const searchFormSchema: FormSchema[] = [
}, },
{ {
field: 'type', field: 'type',
label: '', label: ' ',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: [ options: [
...@@ -145,7 +145,7 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -145,7 +145,7 @@ export const searchFormSchema: FormSchema[] = [
}, },
{ {
field: 'deptName', field: 'deptName',
label: '', label: ' ',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: [ options: [
...@@ -158,7 +158,7 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -158,7 +158,7 @@ export const searchFormSchema: FormSchema[] = [
}, },
{ {
field: 'status', field: 'status',
label: '', label: ' ',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: [ options: [
...@@ -173,7 +173,7 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -173,7 +173,7 @@ export const searchFormSchema: FormSchema[] = [
export const searchFormSchematab2: FormSchema[] = [ export const searchFormSchematab2: FormSchema[] = [
{ {
field: 'keyword', field: 'keyword',
label: '', label: ' ',
component: 'Input', component: 'Input',
componentProps: { componentProps: {
placeholder: '输入关键字搜索', placeholder: '输入关键字搜索',
...@@ -182,7 +182,7 @@ export const searchFormSchematab2: FormSchema[] = [ ...@@ -182,7 +182,7 @@ export const searchFormSchematab2: FormSchema[] = [
}, },
{ {
field: 'type', field: 'type',
label: '', label: ' ',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: [ options: [
...@@ -195,7 +195,7 @@ export const searchFormSchematab2: FormSchema[] = [ ...@@ -195,7 +195,7 @@ export const searchFormSchematab2: FormSchema[] = [
}, },
{ {
field: 'deptName', field: 'deptName',
label: '', label: ' ',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: [ options: [
...@@ -208,7 +208,7 @@ export const searchFormSchematab2: FormSchema[] = [ ...@@ -208,7 +208,7 @@ export const searchFormSchematab2: FormSchema[] = [
}, },
{ {
field: 'status', field: 'status',
label: '', label: ' ',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: [ options: [
...@@ -232,7 +232,7 @@ export const searchFormSchematab3: FormSchema[] = [ ...@@ -232,7 +232,7 @@ export const searchFormSchematab3: FormSchema[] = [
}, },
{ {
field: 'type', field: 'type',
label: '', label: ' ',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: [ options: [
...@@ -245,7 +245,7 @@ export const searchFormSchematab3: FormSchema[] = [ ...@@ -245,7 +245,7 @@ export const searchFormSchematab3: FormSchema[] = [
}, },
{ {
field: 'deptName', field: 'deptName',
label: '', label: ' ',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: [ options: [
...@@ -258,7 +258,7 @@ export const searchFormSchematab3: FormSchema[] = [ ...@@ -258,7 +258,7 @@ export const searchFormSchematab3: FormSchema[] = [
}, },
{ {
field: 'status', field: 'status',
label: '', label: ' ',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: [ options: [
......
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