This commit is contained in:
xixi 2024-05-22 16:18:38 +08:00
parent d5d4e1bae5
commit 8a9c5c7fba
4 changed files with 144 additions and 126 deletions

View File

@ -44,7 +44,7 @@ export default function ListProj() {
config: {
params: {
page: currentPage,
rows: 20,
rows: 10,
keywords: keywords,
projCategoryId: indexListContext.category,
status: indexListContext.status ? indexListContext.status : ''
@ -128,7 +128,7 @@ export default function ListProj() {
{renderList()}
</div>
<div className="page" >
<Pagination defaultCurrent={page} total={total} defaultPageSize={20} onChange={(page) => {
<Pagination defaultCurrent={page} total={total} defaultPageSize={10} onChange={(page) => {
reqData(page);
// setPage(page);
}} />

View File

@ -204,8 +204,8 @@ export default function Index() {
} else if (location.pathname.includes('/proj-create')) {
setNow('创建项目')
setPathArray([{ title: <Link to={'/home'}></Link> }, { title: '创建项目' }])
// /config-mod-list /config-menu-list
} else if (location.pathname.includes('/proj-edit')&& !location.pathname.includes('/config-mod-edit') && !location.pathname.includes('/step') && !location.pathname.includes('/config-loginpage')&& !location.pathname.includes('/config-mod-save')&& !location.pathname.includes('/config-mod-list')&& !location.pathname.includes('/config-menu-list')) {
// /config-mod-list /config-menu-list /config-mod-show
} else if (location.pathname.includes('/proj-edit')&& !location.pathname.includes('/config-mod-show')&& !location.pathname.includes('/config-mod-edit') && !location.pathname.includes('/step') && !location.pathname.includes('/config-loginpage')&& !location.pathname.includes('/config-mod-save')&& !location.pathname.includes('/config-mod-list')&& !location.pathname.includes('/config-menu-list')) {
setNow('编辑项目')
// setEditname(location.pathname)
setPathArray([{ title: <Link to={'/home'}></Link> }, { title: <Link to={'/proj-create'}></Link> }, { title: '编辑项目' }])
@ -251,6 +251,10 @@ export default function Index() {
}else if (location.pathname.includes('/proj-edit/config-mod-edit')) {
setNow('编辑菜单')
setPathArray([{ title: <Link to={'/home'}></Link> }, { title: <Link to={'/proj-create'}></Link> }, { title: <a onClick={() => { nav(-2) }}></a> },{ title: <a onClick={() => { nav(-1) }}></a> }, { title: '编辑菜单' }])
// /config-mod-edit /config-mod-show
}else if (location.pathname.includes('/proj-edit/config-mod-show')) {
setNow('查看菜单')
setPathArray([{ title: <Link to={'/home'}></Link> }, { title: <Link to={'/proj-create'}></Link> }, { title: <a onClick={() => { nav(-2) }}></a> },{ title: <a onClick={() => { nav(-1) }}></a> }, { title: '查看菜单' }])
// /config-mod-edit
}
}, [location.pathname])

View File

@ -1,13 +1,13 @@
import './proj-config-list-mod.css';
import {
Alert,
Breadcrumb, Button,
Button,
message,
Table, TableProps,
} from "antd";
import {Link, useNavigate, useParams} from "react-router-dom";
import { useNavigate, useParams } from "react-router-dom";
import { useEffect, useState } from "react";
import {EditOutlined, PlusOutlined, DeleteOutlined, SearchOutlined} from "@ant-design/icons";
import { EditOutlined, PlusOutlined, DeleteOutlined } from "@ant-design/icons";
import { del, get } from "../../../util/AjaxUtils.ts";
export const MAX_MOD_SIZE = 15;
@ -96,7 +96,18 @@ export default function ProjConfigModList(props: PropType) {
render: (_text, record) => {
return (
<>
{
<Button type="primary" size="small"
style={{ marginRight: '5px' }}
onClick={() => {
if (props.isFree) {
nav(`/proj-edit/config-mod-fedit/${pathParams.projId}/${record.projModId}`)
} else {
nav(`/proj-edit/config-mod-edit/${pathParams.projId}/${record.projModId}`)
}
}}>
<EditOutlined />
</Button>
{/* {
modSize < maxSize ? (
<Button type="primary" size="small"
style={{ marginRight: '5px' }}
@ -119,10 +130,10 @@ export default function ProjConfigModList(props: PropType) {
nav(`/proj-edit/config-mod-show/${pathParams.projId}/${record.projModId}`)
}
}}>
<SearchOutlined/>
<EditOutlined />
</Button>
)
}
} */}
<Button value="large" type="primary" size="small" danger
onClick={() => {

View File

@ -1,10 +1,10 @@
import './proj-config-list-mod.css';
import {
Alert,
Breadcrumb, Button, Col, Flex, Form, Input,
Button, Col, Flex, Form, Input,
message, Row,
} from "antd";
import {Link, useNavigate, useParams} from "react-router-dom";
import { useNavigate, useParams } from "react-router-dom";
import { useEffect, useState } from "react";
import ModField, { IModField } from "../../../components/modfield/ModField.tsx";
import { get } from "../../../util/AjaxUtils.ts";
@ -32,7 +32,7 @@ export default function ProjConfigModShow(props: PropsType) {
const minSize = props.isFree ? MIN_MOD_SIZE_FREE : MIN_MOD_SIZE;
const maxSize = props.isFree ? MAX_MOD_SIZE_FREE : MAX_MOD_SIZE;
const height = window.innerHeight - 180;
const height = window.innerHeight - 210;
useEffect(() => {
get<any>({
@ -55,7 +55,7 @@ export default function ProjConfigModShow(props: PropsType) {
return (
<>
{contextHolder}
<Breadcrumb
{/* <Breadcrumb
items={[
{title: <Link to={'/'}></Link>},
{title: <Link to={'/proj-create'}></Link>},
@ -75,8 +75,9 @@ export default function ProjConfigModShow(props: PropsType) {
},
{title: '查看菜单'},
]}
/>
<div className="mod-edit-container" style={{height: `${height}px`}}>
/> */}
<div className="mod-edit-container" style={{ height: `${height}px`, marginTop: '17px' }}>
<div style={{ height: `${height}px`, overflow: 'auto' }}>
<Alert message={`菜单指的是系统的功能,最少${minSize}个菜单,最多${maxSize}个菜单`} type="info" />
<div className="mod-content" >
<Form
@ -136,8 +137,9 @@ export default function ProjConfigModShow(props: PropsType) {
<Form.Item wrapperCol={{ span: 24 }}>
<div style={{ paddingTop: '15px' }}>
<Flex align="center" justify="center" gap="large">
<Button type="default" htmlType="button" onClick={() => {
<Button type="default" size='large' htmlType="button" onClick={() => {
nav(-1);
}}>
</Button>
@ -148,6 +150,7 @@ export default function ProjConfigModShow(props: PropsType) {
</div>
</div>
</div>
</>
)