Commit c3ff8b48 authored by 张烨's avatar 张烨

merge: merge main repositry

parents bb831ee4 e126925f
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
<div id="app"></div> <div id="app"></div>
<!-- Open Sans Font --> <!-- Open Sans Font -->
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet">
<!-- A lot of magic happens in this file. HtmlWebpackPlugin automatically injects all assets (e.g. bundle.js, main.css) with the correct HTML tags, which is why they are missing in this file. Don't add any assets here! (Check out webpack.dev.babel.js and webpack.prod.babel.js if you want to know more) --> <!-- A lot of magic happens in this file. HtmlWebpackPlugin automatically injects all assets (e.g. bundle.js, main.css) with the correct HTML tags, which is why they are missing in this file. Don't add any assets here! (Check out webpack.dev.babel.js and webpack.prod.babel.js if you want to know more) -->
</body> </body>
......
...@@ -4,10 +4,10 @@ import { matchRoutes, renderRoutes } from 'react-router-config'; ...@@ -4,10 +4,10 @@ import { matchRoutes, renderRoutes } from 'react-router-config';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import ProLayout, { DefaultFooter } from '@ant-design/pro-layout'; import ProLayout, { DefaultFooter } from '@ant-design/pro-layout';
import menuConfig from '../routes/menuConfig';
import logo from '../assets/logo.svg'; import logo from '../assets/logo.svg';
import RightContent from '../components/GlobalHeader/RightContent'; import RightContent from '../components/GlobalHeader/RightContent';
// import config from '../routes/config';
// const noMatch = ( // const noMatch = (
// <Result // <Result
...@@ -18,6 +18,7 @@ import RightContent from '../components/GlobalHeader/RightContent'; ...@@ -18,6 +18,7 @@ import RightContent from '../components/GlobalHeader/RightContent';
// /> // />
// ); // );
// eslint-disable-next-line no-unused-vars
const defaultFooterDom = ( const defaultFooterDom = (
<DefaultFooter <DefaultFooter
copyright={`${new Date().getFullYear()} 熊猫智慧水务技术委员会出品`} copyright={`${new Date().getFullYear()} 熊猫智慧水务技术委员会出品`}
...@@ -25,90 +26,9 @@ const defaultFooterDom = ( ...@@ -25,90 +26,9 @@ const defaultFooterDom = (
/> />
); );
const BasicMenu = [
{
path: '/dbm',
component: 'BasicLayout',
name: '数据库管理',
icon: 'icon-dashboard',
routes: [
{
path: '/dbm/dbInit',
name: '数据库初始化',
},
{
path: '/dbm/dbsm',
name: '数据库标准化管理',
},
],
},
{
path: '/ou',
component: 'BasicLayout',
name: '机构与用户管理',
icon: 'icon-dashboard',
routes: [
{
path: '/ou/orgList',
name: '机构列表',
},
],
},
{
path: '/basicConfig',
component: 'BasicLayout',
name: '基础通用配置',
icon: 'icon-dashboard',
},
{
path: '/web5',
component: 'BasicLayout',
name: 'Web5配置',
icon: 'icon-dashboard',
routes: [
{
path: '/web5/integration',
name: '集成网站',
},
{
path: '/web5/single',
name: '一般网站',
},
],
},
{
path: '/app',
component: 'BasicLayout',
name: '手持系统配置',
icon: 'icon-dashboard',
},
{
path: '/miniPro',
component: 'BasicLayout',
name: '小程序配置',
authority: ['admin', 'user'],
icon: 'icon-dashboard',
},
{
path: '/log',
component: 'BasicLayout',
name: '日志管理',
icon: 'icon-dashboard',
routes: [
{
path: '/log/service',
name: '服务日志',
},
{
path: '/log/login',
name: '登录日志',
},
],
},
];
const userMode = localStorage.getItem('userMode'); const userMode = localStorage.getItem('userMode');
if (userMode === 'common') { if (userMode === 'common') {
BasicMenu.shift(); menuConfig.shift();
} }
const BasicLayout = props => { const BasicLayout = props => {
...@@ -122,7 +42,7 @@ const BasicLayout = props => { ...@@ -122,7 +42,7 @@ const BasicLayout = props => {
logo={logo} logo={logo}
onCollapse={handleMenuCollapse} onCollapse={handleMenuCollapse}
onMenuHeaderClick={() => {}} onMenuHeaderClick={() => {}}
footerRender={() => defaultFooterDom} // footerRender={() => defaultFooterDom}
rightContentRender={() => <RightContent />} rightContentRender={() => <RightContent />}
route={ route={
{ {
...@@ -132,7 +52,7 @@ const BasicLayout = props => { ...@@ -132,7 +52,7 @@ const BasicLayout = props => {
location={{ location={{
pathname, pathname,
}} }}
menuDataRender={() => BasicMenu} menuDataRender={() => menuConfig}
menuItemRender={(menuItemProps, defaultDom) => { menuItemRender={(menuItemProps, defaultDom) => {
if (menuItemProps.isUrl || !menuItemProps.path) { if (menuItemProps.isUrl || !menuItemProps.path) {
return defaultDom; return defaultDom;
......
import React,{ useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { Card, Form, Input, Button, Select, Table, Tag, Space } from 'antd'; import { Card, Form, Input, Button, Select, Table, Tag, Space } from 'antd';
import { PageContainer } from '@ant-design/pro-layout'; import { PageContainer } from '@ant-design/pro-layout';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { get, post } from 'services'; import { get, post } from 'services';
const ManagementDataBase = () => { const ManagementDataBase = () => {
const [autoCheckList, setAutoCheckList] = useState([]) const [autoCheckList, setAutoCheckList] = useState([]);
const [checkList, setCheckList] = useState([]) const [checkList, setCheckList] = useState([]);
const [logList, setLogList] = useState([]) const [logList, setLogList] = useState([]);
//检查数据库表 // 检查数据库表
useEffect( () => { useEffect(() => {
get(`/Cityinterface/rest/services/OMS.svc/TableCheck`,{ get(`/Cityinterface/rest/services/OMS.svc/TableCheck`, {
_version:9999, _version: 9999,
_dc:new Date().getTime() _dc: new Date().getTime(),
}).then(res =>{
console.log(res)
if(res.sucess){
const { list, messageList } = res
//自动检测列表
let arr = list.map((item,index) => {
item.key=index
return item
}) })
.then(res => {
console.log(res);
if (res.sucess) {
const { list, messageList } = res;
//自动检测列表
let arr = list.map((item, index) => {
item.key = index;
return item;
});
//手动检查列表 //手动检查列表
let arr2 = messageList.map((item,index) => { let arr2 = messageList.map((item, index) => {
item.key=index // eslint-disable-next-line no-param-reassign
return item item.key = index;
}) return item;
console.log(arr) });
setAutoCheckList(arr) console.log(arr);
setCheckList(arr2) setAutoCheckList(arr);
setCheckList(arr2);
} }
}).catch(err =>{
console.error(err)
}) })
},[]) .catch(err => {
console.error(err);
});
}, []);
//获取数据库升级记录 //获取数据库升级记录
useEffect( () => { useEffect(() => {
get(`/Cityinterface/rest/services/OMS.svc/DatabaseStandard_GetLog`,{ get(`/Cityinterface/rest/services/OMS.svc/DatabaseStandard_GetLog`, {
_version:9999, _version: 9999,
_dc:new Date().getTime() _dc: new Date().getTime(),
}).then(res =>{
console.log(res)
if(res){
setLogList(res)
}
}).catch(err =>{
console.error(err)
}) })
},[]) .then(res => {
const handleCheck = () =>{ console.log(res);
console.log('check DB') if (res) {
} setLogList(res);
const handleUpdate = () =>{
console.log('updatedb')
} }
})
.catch(err => {
console.error(err);
});
}, []);
const handleCheck = () => {
console.log('check DB');
};
const handleUpdate = () => {
console.log('updatedb');
};
const autoCheckColumns = [ const autoCheckColumns = [
{ {
title:'表名称', title: '表名称',
dataIndex: 'tableName', dataIndex: 'tableName',
key: 'tableName', key: 'tableName',
}, },
{ {
title:'类型', title: '类型',
dataIndex: 'type', dataIndex: 'type',
key: 'type', key: 'type',
}, },
{ {
title:'差异比较', title: '差异比较',
dataIndex: 'message', dataIndex: 'message',
key: 'message', key: 'message',
}, },
]; ];
const checkColumns = [ const checkColumns = [
{ {
title:'表名称', title: '表名称',
dataIndex: 'tableName', dataIndex: 'tableName',
key: 'tableName', key: 'tableName',
width:200 width: 200,
}, },
{ {
title:'类型', title: '类型',
dataIndex: 'type', dataIndex: 'type',
key: 'type', key: 'type',
}, },
{ {
title:'差异比较', title: '差异比较',
dataIndex: 'message', dataIndex: 'message',
key: 'message', key: 'message',
ellipsis:true, ellipsis: true,
// width:80 // width:80
}, },
]; ];
const logColumns = [ const logColumns = [
{ {
title:'登录名', title: '登录名',
dataIndex: 'updateBy', dataIndex: 'updateBy',
key: 'updateBy', key: 'updateBy',
}, },
{ {
title:'数据库名称', title: '数据库名称',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
}, },
{ {
title:'数据库版本', title: '数据库版本',
dataIndex: 'version', dataIndex: 'version',
key: 'version', key: 'version',
}, },
{ {
title:'数据库版本', title: '数据库版本',
dataIndex: 'version', dataIndex: 'version',
key: 'version', key: 'version',
}, },
{ {
title:'升级时间', title: '升级时间',
dataIndex: 'updateTime', dataIndex: 'updateTime',
key: 'updateTime', key: 'updateTime',
}, },
{ {
title:'版本日志', title: '版本日志',
dataIndex: 'despersion', dataIndex: 'despersion',
key: 'despersion', key: 'despersion',
}, },
{ {
title:'升级内容', title: '升级内容',
dataIndex: 'content', dataIndex: 'content',
key: 'content', key: 'content',
ellipsis:true, ellipsis: true,
}, },
] ];
return ( return (
<> <>
<PageContainer> <PageContainer>
<Card> <Card>
<Table columns={ autoCheckColumns } dataSource={autoCheckList} bordered></Table> <Table
columns={autoCheckColumns}
dataSource={autoCheckList}
bordered
/>
<Space> <Space>
<Button onClick= {handleCheck}>检查</Button> <Button onClick={handleCheck}>检查</Button>
<Button onClick= {handleUpdate}>升级</Button> <Button onClick={handleUpdate}>升级</Button>
</Space> </Space>
</Card> </Card>
<Card> <Card>
<Table columns={ checkColumns } dataSource={checkList} bordered></Table> <Table columns={checkColumns} dataSource={checkList} bordered />
</Card> </Card>
<Card> <Card>
<Table columns={ logColumns } dataSource={logList} bordered></Table> <Table columns={logColumns} dataSource={logList} bordered />
</Card> </Card>
</PageContainer> </PageContainer>
</> </>
) );
} };
export default ManagementDataBase
export default ManagementDataBase;
...@@ -2,9 +2,9 @@ import UserLayout from '../layouts/UserLayout'; ...@@ -2,9 +2,9 @@ import UserLayout from '../layouts/UserLayout';
import Login from '../pages/user/login'; import Login from '../pages/user/login';
import BasicLayout from '../layouts/BasicLayout'; import BasicLayout from '../layouts/BasicLayout';
import Welcome from '../pages/Welcome'; import Welcome from '../pages/Welcome';
import RequestTest from '../pages/testPages/request';
import InitDataBase from '../pages/database/InitDataBase'; import InitDataBase from '../pages/database/InitDataBase';
import ManagementDataBase from '../pages/database/ManagementDataBase'; import ManagementDataBase from '../pages/database/ManagementDataBase';
// import OrgAndUser from '../pages/organization/OrgAndUser';
export default { export default {
routes: [ routes: [
...@@ -19,17 +19,6 @@ export default { ...@@ -19,17 +19,6 @@ export default {
}, },
], ],
}, },
{
path: '/test',
component: UserLayout,
routes: [
{
name: '接口测试页',
path: '/test/request',
component: RequestTest,
},
],
},
{ {
path: '/', path: '/',
component: BasicLayout, component: BasicLayout,
...@@ -45,34 +34,53 @@ export default { ...@@ -45,34 +34,53 @@ export default {
component: ManagementDataBase, component: ManagementDataBase,
}, },
{ {
path: '/ou/orgList', path: '/userCenter/orgList',
name: '机构列表', name: '机构列表',
component: Welcome, component: Welcome,
}, },
{ {
path: '/basicConfig', path: '/platformCenter/gis',
name: '基础通用配置', name: 'GIS平台',
component: Welcome,
},
{
path: '/platformCenter/order',
name: '工单平台',
component: Welcome,
},
{
path: '/platformCenter/notify',
name: '消息平台',
component: Welcome,
},
{
path: '/platformCenter/vedio',
name: '视频管理',
component: Welcome, component: Welcome,
}, },
{ {
path: '/web5/integration', path: '/platformCenter/emq',
name: '集成网站', name: '宿主管理',
component: Welcome, component: Welcome,
}, },
{ {
path: '/web5/single', path: '/platformCenter/dictionary',
name: '一般网站', name: '数据字典',
component: Welcome, component: Welcome,
}, },
{ {
path: '/app', path: '/productCenter/web',
name: '手持系统配置', name: 'web配置',
component: Welcome, component: Welcome,
}, },
{ {
path: '/miniPro', path: '/productCenter/app',
name: 'app配置',
component: Welcome,
},
{
path: '/productCenter/miniProgram',
name: '小程序配置', name: '小程序配置',
authority: ['admin', 'user'],
component: Welcome, component: Welcome,
}, },
{ {
...@@ -80,6 +88,26 @@ export default { ...@@ -80,6 +88,26 @@ export default {
name: '日志管理', name: '日志管理',
component: Welcome, component: Welcome,
}, },
{
path: '/log/service',
name: '服务日志',
component: Welcome,
},
{
path: '/log/login',
name: '登录日志',
component: Welcome,
},
{
path: '/log/omsOperation',
name: '运维操作日志',
component: Welcome,
},
{
path: '/log/omsError',
name: '运维错误日志',
component: Welcome,
},
], ],
}, },
], ],
......
import React from 'react';
import {
DatabaseOutlined,
UsergroupAddOutlined,
SettingOutlined,
HomeOutlined,
// AndroidOutlined,
// CommentOutlined,
CopyOutlined,
} from '@ant-design/icons';
const iconStyle = { verticalAlign: '0.125em' };
const menuConfig = [
{
path: '/dbm',
component: 'BasicLayout',
name: '数据库管理',
icon: <DatabaseOutlined style={iconStyle} />,
routes: [
{
path: '/dbm/dbInit',
name: '数据库初始化',
},
{
path: '/dbm/dbsm',
name: '数据库标准化管理',
},
],
},
{
path: '/userCenter',
component: 'BasicLayout',
name: '用户中心',
icon: <UsergroupAddOutlined style={iconStyle} />,
routes: [
{
path: '/userCenter/orgList',
name: '机构列表',
},
],
},
{
path: '/platformCenter',
component: 'BasicLayout',
name: '平台中心',
icon: <SettingOutlined style={iconStyle} />,
routes: [
{
path: '/platformCenter/gis',
name: 'GIS平台',
},
{
path: '/platformCenter/order',
name: '工单平台',
},
{
path: '/platformCenter/notify',
name: '消息平台',
},
{
path: '/platformCenter/vedio',
name: '视频管理',
},
{
path: '/platformCenter/emq',
name: '宿主管理',
},
{
path: '/platformCenter/dictionary',
name: '数据字典',
},
],
},
{
path: '/productCenter',
component: 'BasicLayout',
name: '产品中心',
icon: <HomeOutlined style={iconStyle} />,
routes: [
{
path: '/productCenter/web',
name: 'web配置',
},
{
path: '/productCenter/app',
name: 'app配置',
},
{
path: '/productCenter/miniProgram',
name: '小程序配置',
},
],
},
{
path: '/log',
component: 'BasicLayout',
name: '日志管理',
icon: <CopyOutlined style={iconStyle} />,
routes: [
{
path: '/log/service',
name: '服务日志',
},
{
path: '/log/login',
name: '登录日志',
},
{
path: '/log/omsOperation',
name: '运维操作日志',
},
{
path: '/log/omsError',
name: '运维错误日志',
},
],
},
];
export default menuConfig;
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