From 955d94d6a5b58131f6ae4be5a2f2a839e69e4947 Mon Sep 17 00:00:00 2001
From: timorls <318739742@qq.com>
Date: Fri, 4 Mar 2022 17:21:41 +0800
Subject: [PATCH] mode
---
src/assets/style/editReport.css | 8 +++-----
.../branch/manage/rate/branch/editReport.js | 20 +++++++++----------
src/pages/home/content.js | 12 +++++++++++
src/pages/home/side.js | 13 ++++++++++--
4 files changed, 36 insertions(+), 17 deletions(-)
diff --git a/src/assets/style/editReport.css b/src/assets/style/editReport.css
index 04db474..a1f6cf2 100644
--- a/src/assets/style/editReport.css
+++ b/src/assets/style/editReport.css
@@ -15,8 +15,6 @@
font-size: 14px;
}
-.paragraph_name{
- display: block;
- margin: 20px 0;
- font-size: 14px;
-}
+/* p>.ant-tag{
+ margin: 20px 0;
+} */
diff --git a/src/pages/home/branch/manage/rate/branch/editReport.js b/src/pages/home/branch/manage/rate/branch/editReport.js
index 315874b..46dffd3 100644
--- a/src/pages/home/branch/manage/rate/branch/editReport.js
+++ b/src/pages/home/branch/manage/rate/branch/editReport.js
@@ -1,6 +1,6 @@
import React, { Component } from 'react';
import api from "@/api/request"
-import { Input, Button, Row, Col, Tree,BackTop } from 'antd'
+import { Input, Button, Row, Col, Tree,BackTop,Tag } from 'antd'
import "@/assets/style/editReport.css"
class EditReport extends Component {
@@ -142,25 +142,25 @@ class EditReport extends Component {
treeData={this.state.tree}
onSelect={this.onSelect}
/>
-
+
{this.state.data.map((item, i) => {
- return
+ return
{item["章节"]}
-
+
{item["章节内容"].map((item_child, j) => {
- return {item_child["小节"]}
+ return {item_child["小节"]}
{
item_child["小节内容"].map((item_child_child, m) => {
return Object.keys(item_child_child).map((key, n) => {
return key === "表格" ?
- {key}:
- {this.simulate(item_child_child[key], i, j, m, n)}
+ {key}:
+ {this.simulate(item_child_child[key], i, j, m, n)}
:
- {key}:
- {key}:
+
+ onChange={this.onOutput.bind(this, i, j, m, n)} />
})
})
diff --git a/src/pages/home/content.js b/src/pages/home/content.js
index ca68414..20306c7 100644
--- a/src/pages/home/content.js
+++ b/src/pages/home/content.js
@@ -12,6 +12,8 @@ import AnalysisDetails from './branch/manage/industry/branch/analysisDetails'
import UserSet from './branch/setting/user'
import EmptyContent from "./empty"
import { connect } from 'react-redux';
+import { CloseOutlined } from '@ant-design/icons';
+import { Button } from 'antd';
import { Tabs, Empty } from 'antd';
@@ -85,6 +87,10 @@ class Main extends Component {
store.dispatch(operationAction(newPanes, newActiveKey))
};
+ clearAll = () => {
+ store.dispatch(operationAction([],'0'))
+ }
+
getBranch = (props, name) => {
var id
if (name.match(/\((.+)\)/g)) {
@@ -141,6 +147,12 @@ class Main extends Component {
onChange={this.onChange}
activeKey={this.props.activeKey}
onEdit={this.onEdit}
+ tabBarExtraContent={{
+ right: }
+ />,
+ }}
>
{this.props.panes.map(pane => (
diff --git a/src/pages/home/side.js b/src/pages/home/side.js
index 292e4b4..1ac484d 100644
--- a/src/pages/home/side.js
+++ b/src/pages/home/side.js
@@ -24,11 +24,15 @@ class Side extends Component {
}
componentDidUpdate(preProps, preState) {
- console.log(preProps, preState)
if (preProps.activeKey !== preState.currentKey) {
// const title = preProps.panes.filter(item => {
// return item.key === preProps.activeKey ? item.title : null
// })
+ // this.setState({
+ // currentKey:preState.data.filter((item,index)=>{
+ // return title === item.title?index.toString():'0'
+ // })
+ // })
}
}
@@ -39,12 +43,16 @@ class Side extends Component {
})
}
+ handleCurrentClick = e =>{
+ this.setState({ currentKey: e.key });
+ }
+
render() {
const menus = localStorage.getItem("menus").split(',') || ['Board', 'Manage', 'Model', 'Test', 'Setting']
const menuItem = menus.map((item, i) => {
return
{this.state.data.map((ele, index) => {
- return ele.category === item ? {ele.title} : null
+ return ele.category === item ? {ele.title} : null
})}
})
@@ -57,6 +65,7 @@ class Side extends Component {
style={{ height: '100%', borderRight: 0, position: 'fixed', width: '220px' }}
theme="dark"
className='menu'
+ onClick={this.handleCurrentClick}
>
{menuItem}