42 changed files with 47 additions and 598 deletions
			
			
		| @ -1,15 +0,0 @@ | |||
| 'use strict'; | |||
| 
 | |||
| import { basicAction } from '@peace/utils' | |||
| import { ApiTable } from '$utils' | |||
| 
 | |||
| export function getMembers(orgId) { | |||
|     return dispatch => basicAction({ | |||
|         type: 'get', | |||
|         dispatch: dispatch, | |||
|         actionType: 'GET_MEMBERS', | |||
|         url: `${ApiTable.getEnterprisesMembers.replace('{enterpriseId}', orgId)}`, | |||
|         msg: { error: '获取用户列表失败' }, | |||
|         reducer: { name: 'members' } | |||
|     }); | |||
| } | |||
| @ -1,7 +0,0 @@ | |||
| 'use strict'; | |||
| 
 | |||
| import * as example from './example' | |||
| 
 | |||
| export default { | |||
|     ...example | |||
| } | |||
| @ -1,53 +0,0 @@ | |||
| import React, { useEffect, useState } from 'react'; | |||
| import { connect } from 'react-redux'; | |||
| import { Spin, Card } from 'antd'; | |||
| import Build from './footer/build' | |||
| import '../style.less'; | |||
| import Header from './heand'; | |||
| import Footer from './footer'; | |||
| import ProTable, { TableDropdown } from '@ant-design/pro-table'; | |||
| 
 | |||
| const Example = (props) => { | |||
|     const { dispatch, actions, user, loading } = props | |||
|     const [tabKey, setTabKey] = useState('leadership') | |||
| 
 | |||
|     useEffect(() => { | |||
|         dispatch(actions.example.getMembers(user.orgId)) | |||
|     }, []) | |||
|     const tabChange = (tab) => { | |||
|         //leader 领导驾驶舱 site 工地 toilet 公厕 light 照明  water水质  encomic经济 environment 生态环境  security 智慧安监
 | |||
|         // setCurrentTab(tab);
 | |||
|         setTabKey(tab) | |||
|         // dispatch({ type: 'TAB-CHANGE', data: tab })
 | |||
|     } | |||
| 
 | |||
|     return ( | |||
|         <Spin tip="biubiubiu~" spinning={loading}> | |||
|             <div id='example2' style={{ | |||
|                 backgroundColor: "#031839", width: "100vw", height: "100vh", /* transform: `scale(${Math.min( | |||
|                     document.body.clientWidth / 1920, | |||
|                     document.body.clientHeight / 1080 | |||
|                 )})`, */
 | |||
|             }}> | |||
|                 <div style={{ width: "100%", height: "10%" }}> | |||
|                     <Header tabChange={tabChange} tabKey={tabKey} dispatch={dispatch} /> | |||
|                 </div> | |||
|                 <div style={{ width: "100%", height: "90%" }}> | |||
|                     <Footer tabKey={tabKey} /> | |||
|                 </div> | |||
|             </div> | |||
|         </Spin> | |||
|     ) | |||
| } | |||
| 
 | |||
| function mapStateToProps(state) { | |||
|     const { auth, global, members } = state; | |||
|     return { | |||
|         loading: members.isRequesting, | |||
|         user: auth.user, | |||
|         actions: global.actions, | |||
|         members: members.data | |||
|     }; | |||
| } | |||
| 
 | |||
| export default connect(mapStateToProps)(Example); | |||
| @ -1,8 +0,0 @@ | |||
| import React from 'react' | |||
| 
 | |||
| const Build = () => { | |||
|     return ( | |||
|         <>Build</> | |||
|     ) | |||
| } | |||
| export default Build | |||
| @ -1,8 +0,0 @@ | |||
| import React from 'react' | |||
| 
 | |||
| const Conserve = () => { | |||
|     return ( | |||
|         <>1212121</> | |||
|     ) | |||
| } | |||
| export default Conserve | |||
| @ -1,8 +0,0 @@ | |||
| import React from 'react' | |||
| 
 | |||
