Commit 076e4741 authored by Maofei94's avatar Maofei94

perf: 优化

parent 5e2cb203
This diff was suppressed by a .gitattributes entry.
...@@ -3,7 +3,7 @@ import PageContainer from '@/components/BasePageContainer'; ...@@ -3,7 +3,7 @@ import PageContainer from '@/components/BasePageContainer';
import { Tabs } from 'antd'; import { Tabs } from 'antd';
import React from 'react'; import React from 'react';
import styles from './index.less'; import styles from './index.less';
import SevenParams from '@/pages/mobileConfig/menuconfig/SevenParams';
const { TabPane } = Tabs; const { TabPane } = Tabs;
/** /**
* 嵌套iframe的组件 * 嵌套iframe的组件
...@@ -15,14 +15,18 @@ const FrameContainer = props => { ...@@ -15,14 +15,18 @@ const FrameContainer = props => {
const renderedFrame = tabs ? ( const renderedFrame = tabs ? (
<Tabs type="card" hideAdd {...tabProps}> <Tabs type="card" hideAdd {...tabProps}>
{tabs.map(({ url: iframeUrl, tabName }) => ( {tabs.map(({ url: iframeUrl, tabName, type = '' }) => (
<TabPane tab={tabName} key={tabName}> <TabPane tab={tabName} key={tabName}>
<iframe {type && type === 'sevenParams' ? (
title={tabName} <SevenParams />
src={`${ ) : (
isDev ? process.env.PROXY : window.location.origin <iframe
}${iframeUrl}`} title={tabName}
/> src={`${
isDev ? process.env.PROXY : window.location.origin
}${iframeUrl}`}
/>
)}
</TabPane> </TabPane>
))} ))}
</Tabs> </Tabs>
......
...@@ -16,8 +16,7 @@ const ColConen = () => { ...@@ -16,8 +16,7 @@ const ColConen = () => {
<div className={styles.logbox}> <div className={styles.logbox}>
<Tabs <Tabs
tabPosition={tabPosition} tabPosition={tabPosition}
style={{ height: 'calc(100vh - 200px)' }} style={{ height: 'calc(100vh - 500px)' }}
addIcon={<p>aa</p>}
> >
{arr.map((item, index) => ( {arr.map((item, index) => (
<TabPane tab={item.label} key={item.key}> <TabPane tab={item.label} key={item.key}>
...@@ -25,13 +24,6 @@ const ColConen = () => { ...@@ -25,13 +24,6 @@ const ColConen = () => {
</TabPane> </TabPane>
))} ))}
</Tabs> </Tabs>
{/* <Timeline mode={mode}>
{arr.map((item, index) => (
<Item label={item.label} key={item.key}>
{item.content}
</Item>
))}
</Timeline> */}
</div> </div>
</div> </div>
); );
...@@ -40,53 +32,53 @@ const ColConen = () => { ...@@ -40,53 +32,53 @@ const ColConen = () => {
const arr = [ const arr = [
{ {
key: '1', key: '1',
label: 'v1.0.1 2020-12-18', label: 'v1.0.20201218 ',
content: ( content: (
<div className={styles.hr}> <div className={styles.hr}>
<div className={styles.topBox}> <div className={styles.topBox}>
<div className={styles.topl}>v1.0.1</div> <div className={styles.topl}>v1.0.20201218</div>
<div className={styles.topr}>2020-12-18</div> <div className={styles.topr}>2020-12-18</div>
</div> </div>
<hr /> <hr />
<h3>移动应用配置</h3> <h3>移动应用配置</h3>
<ul> <ul>
<li>[+] 新增了版本包上传功能</li> <li>【新增】 新增了版本包上传功能</li>
<li>[^] 调整了获取版本包信息</li> <li>【修改】 调整了获取版本包信息</li>
<li>[^] 优化了应用加载内容</li> <li>【修改】 优化了应用加载内容</li>
</ul> </ul>
<h3>登录页面</h3> <h3>登录页面</h3>
<ul> <ul>
<li>[^] 调整了登录窗布局</li> <li>【修改】 调整了登录窗布局</li>
</ul> </ul>
<h3>系统日志</h3> <h3>系统日志</h3>
<ul> <ul>
<li>[^] 服务日志页面做了优化</li> <li>【修改】 服务日志页面做了优化</li>
<li>[^] 登录日志页面做了优化</li> <li>【修改】 登录日志页面做了优化</li>
<li>[^] 运维日志页面做了优化</li> <li>【修改】 运维日志页面做了优化</li>
</ul> </ul>
</div> </div>
), ),
}, },
{ {
key: '0', key: '0',
label: `v1.0.0 2020-12-17`, label: `v1.0.20201217 `,
content: ( content: (
<div className={styles.hr}> <div className={styles.hr}>
<div className={styles.topBox}> <div className={styles.topBox}>
<div className={styles.topl}>v1.0.0</div> <div className={styles.topl}>v1.0.20201217</div>
<div className={styles.topr}>2020-12-17</div> <div className={styles.topr}>2020-12-17</div>
</div> </div>
<hr /> <hr />
<h3>运维第一个版本记录</h3> <h3>运维第一个版本记录</h3>
<ul> <ul>
<li> <li>
[+] 【新增】
新增了解决方案管理、数据库管理、用户中心、平台中心、应用中心、数据中心、系统日志板块 新增了解决方案管理、数据库管理、用户中心、平台中心、应用中心、数据中心、系统日志板块
</li> </li>
<li>[+] 新增了版本记录模块</li> <li>【新增】 新增了版本记录模块</li>
<li>[^] 登录页面修改了动画效果</li> <li>【优化】 登录页面修改了动画效果</li>
<li>[^] 移动应用配置模块进行了部分翻新</li> <li>【优化】 移动应用配置模块进行了部分翻新</li>
<li>[^] 业务平台模块修改了交互方式</li> <li>【优化】 业务平台模块修改了交互方式</li>
</ul> </ul>
</div> </div>
), ),
......
import React, { useEffect } from 'react'; import React, { useEffect, useState } from 'react';
import { useHistory } from 'react-router-dom'; import { useHistory } from 'react-router-dom';
import { Modal, Button } from 'antd';
import ColConen from './colContent';
import styles from './index.less'; import styles from './index.less';
const Colophon = props => { const Colophon = props => {
const historyPath = useHistory(); const historyPath = useHistory();
const [visible, setVisible] = useState(false);
const handleClick = () => { const handleClick = () => {
historyPath.push('/colophon'); // historyPath.push('/colophon');
console.log(historyPath); console.log(historyPath);
setVisible(true);
}; };
return ( return (
<div className={styles.desc} onClick={handleClick}> <div className={styles.desc} onClick={handleClick}>
版本记录 <div>版本号v1.0.20201218</div>
<div onClick={e => e.stopPropagation()}>
<Modal
width={1200}
visible={visible}
footer={[
<Button
style={{ marginRight: '10px' }}
type="primary"
key="close"
onClick={() => setVisible(false)}
>
确认
</Button>,
]}
onCancel={() => setVisible(false)}
>
<ColConen />
</Modal>
</div>
</div> </div>
); );
}; };
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
height: 100px; height: 100px;
text-align: center; text-align: center;
color: #333; color: #333;
} }
.log{ .log{
font-size: 40px; font-size: 40px;
...@@ -24,18 +25,26 @@ ...@@ -24,18 +25,26 @@
.logbox{ .logbox{
width: 100%; width: 100%;
max-height: calc(100vh - 200px); max-height: calc(100vh - 200px);
background-color: #f6f6f6; // background-color: #f6f6f6;
// border: 1px solid #f6f6f6;
text-align: left; text-align: left;
overflow: hidden; overflow: hidden;
.ant-tabs-content-holder{
overflow-y: scroll;
}
} }
.hr{ .hr{
margin-right: 20px; margin-right: 20px;
li{
color: gray;
}
} }
.topBox{ .topBox{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
height: 40px; height: 40px;
align-items: center; align-items: center;
} }
.topl{ .topl{
font-size: 22px; font-size: 22px;
......
...@@ -4,6 +4,7 @@ import { useHistory } from 'react-router-dom'; ...@@ -4,6 +4,7 @@ import { useHistory } from 'react-router-dom';
import classnames from 'classnames'; import classnames from 'classnames';
import styles from './index.less'; import styles from './index.less';
import weixiu from '@/assets/images/logo/weixiu.svg'; import weixiu from '@/assets/images/logo/weixiu.svg';
import jumpImg from '@/assets/images/logo/jumpImg.png';
const JumpContainer = props => { const JumpContainer = props => {
const [url, setUrl] = useState(''); const [url, setUrl] = useState('');
const jumpTo = useHistory(); const jumpTo = useHistory();
...@@ -22,30 +23,28 @@ const JumpContainer = props => { ...@@ -22,30 +23,28 @@ const JumpContainer = props => {
return ( return (
<> <>
<div className={classnames(`${styles.box}`)}> <div className={classnames(`${styles.box}`)}>
{url && (
<a
target="_blank"
href={url}
rel="noopener noreferer"
className={classnames({
[styles.link]: true,
})}
>
跳转链接
</a>
)}
<img <img
src={weixiu} src={jumpImg}
alt="" alt=""
className={classnames({ className={classnames({
[styles.imgs]: true, [styles.imgs]: true,
})} })}
/> />
<p className={styles.desc}>业务平台建设中,点击链接跳转旧版运维平台</p> <p className={styles.desc}>
{/* <Empty 业务平台建设中,点击链接跳转
image={Empty.PRESENTED_IMAGE_SIMPLE} {url && (
description="业务平台建设中,点击链接跳转老运维平台" <a
/> */} target="_blank"
href={url}
rel="noopener noreferer"
className={classnames({
[styles.link]: true,
})}
>
旧版运维平台
</a>
)}
</p>
</div> </div>
</> </>
); );
......
...@@ -9,26 +9,20 @@ ...@@ -9,26 +9,20 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
background-color: #F6F6F6;
border-radius:8px;
box-shadow: 10px 10px 5px #888888;
} }
.imgs{ .imgs{
margin-top: 20px; width: 800px;
width: 60px; height: 600px;
height: 60px;
} }
.desc{ .desc{
margin-top: 10px; margin-top: 10px;
color: gray; color: gray;
font-size: 12px; font-size: 16px;
} }
.link{ .link{
display: flex; // display: flex;
justify-content: center ; // justify-content: center ;
align-items: center; // align-items: center;
padding: 5px; // padding: 5px;
color: #1890ff; color: #1890ff;
} }
\ No newline at end of file
...@@ -180,11 +180,11 @@ const MobileConfigPage = props => { ...@@ -180,11 +180,11 @@ const MobileConfigPage = props => {
{activeKey === tabArr[1].key && tabArr[1].component} {activeKey === tabArr[1].key && tabArr[1].component}
</TabPane> </TabPane>
)} )}
{showConfig && subType !== 'add' && ( {/* {showConfig && subType !== 'add' && (
<TabPane tab={tabArr[2].title} key={tabArr[2].key}> <TabPane tab={tabArr[2].title} key={tabArr[2].key}>
{activeKey === tabArr[2].key && tabArr[2].component} {activeKey === tabArr[2].key && tabArr[2].component}
</TabPane> </TabPane>
)} )} */}
{showConfig && subType !== 'add' && ( {showConfig && subType !== 'add' && (
<TabPane tab={tabArr[3].title} key={tabArr[3].key}> <TabPane tab={tabArr[3].title} key={tabArr[3].key}>
{activeKey === tabArr[3].key && tabArr[3].component} {activeKey === tabArr[3].key && tabArr[3].component}
......
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { message, Form, Input, notification, Button, Select } from 'antd'; import { message, Form, Input, notification, Button, Select, Card } from 'antd';
import { import {
getSevenParams, getSevenParams,
getSevenParamsByTransType, getSevenParamsByTransType,
...@@ -212,7 +212,7 @@ const SevenParams = props => { ...@@ -212,7 +212,7 @@ const SevenParams = props => {
}, []); }, []);
return ( return (
<div style={{ width: '100%', paddingLeft: '15px' }} className={props.cls}> <Card className={styles.cardBox}>
<p className={styles.title}>七参数配置:</p> <p className={styles.title}>七参数配置:</p>
<Form <Form
form={sevenForm} form={sevenForm}
...@@ -339,7 +339,7 @@ const SevenParams = props => { ...@@ -339,7 +339,7 @@ const SevenParams = props => {
</Button> </Button>
</Form.Item> </Form.Item>
</Form> </Form>
</div> </Card>
); );
}; };
......
.box{ .box{
min-height: calc( 100vh - 242px)!important; min-height: calc( 100vh - 232px)!important;
display: flex; display: flex;
} }
.left{ .left{
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
padding: 0 15px; padding: 0 15px;
min-height: 300px; min-height: calc( 100vh - 232px)!important;
} }
.title{ .title{
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
.VersionPublish { .VersionPublish {
display: flex; display: flex;
padding: 0 15px; padding: 0 15px;
min-height: 300px; min-height: calc( 100vh - 232px)!important;
} }
.row { .row {
...@@ -30,4 +30,9 @@ ...@@ -30,4 +30,9 @@
} }
.label2 { .label2 {
flex-shrink: 0; flex-shrink: 0;
}
.cardBox{
margin-top: 15px;
min-height: calc(100vh - 135px);
// min-height: calc(100vh - 255px);
} }
\ No newline at end of file
...@@ -34,7 +34,8 @@ import MobileConfigPage from '@/pages/mobileConfig'; ...@@ -34,7 +34,8 @@ import MobileConfigPage from '@/pages/mobileConfig';
import { USER_MODE } from '@/utils/constants'; import { USER_MODE } from '@/utils/constants';
import BaseFrameContainer from '@/components/BaseFrameContainer'; import BaseFrameContainer from '@/components/BaseFrameContainer';
import JumpContainer from '@/components/JumpContainer'; import JumpContainer from '@/components/JumpContainer';
import ColConen from '@/components/Colophon/colContent'; // import ColConen from '@/components/Colophon/colContent';
const iconStyle = { verticalAlign: '0.125em' }; const iconStyle = { verticalAlign: '0.125em' };
const superAuthority = [USER_MODE.SUPER]; const superAuthority = [USER_MODE.SUPER];
...@@ -71,12 +72,6 @@ export default { ...@@ -71,12 +72,6 @@ export default {
authority: superAuthority, authority: superAuthority,
component: CurrentSolution, component: CurrentSolution,
}, },
{
path: '/colophon',
name: '版本记录',
hideMenu: true,
component: ColConen,
},
{ {
path: '/dbm', path: '/dbm',
name: '数据库管理', name: '数据库管理',
...@@ -154,11 +149,15 @@ export default { ...@@ -154,11 +149,15 @@ export default {
url: url:
'/web4/?widget=product/Tool/MapSettings/MapSettings|hideMap=true', '/web4/?widget=product/Tool/MapSettings/MapSettings|hideMap=true',
}, },
{
tabName: '七参数配置',
type: 'sevenParams',
},
], ],
}, },
{ {
path: '/platformCenter/iot', path: '/platformCenter/iot',
name: '物联平台', name: '物联平台',
component: BaseFrameContainer, component: BaseFrameContainer,
tabs: [ tabs: [
{ {
......
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