12-23-上传master
This commit is contained in:
46
src/pages/FormList/index.less
Normal file
46
src/pages/FormList/index.less
Normal file
@ -0,0 +1,46 @@
|
||||
.MuiTabs-root {
|
||||
height: 92px;
|
||||
.PrivateTabIndicator-colorPrimary-3 {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.bar-base {
|
||||
border-right: 1px solid #f3f3f3;
|
||||
display:flex;
|
||||
}
|
||||
.link-title {
|
||||
line-height: 91px;
|
||||
height: 91px;
|
||||
font-size: 12px;
|
||||
padding: 0 10px;
|
||||
color: #666;
|
||||
span {
|
||||
display: inline-block;
|
||||
margin-right: 4px;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background-color: #980000;
|
||||
border: 1px solid rgba(230, 230, 230, 0.3);
|
||||
border-radius: 5px;
|
||||
}
|
||||
}
|
||||
.link-style {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
height: 91px;
|
||||
margin-right: 20px;
|
||||
a {
|
||||
flex-wrap: wrap;
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
line-height: 27px;
|
||||
width: 120px;
|
||||
height: 27px;
|
||||
padding: 0 18px;
|
||||
text-align: center;
|
||||
}
|
||||
a:hover {
|
||||
color: #980000;
|
||||
}
|
||||
}
|
||||
}
|
85
src/pages/FormList/index.tsx
Normal file
85
src/pages/FormList/index.tsx
Normal file
@ -0,0 +1,85 @@
|
||||
import React, { useEffect } from 'react';
|
||||
import { makeStyles, Theme } from '@material-ui/core/styles';
|
||||
import AppBar from '@material-ui/core/AppBar';
|
||||
import Tabs from '@material-ui/core/Tabs';
|
||||
import { PageHeader, Button } from 'antd';
|
||||
import { Link } from 'umi';
|
||||
import './index.less';
|
||||
import { menuList } from './service/service';
|
||||
|
||||
const useStyles = makeStyles((theme: Theme) => ({
|
||||
root: {
|
||||
flexGrow: 1,
|
||||
width: '100%',
|
||||
backgroundColor: theme.palette.background.paper,
|
||||
},
|
||||
}));
|
||||
|
||||
const FormList:React.FC<{}> = () => {
|
||||
const classes = useStyles();
|
||||
const [value, setValue] = React.useState(0);
|
||||
const [data, setData] = React.useState<any>([]);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
let projectData = sessionStorage.getItem('projectData');
|
||||
const proSessionData = JSON.parse(projectData);
|
||||
console.log(proSessionData.examinationMethodDict)
|
||||
const menuListData = {methodCode: proSessionData.examinationMethodDict, modeCode: proSessionData.bidMethodDict, signCode: proSessionData.biddingSignDict};
|
||||
|
||||
menuList(menuListData,'supplier').then(res=>{
|
||||
console.log(res)
|
||||
setData(res.data)
|
||||
})
|
||||
|
||||
}, []);
|
||||
|
||||
const handleChange = (event: React.ChangeEvent<{}>, newValue: number) => {
|
||||
setValue(newValue);
|
||||
};
|
||||
return (
|
||||
|
||||
<div>
|
||||
<div className="site-page-header-ghost-wrapper" style={{background: '#ffffff'}}>
|
||||
<PageHeader
|
||||
title="项目名称"
|
||||
subTitle="2020中国联通传输网采购"
|
||||
extra={[
|
||||
<Button key="3">项目建档</Button>,
|
||||
<Button key="2">项目归档</Button>,
|
||||
<Button key="1" type="primary">
|
||||
返回
|
||||
</Button>
|
||||
]}
|
||||
>
|
||||
</PageHeader>
|
||||
</div>
|
||||
<div className={classes.root} >
|
||||
<AppBar position="static" color="default" style={{background: '#ffffff', borderTop: '1px solid #e0e0e0', boxShadow:'none'}}>
|
||||
<Tabs
|
||||
value={value}
|
||||
onChange={handleChange}
|
||||
variant="scrollable"
|
||||
scrollButtons="on"
|
||||
indicatorColor="primary"
|
||||
textColor="primary"
|
||||
aria-label="scrollable force tabs example"
|
||||
>
|
||||
{data.map((item:any) =>(
|
||||
<div className="bar-base" key={item.id}>
|
||||
<p className="link-title"><span></span>{item.taskName}</p>
|
||||
<div className="link-style" style={{width:item.funcList.length==1?"100px":"250px"}}>
|
||||
{item.funcList.map((item2: any) =>(
|
||||
<Link to={{pathname: item2.funcUrl}} key={item2.id}>{item2.funcName}</Link>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</Tabs>
|
||||
</AppBar>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default FormList;
|
8
src/pages/FormList/service/service.ts
Normal file
8
src/pages/FormList/service/service.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { request } from "umi";
|
||||
|
||||
export async function menuList(params: any,data: any) {
|
||||
return request(`/api/projectconfig/${data}`, {
|
||||
method: 'GET',
|
||||
params: { ...params }
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user