| const Guanli = () => { | |||
|     return ( | |||
|         <>管理</> | |||
|     ) | |||
| } | |||
| export default Guanli | |||
| @ -1,29 +0,0 @@ | |||
| import React from 'react' | |||
| import Build from './build' | |||
| import Conserve from './conserve' | |||
| import Guanli from './guanli' | |||
| import Leadership from './leadership' | |||
| import Operation from './operation' | |||
| const Footer = ({ tabKey }) => { | |||
|     return ( | |||
|         <> | |||
|             { | |||
|                 (() => { | |||
|                     switch (tabKey) { | |||
|                         case 'build': | |||
|                             return <Build /> | |||
|                         case 'conserve': | |||
|                             return <Conserve /> | |||
|                         case "leadership": | |||
|                             return <Leadership /> | |||
|                         case "guanli": | |||
|                             return <Guanli /> | |||
|                         case "operation": | |||
|                             return <Operation /> | |||
|                     } | |||
|                 })() | |||
|             } | |||
|         </> | |||
|     ) | |||
| } | |||
| export default Footer | |||
| @ -1,17 +0,0 @@ | |||
| import React from 'react' | |||
| import Centerlefttop from "./centerleft/center-left-top" | |||
| import Centerleftcenter from "./centerleft/center-left-center" | |||
| import Centerleftcentertop from "./centerleft/center-left-centertop" | |||
| import Centerleftbottom from "./centerleft/center-left-bottom" | |||
| 
 | |||
| const CenterLeft = () => { | |||
|     return ( | |||
|         <> | |||
|             <div style={{ width: "23%", height: "100%", float: "left", marginLeft: "1%" }}> | |||
|                 <Centerlefttop /> | |||
|                 <Centerleftbottom /> | |||
|             </div> | |||
|         </> | |||
|     ) | |||
| } | |||
| export default CenterLeft | |||
| @ -1,19 +0,0 @@ | |||
| import React from 'react' | |||
| import Centerrighttop from "./centerRight/center-right-top" | |||
| import Centerrightcenter from "./centerRight/center-right-center" | |||
| import CenterRightcentertop from "./centerRight/center-right-centertop" | |||
| import Centerrightbottom from "./centerRight/center-right-bottom" | |||
| 
 | |||
| const CenterLeft = () => { | |||
|     return ( | |||
|         <> | |||
|             <div style={{ width: "23%", height: "100%", float: "right", marginRight: "1%" }}> | |||
|                 <Centerrighttop /> | |||
|                 <CenterRightcentertop /> | |||
|                 <Centerrightcenter /> | |||
|                 <Centerrightbottom /> | |||
|             </div> | |||
|         </> | |||
|     ) | |||
| } | |||
| export default CenterLeft | |||
| @ -1,14 +0,0 @@ | |||
| import React from 'react' | |||
| import Module from '../../../public/module' | |||
| 
 | |||
| const Rightbottom = () => { | |||
|     const style = { height: "33%" } | |||
|     return ( | |||
|         <> | |||
|             <Module style={style}> | |||
|                 <div style={{ width: "40%", height: "40%", background: "red" }}></div> | |||
|             </Module> | |||
|         </> | |||
|     ) | |||
| } | |||
| export default Rightbottom | |||
| @ -1,14 +0,0 @@ | |||
| import React from 'react' | |||
| import Module from '../../../public/module' | |||
| 
 | |||
| const Rightcenter = () => { | |||
|     const style = { height: "17%" } | |||
|     return ( | |||
|         <> | |||
|             <Module style={style}> | |||
|                 <div style={{ width: "40%", height: "40%", background: "red" }}></div> | |||
|             </Module> | |||
|         </> | |||
|     ) | |||
| } | |||
| export default Rightcenter | |||
| @ -1,14 +0,0 @@ | |||
| import React from 'react' | |||
| import Module from '../../../public/module' | |||
| 
 | |||
