diff --git a/src/assets/style/editReport.css b/src/assets/style/editReport.css index 804b22d..04db474 100644 --- a/src/assets/style/editReport.css +++ b/src/assets/style/editReport.css @@ -1,3 +1,22 @@ -.simulate-table{ +.simulate-table { text-align: center; -} \ No newline at end of file + padding: 10px; + border-radius: 0px; +} + +.backTop { + height: 40px; + width: 40px; + line-height: 40px; + border-radius: 4px; + background-color: #1088e9; + color: #fff; + text-align: center; + font-size: 14px; +} + +.paragraph_name{ + display: block; + margin: 20px 0; + font-size: 14px; +} diff --git a/src/assets/style/general.css b/src/assets/style/general.css index 596db0a..1118880 100644 --- a/src/assets/style/general.css +++ b/src/assets/style/general.css @@ -73,7 +73,7 @@ body, height: 90% !important; } -.ant-input{ +.ant-input { /* padding: 10px ; */ } @@ -190,29 +190,16 @@ span { margin-bottom: 20px; } -.block{ +.block { display: block; margin: 5px 0; } -.ant-table-cell{ +.ant-table-cell { font-size: 12px; } -.paragraph_name{ - display: block; - margin: 20px 0; - font-weight: 800; - font-size: 14px; -} - -.paragraph_content{ - display: block; - margin: 20px 0; -} - -.react-pdf__Page{ +.react-pdf__Page { display: flex; justify-content: center; -} - +} \ No newline at end of file diff --git a/src/pages/home/branch/manage/rate/branch/editReport.js b/src/pages/home/branch/manage/rate/branch/editReport.js index 0138481..315874b 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 } from 'antd' +import { Input, Button, Row, Col, Tree,BackTop } from 'antd' import "@/assets/style/editReport.css" class EditReport extends Component { @@ -28,7 +28,6 @@ class EditReport extends Component { title: item['章节'], key: index.toString(), children: item["章节内容"].map((item_1, index_1) => { return { title: item_1['小节'], key: index.toString() + index_1.toString(), children: item_1["小节内容"].map((item_2, index_2) => { - console.log(item_2) return { title: Object.keys(item_2)[0], key: index.toString() + index_1.toString() + index_2.toString() } }) } @@ -39,18 +38,19 @@ class EditReport extends Component { return data } - onSelect = (value) =>{ - console.log(value) + onSelect = (value) => { + const Dom = document.getElementById(value) + if (Dom) { + Dom.scrollIntoView({ behavior: 'smooth', block: 'start' }) + } } simulate = (value, i, j, m, n) => { return value.map((item, index_first) => { - return + return { item.map((ele, index_second) => { - return - - + return }) } @@ -133,32 +133,32 @@ class EditReport extends Component { return ( - -
UP
+ + - + {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}: + {key}: {this.simulate(item_child_child[key], i, j, m, n)} : - {key}: + {key}: @@ -167,7 +167,8 @@ class EditReport extends Component { } })} - })} + })} + diff --git a/src/pages/home/side.js b/src/pages/home/side.js index 0aa6679..292e4b4 100644 --- a/src/pages/home/side.js +++ b/src/pages/home/side.js @@ -29,9 +29,7 @@ class Side extends Component { // const title = preProps.panes.filter(item => { // return item.key === preProps.activeKey ? item.title : null // }) - } - } handleClick = e => {