|
@@ -0,0 +1,115 @@
|
|
|
|
+import React, { useState, useEffect, useMemo } from 'react';
|
|
|
|
+import { Card, Table, Empty, Button, Modal, message } from 'antd';
|
|
|
|
+import menuStyle from './index.less';
|
|
|
|
+import { connect, useNavigate } from 'umi';
|
|
|
|
+import { getToken } from '@/utils/utils';
|
|
|
|
+const noIcon = require('@/assets/UnityMenu/noIcon.png');
|
|
|
|
+function HomePage(props) {
|
|
|
|
+ let navigate = useNavigate();
|
|
|
|
+ const curMenu = [
|
|
|
|
+ {
|
|
|
|
+ id: 1,
|
|
|
|
+ name: '项目立项',
|
|
|
|
+ active: true,
|
|
|
|
+ click: () => {
|
|
|
|
+ window.open(` http://120.55.44.4:8899/#/purchase/home/approval/list?JWT-TOKEN=${getToken()}`)
|
|
|
|
+ },
|
|
|
|
+ Icon: require('@/assets/UnityMenu/project.png')
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 2,
|
|
|
|
+ name: '合同管理',
|
|
|
|
+ active: true,
|
|
|
|
+ click: () => {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ Icon: require('@/assets/UnityMenu/agreement.png')
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 3,
|
|
|
|
+ name: 'OA审批',
|
|
|
|
+ active: true,
|
|
|
|
+ click: () => {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ Icon: require('@/assets/UnityMenu/OA.png')
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 4,
|
|
|
|
+ name: 'BOM清单',
|
|
|
|
+ active: true,
|
|
|
|
+ click: () => {
|
|
|
|
+ window.open(`http://120.55.44.4:8896/#/bom/home?JWT-TOKEN=${getToken()}`)
|
|
|
|
+ },
|
|
|
|
+ Icon: require('@/assets/UnityMenu/Bom.png')
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 5,
|
|
|
|
+ name: '工时管理',
|
|
|
|
+ active: true,
|
|
|
|
+ click: () => {
|
|
|
|
+ window.open(`http://120.55.44.4:8899/#/purchase/home/work-hours?JWT-TOKEN=${getToken()}`)
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ Icon: require('@/assets/UnityMenu/time.png')
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 6,
|
|
|
|
+ name: '供应商管理',
|
|
|
|
+ active: true,
|
|
|
|
+ click: () => {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ Icon: require('@/assets/UnityMenu/Manufacturer.png')
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 7,
|
|
|
|
+ name: '文档管理',
|
|
|
|
+ active: true,
|
|
|
|
+ click: () => {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ Icon: require('@/assets/UnityMenu/transfer.png')
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 8,
|
|
|
|
+ name: '系统管理',
|
|
|
|
+ active: true,
|
|
|
|
+ click: () => {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ Icon: require('@/assets/UnityMenu/system.png')
|
|
|
|
+ },
|
|
|
|
+ ];
|
|
|
|
+ return (
|
|
|
|
+ <div className={menuStyle.background}>
|
|
|
|
+ <div className={menuStyle.menuContent}>
|
|
|
|
+ <div className={menuStyle.wrap}>
|
|
|
|
+ {curMenu.map(item => (
|
|
|
|
+ <div key={item.id} className={menuStyle.item}>
|
|
|
|
+ <div
|
|
|
|
+ onClick={() => item.click?.(item)}
|
|
|
|
+ className={menuStyle.menu}
|
|
|
|
+ style={item.active ? {} : { cursor: 'not-allowed' }}
|
|
|
|
+ >
|
|
|
|
+ <img className={menuStyle.pic} src={item.active ? item.Icon : require('@/assets/UnityMenu/newModel.png')} style={
|
|
|
|
+ item.active ? {} : { cursor: 'not-allowed' }} />
|
|
|
|
+ </div>
|
|
|
|
+ <div style={{ marginTop: 22, width: 152, textAlign: 'center' }}>
|
|
|
|
+ <span
|
|
|
|
+ onClick={() => item.click?.(item)}
|
|
|
|
+ className={menuStyle.menuFriName}
|
|
|
|
+ style={item.active ? {} : { color: '#6081B2', cursor: 'not-allowed' }}
|
|
|
|
+ >
|
|
|
|
+ {item.name}
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ ))}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ )
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export default HomePage;
|