| const Rightcentertop = () => { | |||
|     const style = { height: "23%" } | |||
|     return ( | |||
|         <> | |||
|             <Module style={style}> | |||
|                 <div style={{ width: "40%", height: "40%", background: "red" }}></div> | |||
|             </Module> | |||
|         </> | |||
|     ) | |||
| } | |||
| export default Rightcentertop | |||
| @ -1,15 +0,0 @@ | |||
| import React from 'react' | |||
| import Module from '../../../public/module' | |||
| 
 | |||
| const Righttop = (props) => { | |||
|     const { } = props | |||
|     const style = { height: "17%" } | |||
|     return ( | |||
|         <> | |||
|             <Module style={style}> | |||
|                 <div style={{ width: "40%", height: "40%", background: "red" }}></div> | |||
|             </Module> | |||
|         </> | |||
|     ) | |||
| } | |||
| export default Righttop | |||
| @ -1,14 +0,0 @@ | |||
| import React from 'react' | |||
| import Module from '../../../public/module' | |||
| 
 | |||
| const Leftbottom = () => { | |||
|     const style = { height: "23%", marginTop: "5%" } | |||
|     return ( | |||
|         <> | |||
|             <Module style={style}> | |||
|                 <div style={{ width: "40%", height: "40%", background: "red" }}></div> | |||
|             </Module> | |||
|         </> | |||
|     ) | |||
| } | |||
| export default Leftbottom | |||
| @ -1,16 +0,0 @@ | |||
| import React from 'react' | |||
| import Module from '../../../public/module' | |||
| 
 | |||
| const Leftcenter = () => { | |||
|     const style = { | |||
|         height: "23%" | |||
|     } | |||
|     return ( | |||
|         <> | |||
|             <Module style={style}> | |||
|                 <div style={{ width: "40%", height: "40%", background: "red" }}></div> | |||
|             </Module> | |||
|         </> | |||
|     ) | |||
| } | |||
| export default Leftcenter | |||
| @ -1,14 +0,0 @@ | |||
| import React from 'react' | |||
| import Module from '../../../public/module' | |||
| 
 | |||
| const Leftcentertop = () => { | |||
|     const style = { height: "23%" } | |||
|     return ( | |||
|         <> | |||
|             <Module style={style}> | |||
|                 <div style={{ width: "40%", height: "40%", background: "red" }}></div> | |||
|             </Module> | |||
|         </> | |||
|     ) | |||
| } | |||
| export default Leftcentertop | |||
| @ -1,15 +0,0 @@ | |||
| import React from 'react' | |||
| import Module from '../../../public/module' | |||
| 
 | |||
| const Lefttop = (props) => { | |||
|     const { } = props | |||
|     const style = { height: "23%" } | |||
|     return ( | |||
|         <> | |||
|             <Module style={style}> | |||
|                 <div style={{ width: "40%", height: "40%", background: "red" }}></div> | |||
|             </Module> | |||
|         </> | |||
|     ) | |||
| } | |||
| export default Lefttop | |||
| @ -1,18 +0,0 @@ | |||
| import React from 'react' | |||
| import Left from './left' | |||
| import Right from './right' | |||
| import CenterLeft from "./centerLeft" | |||
| import Centerright from "./centerRight" | |||
| 
 | |||
| const Leadership = () => { | |||
|     return ( | |||
|         <> | |||
|             <Left /> | |||
|             <CenterLeft /> | |||
|             <Right /> | |||
|             {/* <Centerright /> */} | |||
| 
 | |||
|         </> | |||
|     ) | |||
| } | |||
| export default Leadership | |||
| @ -1,17 +0,0 @@ | |||
| import React from 'react' | |||
| import Lefttop from './left/left-top' | |||
| import Leftcenter from "./left/left-center" | |||
| import Leftbottom from './left/left-bottom' | |||
| 
 | |||
