Commit 86f12ab6 authored by 邓超's avatar 邓超

fix: 添加文档说明功能

parent 98a67b67
import React, { useContext, useState } from 'react';
import React, { useContext, useState, useEffect } from 'react';
import { RouteContext } from '@ant-design/pro-layout';
import { Breadcrumb } from 'antd';
import check from '@/components/Authorized/CheckPermissions';
import { Link } from 'react-router-dom';
import { Link, useLocation } from 'react-router-dom';
import HeaderSearch from '../HeaderSearch';
import Colophon from '../Colophon';
import Avatar from './AvatarDropdown';
......@@ -33,6 +33,12 @@ const routesOptions = route => {
const GlobalHeaderRight = props => {
const { theme, layout } = props;
const [dosRouter, setDosRouter] = useState('');
const { pathname } = useLocation();
useEffect(() => {
console.log(pathname, 'location');
setDosRouter(pathname);
}, [pathname]);
let className = styles.right;
const value = useContext(RouteContext);
......@@ -45,6 +51,15 @@ const GlobalHeaderRight = props => {
{/* <span className={styles.left}>{value.title}</span> */}
<Breadcrumb {...value.breadcrumb} className={styles.lineHeight} />
<div style={{ flex: 1 }} />
<div style={{ margin: '0 10px' }}>
<a
target="_blank"
href={`${window.location.origin}/civmanage/site/content${dosRouter}`}
rel="noopener noreferer"
>
文档说明
</a>
</div>
<Colophon />
<div style={{ margin: '0 10px' }}>
<a
......
.formStyle{
margin-bottom: 40px;
padding-bottom: 30px;
// height: 100%;
// overflow-y: scroll;
}
......
......@@ -22,6 +22,7 @@
}
.imgList{
display: flex;
flex-wrap: wrap;
}
.imgItem{
display: flex;
......
......@@ -62,7 +62,7 @@ const AddModal = props => {
onOk={() => onSubmit()}
confirmLoading={loading}
>
<div style={{ width: "750px", height: "400px", overflowY: "scroll", overflowX: "hidden" }}>
<div style={{ width: "750px", height: "500px", overflowY: "scroll", overflowX: "hidden" }}>
<Form form={form} {...layout} onFinish={onSubmitSuccess}>
<Item
label="模板名称"
......
......@@ -70,7 +70,7 @@ const EditModal = props => {
onOk={() => onSubmit()}
confirmLoading={loading}
>
<div style={{ width: "750px", height: "400px", overflowY: "scroll", overflowX: "hidden" }}>
<div style={{ width: "750px", height: "500px", overflowY: "scroll", overflowX: "hidden" }}>
<Form form={form} {...layout} onFinish={onSubmitSuccess}>
<Row gutter={24}>
<Col span={11}>
......
......@@ -21,6 +21,7 @@
}
.imgList{
display: flex;
flex-wrap: wrap;
}
.imgItem{
display: flex;
......
.formStyle{
margin-bottom: 40px;
padding-bottom: 30px;
}
.rolebox{
......
......@@ -41,7 +41,7 @@ import HostManager from '@/pages/platformCenter/hostmanager';
import MessageManager from '@/pages/platformCenter/messageManage';
import VideoManager from '@/pages/platformCenter/videoManager';
import SchemeDetail from '@/pages/platformCenter/schemeDetail/schemeDetail';
import SchemeConfig from '@/pages/platformCenter/schemeConfig/schemeConfig';
import SchemeConfig from '@/pages/platformCenter/schemeConfig/SchemeConfig';
import DimensionsConfig from '@/pages/platformCenter/dimensionsConfig/dimensionsConfig';
import TaskScheduling from '@/pages/artificial/taskScheduling/taskScheduling';
......
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