| const Left = () => { | |||
|     return ( | |||
|         <> | |||
|             <div style={{ width: "23%", height: "100%", float: "left" }}> | |||
|                 <Lefttop /> | |||
|                 <Leftcenter /> | |||
|                 <Leftbottom /> | |||
|             </div> | |||
|         </> | |||
|     ) | |||
| } | |||
| export default Left | |||
| @ -1,14 +0,0 @@ | |||
| import React from 'react' | |||
| import Module from '../../../public/module' | |||
| 
 | |||
| const Leftbottom = () => { | |||
|     const style = { height: "25%", marginTop: "5%" } | |||
|     return ( | |||
|         <> | |||
|             <Module style={style} title={""}> | |||
| 
 | |||
|             </Module> | |||
|         </> | |||
|     ) | |||
| } | |||
| export default Leftbottom | |||
| @ -1,14 +0,0 @@ | |||
| import React from 'react' | |||
| import Module from '../../../public/module' | |||
| 
 | |||
| const Leftcenter = () => { | |||
|     const style = { height: "30%", marginTop: "5%" } | |||
|     return ( | |||
|         <> | |||
|             <Module style={style}> | |||
|                 <div style={{ width: "40%", height: "40%", background: "red" }}></div> | |||
|             </Module> | |||
|         </> | |||
|     ) | |||
| } | |||
| export default Leftcenter | |||
| @ -1,14 +0,0 @@ | |||
| import React from 'react' | |||
| import Module from '../../../public/module' | |||
| 
 | |||
| const Lefttop = () => { | |||
|     const style = { height: "25%" } | |||
|     return ( | |||
|         <> | |||
|             <Module style={style} title={"道路拥堵指数"} > | |||
|                 {/* <div style={{ width: "40%", height: "40%", background: "red" }}></div> */} | |||
|             </Module> | |||
|         </> | |||
|     ) | |||
| } | |||
| export default Lefttop | |||
| @ -1,16 +0,0 @@ | |||
| import React from 'react' | |||
| import Righttop from './right/right-top' | |||
| import Rightcenter from './right/right-center' | |||
| import Rightbottom from './right/right-bottom' | |||
| 
 | |||
| const Right = () => { | |||
|     return ( | |||
|         <> | |||
|             <div style={{ width: "25%", height: "100%", float: "right" }}> | |||
|                 <Righttop /> | |||
|                 <Rightbottom /> | |||
|             </div> | |||
|         </> | |||
|     ) | |||
| } | |||
| export default Right | |||
| @ -1,14 +0,0 @@ | |||
| import React from 'react' | |||
| import Module from '../../../public/module' | |||
| 
 | |||
| const Rightbottom = () => { | |||
|     const style = { height: "45%", marginTop: "5%" } | |||
|     return ( | |||
|         <> | |||
|             <Module style={style}> | |||
|                 <div style={{ width: "40%", height: "40%", background: "red" }}></div> | |||
|             </Module> | |||
|         </> | |||
|     ) | |||
| } | |||
| export default Rightbottom | |||
| @ -1,9 +0,0 @@ | |||
| import React from 'react' | |||
| 
 | |||
| const Rightcenter = () => { | |||
|     return ( | |||
|         <><div style={{ width: /* width || */ "100%", height: /* height || */ "30%" }}> | |||
|         </div></> | |||
|     ) | |||
| } | |||
| export default Rightcenter | |||
| @ -1,13 +0,0 @@ | |||
| import React from 'react' | |||
| import Module from '../../../public/module' | |||
| 
 | |||
| const Righttop = () => { | |||
|     const style = { height: "45%" } | |||
|     return ( | |||
|         <> | |||
|             <Module style={style}> | |||
|             </Module> | |||
|         </> | |||
|     ) | |||
| } | |||
| export default Righttop | |||
| @ -1,8 +0,0 @@ | |||
| import React from 'react' | |||
| 
 | |||
| const Operation = () => { | |||
|     return ( | |||
|         <>运营</> | |||
|     ) | |||
| } | |||
| export default Operation | |||
| @ -1,40 +0,0 @@ | |||
| import React, { useState, uesEffect } from 'react' | |||
| import { push } from 'react-router-redux'; | |||
| import "./style.less" | |||
| import { Tabs } from 'antd'; | |||
| 
 | |||
| 
 | |||
| const { TabPane } = Tabs; | |||
| const Header = (props) => { | |||
|     const { dispatch, tabChange, tabKey } = props | |||
|     // const [tab, setTad] = useState("base")
 | |||
|     const onClick = (tab) => { | |||
|         // setTad({ tab })
 | |||
|         tabChange(tab) | |||
|     } | |||
|     const dianji = () => { | |||
|         dispatch(push('/fillion/infor')) | |||
|     } | |||
|     return ( | |||
|         <div style={{ position: "relative" }}> | |||
|             <img style={{ width: "100%", position: "absolute" }} src='/assets/images/quanju/beijingtou.png' /> | |||
|             <div className={tabKey == "build" ? "tabKey-map" : "notabKey"} style={{ backgroundImage: "url(/assets/images/quanju/zuobeijing.png)", backgroundSize: "100% 100%" }} onClick={() => { | |||
|                 onClick("build") | |||
|             }}><a>建设</a></div> | |||
|             <div className={tabKey == "conserve" ? "tabKey-map" : "notabKey"} style={{ left: "11.5%", backgroundImage: "url(/assets/images/quanju/zuobeijing.png)", backgroundSize: "100% 100%" }} onClick={() => { | |||
|                 onClick("conserve") | |||
|             }}><a>养护</a></div> | |||
|             <div className={tabKey == "leadership" ? "tabKey-map" : "notabKey"} style={{ left: "23%", backgroundImage: "url(/assets/images/quanju/zuobeijing.png)", backgroundSize: "100% 100%" }} onClick={() => { | |||
|                 onClick("leadership") | |||
|             }}><a>领导驾驶舱</a></div> | |||
|             <div className={tabKey == "guanli" ? "tabKey-map" : "notabKey"} style={{ left: "65%", backgroundImage: "url(/assets/images/quanju/youbeijing.png)", backgroundSize: "100% 100%" }} onClick={() => { | |||
|                 onClick("guanli") | |||
|             }}><a>管理</a></div> | |||
|             <div className={tabKey == "operation" ? "tabKey-map" : "notabKey"} style={{ left: "76%", backgroundImage: "url(/assets/images/quanju/youbeijing.png)", backgroundSize: "100% 100%" }} onClick={() => { | |||
|                 onClick("operation") | |||
|             }}><a>运营</a></div> | |||
|             <div style={{ color: "red", position: "absolute", left: "92%", top: "15px" }} onClick={() => dianji()}>南昌县运输交通总局</div> | |||
|         </div> | |||
|     ) | |||
| } | |||
| export default Header | |||
| @ -1,23 +0,0 @@ | |||
| .tabKey-map{ | |||
|     width: 12%; | |||
|     height: 45px; | |||
|     text-align: center; | |||
|     position: absolute; | |||
|     top: 30px; | |||
|     a{ | |||
|         color: #c3d4f5; | |||
|         line-height: 45px; | |||
|     } | |||
| } | |||
| .notabKey{ | |||
|     width:12%; | |||
|     height: 45px; | |||
|     position: absolute; | |||
|     top: 30px; | |||
|     text-align: center; | |||
|     a{ | |||
|         color: #6593c6; | |||
|         line-height: 45px; | |||
|     } | |||
|      | |||
| } | |||
| @ -1,6 +0,0 @@ | |||
| 'use strict'; | |||
| 
 | |||
| import Example from './example'; | |||
| import Build from './footer/build' | |||
| 
 | |||
| export { Example, Build }; | |||
| @ -1,4 +0,0 @@ | |||
| @font-face { | |||
|     font-family: "YouSheBiaoTiHei"; | |||
|     src: url("/assets/fontziti/YouSheBiaoTiHei-2.ttf") format("truetype"); | |||
|   } | |||
| @ -1,22 +0,0 @@ | |||
| import React from 'react' | |||
| import "./font.css" | |||
| 
 | |||
| const Module = (props) => { | |||
|     const { style, children, title } = props | |||
|     return ( | |||
|         <> | |||
|             <div style={{ width: style?.width || "100%", height: style?.height || "30%", backgroundColor: "#042263", marginTop: style?.marginTop || "0" }}> | |||
|                 <div style={{ width: "100%", height: "40px"/* , backgroundColor: "#fff" */, position: "relative" }}> | |||
|                     {/* <p>{title || []}</p> */} | |||
|                     <img src='/assets/images/quanju/icon.png' style={{ width: "4%", position: "absolute", left: "3%", top: "20%" }} /> | |||
|                     <span style={{ position: "absolute", color: "#FFFFFF", fontSize: "24px", fontFamily: "YouSheBiaoTiHei", left: "8%" }}>{title || []}</span> | |||
|                     <img src='/assets/images/quanju/mokuaitou.png' style={{ width: "100%", height: "28px", position: "absolute", top: "12px" }} /> | |||
|                 </div> | |||
|                 <div style={{ width: "100%", height: "70%" }}> | |||
|                     {children} | |||
|                 </div> | |||
|             </div> | |||
|         </> | |||
|     ) | |||
| } | |||
| export default Module | |||
| @ -1,15 +0,0 @@ | |||
| 'use strict'; | |||
| 
 | |||
| import reducers from './reducers'; | |||
| import routes from './routes'; | |||
| import actions from './actions'; | |||
| import { getNavItem } from './nav-item'; | |||
| 
 | |||
| export default { | |||
|     key: 'example2', | |||
|     name: '书写示例', | |||
|     reducers: reducers, | |||
|     routes: routes, | |||
|     actions: actions, | |||
|     getNavItem: getNavItem | |||
| }; | |||
| @ -1,16 +0,0 @@ | |||
| import React from 'react'; | |||
| import { Link } from 'react-router-dom'; | |||
| import { Menu } from 'antd'; | |||
| import { SettingOutlined } from '@ant-design/icons'; | |||
| 
 | |||
| const SubMenu = Menu.SubMenu; | |||
| 
 | |||
| export function getNavItem(user, dispatch) { | |||
|     return ( | |||
|         <SubMenu key="example2" icon={<SettingOutlined />} title={'举个栗子'}> | |||
|             <Menu.Item key="e1"> | |||
|                 <Link to="/example2/e1">举个棒子2</Link> | |||
|             </Menu.Item> | |||
|         </SubMenu> | |||
|     ); | |||
| } | |||
| @ -1,5 +0,0 @@ | |||
| 'use strict'; | |||
| 
 | |||
| export default { | |||
| 
 | |||
| } | |||
| @ -1,21 +0,0 @@ | |||
| 'use strict'; | |||
| import { Example, Build } from './containers'; | |||
| 
 | |||
| export default [{ | |||
|     type: 'outer', | |||
|     route: { | |||
|         path: '/quanju', | |||
|         key: 'quanju', | |||
|         breadcrumb: '栗子222', | |||
|         exact: false, | |||
|         component: Example, | |||
|         // 不设置 component 则面包屑禁止跳转
 | |||
|         // childRoutes: [{
 | |||
|         //     path: '/e2',
 | |||
|         //     key: 'e2',
 | |||
|         //     exact: false,
 | |||
|         //     component: Build,
 | |||
|         //     breadcrumb: '棒子',
 | |||
|         // }]
 | |||
|     } | |||
| }]; | |||
| @ -1,3 +0,0 @@ | |||
| #example:hover { | |||
|     font-size: larger; | |||
| } | |||
					Loading…
					
					
				
		Reference in new issue