This commit is contained in:
xuyucheng 2022-03-17 17:40:34 +08:00
parent db12e131b2
commit 6fd919b17b
19 changed files with 288 additions and 22659 deletions

22429
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -105,20 +105,6 @@ span {
color: #fff
}
.badge {
position: relative;
top: 20px;
left: 0;
width: 20px;
height: 20px;
font-size: 14px;
line-height: 20px;
text-align: center;
background-color: #fe2d46;
color: #fff;
z-index: 999;
}
.gutter-row {
display: flex;
justify-content: center;
@ -208,7 +194,7 @@ span {
width: 100%;
height: auto;
display: flex;
justify-content: space-around;
justify-content: center;
flex-wrap: nowrap;
}
@ -233,22 +219,30 @@ span {
.line {
width: 1px;
height: 30px;
background: #1890ff;
background: #bfbfbf;
}
.connect{
width: 100%;
.connect {
width: 1550px;
position: absolute;
display: flex;
justify-content: center;
}
.connect-line{
width: 100%;
.connect-line {
/* width: 100%; */
height: 1px;
background: #1890ff;
background: #bfbfbf;
}
.process-middle{
.process-middle {
width: 100%;
display: flex;
justify-content: center;
}
.badge {
width: 10px;
height: 10px;
border-radius: 50%;
}

View File

@ -12,13 +12,8 @@ class FeTable extends Component {
static getDerivedStateFromProps(props, state) {
if (props.data !== state.data && props.data) {
console.log(props.data.map((item,index)=>{
return Object.assign(item,{key:index})
}))
return {
data: props.data.map((item,index)=>{
return Object.assign(item,{key:index})
}),
data: props.data,
columns: props.columns
}
}

View File

@ -4,7 +4,7 @@ import "echarts/lib/chart/line";
import "echarts/lib/chart/pie";
import 'echarts/lib/component/grid'
import "echarts/lib/component/tooltip"
import { Card, Row, Col, Button } from 'antd';
import { Card, Row, Col, } from 'antd';
import api from "@/api/request"
import { connect } from 'react-redux';
import store from "@/store/index"
@ -25,7 +25,7 @@ class Dashboard extends Component {
dataIndex: '详 情',
key: 3,
align: 'center',
render: () => <Button type="primary" size='small'> </Button>,
render: () => <span style={{ color: '#108ee9',cursor:'pointer' }}> </span>
},
]
}

View File

@ -1,5 +1,5 @@
import React, { Component } from 'react'
import { Input, Button } from 'antd'
import { Input } from 'antd'
import FeTable from '@/components/table'
import api from "@/api/request"
import { connect } from 'react-redux';
@ -17,6 +17,10 @@ class ManageCompany extends Component {
}
}
componentDidMount() {
this.onSearch("")
}
onSearch = (value) => {
api.post("/admin/company/search", { query: value, skip: 0, limit: 10 }).then(res => {
const col = Object.keys(res.result[0]).map((key, i) => {
@ -29,7 +33,7 @@ class ManageCompany extends Component {
dataIndex: '详 情',
key: col.length,
align: 'center',
render: () => <Button type="primary"> </Button>,
render: () => <span style={{ color: '#108ee9',cursor:'pointer' }}> </span>
})
this.setState({
data: res.result,
@ -46,7 +50,7 @@ class ManageCompany extends Component {
return item.title === value["企业名称"] + '(' + value["企业ID"] + ')' ? false : true
})
if (state) {
newPanes.push({ title: value["企业名称"] + '(' + value["企业ID"] + ')', content: "/manager/company/details", key: (Number(newPanes[newPanes.length - 1].key) + 1).toString() });
newPanes.push({ title: value["企业名称"] + '(' + value["企业ID"] + ')', content: "/manager/company/details", key: (Number(newPanes[newPanes.length - 1].key) + 1).toString(), id: { cid: value["企业ID"] } });
store.dispatch(operationAction(newPanes, (newPanes[newPanes.length - 1].key)))
} else {
return null

View File

@ -1,5 +1,5 @@
import React, { Component } from 'react'
import { Descriptions, Card,Tag,Button } from 'antd'
import { Descriptions, Card, Tag, } from 'antd'
import api from "@/api/request"
import FeTable from '@/components/table'
import Pdf from "@/components/pdf"
@ -25,7 +25,7 @@ class CompanyDetails extends Component {
isJump = false
componentDidMount() {
api.post("/admin/company/index", { cid: this.props.id })
api.post("/admin/company/index", { cid: this.props.cid })
.then(res => {
this.setState({
data: res.result,
@ -41,34 +41,36 @@ class CompanyDetails extends Component {
})
}
analysisColumns(val) {
analysisColumns(val, index) {
if (val !== [] && val) {
if(val[0]){
if (val[0]) {
const col = Object.keys(val[0]).map((key, i) => {
return key === "证书" || key === "报告" ? {
title: key,
dataIndex: key,
key: i,
align: 'center',
render: (record) => <Button type="primary" onClick={this.handleClick.bind(this, record)}> </Button>,
render: (record) => <span style={{ color: '#108ee9',cursor:'pointer' }} onClick={this.handleClick.bind(this, record)}> </span>,
} : {
title: key, dataIndex: key, align: 'center', key: i
}
})
col.push({
title: '详 情',
dataIndex: '详 情',
key: col.length,
align: 'center',
render: () => <Button type="primary"> </Button>,
})
if (index === 1) {
col.push({
title: '详 情',
dataIndex: '详 情',
key: col.length,
align: 'center',
render: () => <span style={{ color: '#108ee9',cursor:'pointer' }}> </span>
})
}
return col
}
}
}
handleClick(value) {
console.log(value)
this.isJump = true
this.setState({
visible: true,
@ -109,16 +111,16 @@ class CompanyDetails extends Component {
return (
<React.Fragment>
<Card>
<Pdf file={this.state.file} visible={this.state.visible} callback={this.setVisible.bind(this)}></Pdf>
<Descriptions title={this.state.data["企业名称"]} bordered extra={<Tag color={this.state.data["已认证"]==='是'?'#108ee9':'#f50 '}>已认证{this.state.data["已认证"]}</Tag>}>
<Pdf file={this.state.file} visible={this.state.visible} callback={this.setVisible.bind(this)}></Pdf>
<Descriptions title={this.state.data["企业名称"]} bordered extra={<Tag color={this.state.data["已认证"] === '是' ? '#108ee9' : '#f50 '}>已认证{this.state.data["已认证"]}</Tag>}>
{this.state.businessInformation}
</Descriptions>
<p>股东信息</p>
<FeTable data={this.state.shareholdersInformation} columns={this.analysisColumns(this.state.shareholdersInformation)}></FeTable>
<FeTable data={this.state.shareholdersInformation} columns={this.analysisColumns(this.state.shareholdersInformation, 0)}></FeTable>
<p>主要成员</p>
<FeTable data={this.state.companyMember} columns={this.analysisColumns(this.state.companyMember)}></FeTable>
<FeTable data={this.state.companyMember} columns={this.analysisColumns(this.state.companyMember, 0)}></FeTable>
<p>评价记录</p>
<FeTable data={this.state.evaluationRecords} columns={this.analysisColumns(this.state.evaluationRecords)} callback={this.callback.bind(this)}></FeTable>
<FeTable data={this.state.evaluationRecords} columns={this.analysisColumns(this.state.evaluationRecords, 1)} callback={this.callback.bind(this)}></FeTable>
</Card>
</React.Fragment>
)

View File

@ -43,6 +43,10 @@ class IndustryAnalysis extends Component {
}
}
componentDidMount() {
this.onSearch("")
}
form = React.createRef()
setVisible = () => {

View File

@ -38,7 +38,7 @@ class AnalysisDetails extends Component {
dataIndex: key,
key: i,
align: 'center',
render: (record) => <Button type="primary" onClick={this.handleClick.bind(this, record)}> </Button>,
render: (record) => <span style={{ color: '#108ee9',cursor:'pointer' }} onClick={this.handleClick.bind(this, record)}> </span>
} : {
title: key, dataIndex: key, align: 'center', key: i
}

View File

@ -14,6 +14,11 @@ class IndustryData extends Component {
}
}
componentDidMount() {
this.onSearch("")
}
onSearch = (value) => {
api.post("/admin/macro/search_macro_data", {
"一级行业": value['一级行业'],

View File

@ -19,6 +19,11 @@ class IndustryReport extends Component {
macroFileForm = React.createRef()
componentDidMount() {
this.onSearch({industry:"",time:""})
}
onSearch = (value) => {
api.post("/admin/macro/search_macroscopic_report", {
"industry": value.industry,
@ -35,7 +40,7 @@ class IndustryReport extends Component {
dataIndex: key,
key: i,
align: 'center',
render: (record) => <Button type="primary" onClick={this.handleClick.bind(this, record)}> </Button>,
render: (record) => <span style={{ color: '#108ee9',cursor:'pointer' }} onClick={this.handleClick.bind(this, record)}> </span>
} : {
title: key, dataIndex: key, align: 'center', key: i
}

View File

@ -1,6 +1,6 @@
import React, { Component } from 'react';
import api from "@/api/request"
import { Input, Button, Row, Col, Tree,BackTop,Tag } from 'antd'
import { Input, Button, Row, Col, Tree, BackTop, Tag, Empty } from 'antd'
import "@/assets/style/editReport.css"
class EditReport extends Component {
@ -13,29 +13,29 @@ class EditReport extends Component {
}
componentDidMount() {
api.post("/admin/rating/get_report_text_model", { rid: this.props.id })
const url = this.props.value.types === "综合评价流程" ? "/admin/rating/get_report_text_model" : "/admin/rating/get_esg_report_text"
api.post(url, { rid: this.props.value.rid })
.then(res => {
this.setState({
data: res.result['text_model'],
tree: this.createTree(res.result['text_model'])
data: res.result['text_model']?res.result['text_model']:[],
tree: res.result['text_model']?this.createTree(res.result):[]
})
})
}
createTree = (val) => {
const data = val.map((item, index) => {
return {
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) => {
return { title: Object.keys(item_2)[0], key: index.toString() + index_1.toString() + index_2.toString() }
})
}
})
}
})
return data
const data = val['text_model'].map((item, index) => {
return {
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) => {
return { title: Object.keys(item_2)[0], key: index.toString() + index_1.toString() + index_2.toString() }
})
}
})
}
})
return data
}
onSelect = (value) => {
@ -47,7 +47,7 @@ class EditReport extends Component {
simulate = (value, i, j, m, n) => {
return value.map((item, index_first) => {
return <Row className="simulate" justify="start" style={{flexWrap:'nowrap'}}>
return <Row className="simulate" justify="start" style={{ flexWrap: 'nowrap' }}>
{
item.map((ele, index_second) => {
return <Input defaultValue={ele} className="simulate-table" onChange={this.onSimulate.bind(this, i, j, m, n, index_first, index_second)} />
@ -133,45 +133,45 @@ class EditReport extends Component {
return (
<React.Fragment>
<BackTop><div className='backTop'>UP</div></BackTop>
<Row style={{paddingRight: 20}}>
<Col span={3}><Tree
defaultExpandedKeys={['000', '001']}
defaultSelectedKeys={['000', '001']}
defaultCheckedKeys={['000', '001']}
treeData={this.state.tree}
onSelect={this.onSelect}
/></Col>
<Col span={21}><Button onClick={this.onFinish} type='primary' style={{position:'absolute',right:0}}>输出</Button>
{this.state.data.map((item, i) => {
return <React.Fragment><p><Tag color="#3b5999" id={i.toString()} >
{item["章节"]}
</Tag></p>
{item["章节内容"].map((item_child, j) => {
return <React.Fragment><p><Tag color="#55acee" id={i.toString() + j.toString()}>{item_child["小节"]}</Tag></p>
{
item_child["小节内容"].map((item_child_child, m) => {
return Object.keys(item_child_child).map((key, n) => {
return key === "表格" ? <React.Fragment>
<p><Tag color="#87d068" id={i.toString() + j.toString() + m.toString()} >{key}:</Tag></p>
<p>{this.simulate(item_child_child[key], i, j, m, n)}</p>
</React.Fragment>
: <React.Fragment>
{this.state.data.length !== 0 ? <>
<BackTop><div className='backTop'>UP</div></BackTop>
<Row style={{ paddingRight: 20 }}>
<Col span={3}><Tree
defaultExpandedKeys={['000', '001']}
defaultSelectedKeys={['000', '001']}
defaultCheckedKeys={['000', '001']}
treeData={this.state.tree}
onSelect={this.onSelect}
/></Col>
<Col span={21}><Button onClick={this.onFinish} type='primary' style={{ position: 'absolute', right: 0 }}>输出</Button>
{this.state.data.map((item, i) => {
return <React.Fragment><p><Tag color="#3b5999" id={i.toString()} >
{item["章节"]}
</Tag></p>
{item["章节内容"].map((item_child, j) => {
return <React.Fragment><p><Tag color="#55acee" id={i.toString() + j.toString()}>{item_child["小节"]}</Tag></p>
{
item_child["小节内容"].map((item_child_child, m) => {
return Object.keys(item_child_child).map((key, n) => {
return key === "表格" ? <React.Fragment>
<p><Tag color="#87d068" id={i.toString() + j.toString() + m.toString()} >{key}:</Tag></p>
<p><Input.TextArea
defaultValue={item_child_child[key]}
onChange={this.onOutput.bind(this, i, j, m, n)} /></p>
<p>{this.simulate(item_child_child[key], i, j, m, n)}</p>
</React.Fragment>
: <React.Fragment>
<p><Tag color="#87d068" id={i.toString() + j.toString() + m.toString()} >{key}:</Tag></p>
<p><Input.TextArea
defaultValue={item_child_child[key]}
onChange={this.onOutput.bind(this, i, j, m, n)} /></p>
</React.Fragment>
})
})
})
} </React.Fragment>
})}
</React.Fragment>
})}
</Col>
</Row>
} </React.Fragment>
})}
</React.Fragment>
})}
</Col>
</Row>
</> : <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description="暂无数据" />}
</React.Fragment>
)
}

View File

@ -1,6 +1,6 @@
import React, { Component } from 'react'
import api from "@/api/request"
import { Descriptions,Tag } from 'antd'
import { Descriptions, Tag, Empty } from 'antd'
import FeTable from '@/components/table'
class FillDetails extends Component {
@ -13,7 +13,8 @@ class FillDetails extends Component {
}
componentDidMount() {
api.post("/admin/rating/details", { rid: this.props.id })
const url = this.props.value.types === "综合评价流程" ? "/admin/rating/details" : "/admin/rating/esg_details"
api.post(url, { rid: this.props.value.rid })
.then(res => {
this.setState({
data: res.result.length !== 0 ? res.result[0] : [],
@ -86,13 +87,16 @@ class FillDetails extends Component {
render() {
return (
<React.Fragment>
<Descriptions title={this.state.data["企业名称"]} bordered extra={<Tag color="#108ee9">企业ID{this.state.data["企业ID"]}</Tag>}></Descriptions>
<p><Tag color="#87d068">评价年度{this.state.data["评价年度"]}</Tag><Tag color="#87d068" style={{ float: 'right' }}>{(() => { if ("行业选择" in this.state.data && this.state.data["行业选择"] !== null) { return this.state.data["行业选择"].join("/") } else { return null } })()}</Tag></p>
<Tag color="#108ee9">经营问卷</Tag>
<Descriptions bordered>
{this.analysisQuestion(this.state.data["经营问卷"])}
</Descriptions>
{this.analysisObject(this.state.financialFill)}
{this.state.data.length!==0 ? <>
<Descriptions title={this.state.data["企业名称"]} bordered extra={<Tag color="#108ee9">企业ID{this.state.data["企业ID"]}</Tag>}></Descriptions>
<p><Tag color="#87d068">评价年度{this.state.data["评价年度"]}</Tag><Tag color="#87d068" style={{ float: 'right' }}>{(() => { if ("行业选择" in this.state.data && this.state.data["行业选择"] !== null) { return this.state.data["行业选择"].join("/") } else { return null } })()}</Tag></p>
<Tag color="#108ee9">经营问卷</Tag>
<Descriptions bordered>
{this.analysisQuestion(this.state.data["经营问卷"])}
</Descriptions>
{this.analysisObject(this.state.financialFill)}
</> : <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description="暂无数据" />}
</React.Fragment>
)
}

View File

@ -12,6 +12,7 @@ class RateTabs extends Component {
constructor(props) {
super(props)
this.state = {
}
}
@ -20,19 +21,19 @@ class RateTabs extends Component {
<Card>
<Tabs defaultActiveKey="0">
<TabPane tab="评价流程" key="0">
<RateProcess cid={this.props.cid} rid={this.props.rid}/>
<RateProcess value={this.props.value}/>
</TabPane>
<TabPane tab="评价结果" key="1">
<RateResult id={this.props.rid} />
<RateResult value={this.props.value}/>
</TabPane>
<TabPane tab="填报详情" key="2">
<FillDetails id={this.props.rid} />
<FillDetails value={this.props.value}/>
</TabPane>
<TabPane tab="风险数据" key="3">
<RiskData id={this.props.rid} />
<RiskData value={this.props.value}/>
</TabPane>
<TabPane tab="编辑报告" key="4">
<EditReport id={this.props.rid} />
<EditReport value={this.props.value}/>
</TabPane>
</Tabs>
</Card>

View File

@ -1,64 +1,50 @@
import React, { Component } from 'react'
import api from "@/api/request"
import { Row } from 'antd'
import { Row, Space } from 'antd'
class RateProcess extends Component {
constructor(props) {
super(props)
this.state = {
data: [
{ '综合评价流程': 1 },
{
"问卷填报": 1,
"财务数据填报": 1,
"清洗风险数据": 1
},
{
"模型打分": 1,
},
{ "报告生成": 1 },
{ "证书生成": 1 },
{
"综合信用评价主页": 1,
"财务要素评价主页": 1,
"公司风险分析主页": 1,
"分析指标明细主页": 1
}
]
],
form: this.props.value
}
}
componentDidMount() {
// api.post("/admin/rating/get_company_process", { rid: this.props.rid, cid: this.props.cid, types: "综合评价流程" })
// .then(res => {
// this.setState({
// data: res.info
// }, () => {
// console.log(this.state.data)
// })
// })
console.log(this.props)
api.post("/admin/rating/get_company_process", this.state.form)
.then(res => {
this.setState({
data: res.info
}, () => {
console.log(this.state.data)
})
console.log(res)
})
}
parseProcess = (item, index, key) => {
switch (index) {
case 0:
return <div className='process' style={{ flexWrap: 'wrap' }}>
<div className='process-box'>{key}</div>
return <div className='process' style={{ flexWrap: 'wrap', width: 100 / Object.keys(item).length + '%' }}>
<div className='process-box' style={{ backgroundColor: item[key] === 0 ? "#bfbfbf" : item[key] === 1 ? "#1890ff" : "#f5222d" }}>{key}</div>
<div className='process-line'>
<div className='line'></div>
<div className='line' ></div>
</div></div>
case 5:
return <div className='process' style={{ flexWrap: 'wrap' }}>
return <div className='process' style={{ flexWrap: 'wrap', width: 100 / Object.keys(item).length + '%' }}>
<div className='process-line'>
<div className='line'></div>
</div><div className='process-box'>{key}</div></div>
<div className='line' ></div>
</div><div className='process-box' style={{ backgroundColor: item[key] === 0 ? "#bfbfbf" : item[key] === 1 ? "#1890ff" : "#f5222d" }}>{key}</div></div>
default:
return <>
<div className='process' style={{ flexWrap: 'wrap' }}>
<div className='process' style={{ flexWrap: 'wrap', width: 100 / Object.keys(item).length + '%' }}>
<div className='process-line'>
<div className='line'></div>
</div><div className='process-box'>{key}</div><div className='process-line'>
<div className='line'></div>
</div><div className='process-box' style={{ backgroundColor: item[key] === 0 ? "#bfbfbf" : item[key] === 1 ? "#1890ff" : "#f5222d" }}>{key}</div><div className='process-line'>
<div className='line' ></div>
</div>
</div>
</>
@ -67,19 +53,30 @@ class RateProcess extends Component {
render() {
return (
<div>
{this.state.data.map((item, index) => {
return <><div className='connect' style={{ left: (100 - (Object.keys(item).length - 1) * 100 / Object.keys(item).length) / 2 + '%' }}><div className='connect-line' style={{ width: (Object.keys(item).length - 1) * 100 / Object.keys(item).length + '%', }}></div></div><Row justify="space-between" style={{ flexWrap: 'nowrap' }}>
<Row justify="space-between" style={{ flexWrap: 'nowrap' }}></Row>
{Object.keys(item).map(key => {
return this.parseProcess(item, index, key)
<>
<Row style={{ width: '100%', marginBottom: 20 }} justify="end">
<Space>
<div className='badge' style={{ background: '#1890ff' }}></div><span></span>
<div className='badge' style={{ background: '#bfbfbf' }}></div><span></span>
<div className='badge' style={{ background: '#f5222d' }}></div><span></span>
</Space>
</Row>
<Row justify='center' style={{ width: '100%', marginBottom: 40 }}>
<div style={{ width: 1550 }}>
{this.state.data.map((item, index) => {
return <><div className='connect' ><div className='connect-line' style={{ width: (Object.keys(item).length - 1) * 100 / Object.keys(item).length + '%', }}></div></div><Row justify="center" style={{ flexWrap: 'nowrap' }}>
<Row justify="center" style={{ flexWrap: 'nowrap' }}></Row>
{Object.keys(item).map(key => {
return this.parseProcess(item, index, key)
})}
<div className='connect'><div className='connect-line' style={{ width: (Object.keys(item).length - 1) * 100 / Object.keys(item).length + '%', }}></div></div>
</Row>
{index === this.state.data.length - 1 ? null : <div className='connect'><div className='connect-line' style={{ width: (Object.keys(item).length - 1) * 100 / Object.keys(item).length + '%', }}></div></div>}
</>
})}
<div className='connect' style={{ left: (100 - (Object.keys(item).length - 1) * 100 / Object.keys(item).length) / 2 + '%' }}><div className='connect-line' style={{ width: (Object.keys(item).length - 1) * 100 / Object.keys(item).length + '%', }}></div></div>
</Row>
{index === this.state.data.length-1 ? null :<div className='connect' style={{ left: (100 - (Object.keys(item).length - 1) * 100 / Object.keys(item).length) / 2 + '%' }}><div className='connect-line' style={{ width: (Object.keys(item).length - 1) * 100 / Object.keys(item).length + '%', }}></div></div>}
</>
})}
</div>
</div>
</Row>
</>
)
}
}

View File

@ -1,5 +1,5 @@
import React, { Component } from 'react'
import { Descriptions, Tag, Divider } from 'antd'
import { Descriptions, Tag, Divider, Empty } from 'antd'
import api from "@/api/request"
class RateResult extends Component {
@ -11,7 +11,8 @@ class RateResult extends Component {
}
componentDidMount() {
api.post("/admin/rating/rating_result", { rid: this.props.id })
const url = this.props.value.types === "综合评价流程" ? "/admin/rating/rating_result" : "/admin/rating/esg_rating_result"
api.post(url, { rid: this.props.value.rid })
.then(res => {
this.setState({
data: res.result[0],
@ -25,71 +26,73 @@ class RateResult extends Component {
render() {
return (
<React.Fragment>
<Descriptions title={this.state.data["企业名称"]} column={4} extra={<Tag color="#108ee9">企业ID{this.state.data["企业ID"]}</Tag>} style={{ marginTop: 20 }}>
{Object.keys(this.state.data).map((key, i) => {
if (!['经营评分', '财务评分', '风险评分', "企业ID", "企业名称"].includes(key)) {
return <Descriptions.Item label={key} key={i}>{this.state.data[key]}</Descriptions.Item>
} else {
return null
}
{this.state.data ? <>
<Descriptions title={this.state.data["企业名称"]} column={4} extra={<Tag color="#108ee9">企业ID{this.state.data["企业ID"]}</Tag>} style={{ marginTop: 20 }}>
{Object.keys(this.state.data).map((key, i) => {
if (!['经营评分', '财务评分', '风险评分', "企业ID", "企业名称"].includes(key)) {
return <Descriptions.Item label={key} key={i}>{this.state.data[key]}</Descriptions.Item>
} else {
return null
}
})}
</Descriptions>
<Divider />
<Tag color="#108ee9" style={{ marginBottom: 20 }}>经营评分</Tag>
<Descriptions column={4}>
{this.state.data["经营评分"] && Object.keys(this.state.data["经营评分"]).map((key, i) => {
return <Descriptions.Item label={key} key={i}>{this.state.data["经营评分"][key]}</Descriptions.Item>
})}
</Descriptions>
<Divider />
<Tag color="#108ee9" style={{ marginBottom: 20 }}>财务评分</Tag>
<Descriptions column={4} title="盈利能力">
{this.state.data["财务评分"] && Object.keys(this.state.data["财务评分"]["盈利能力"]).map((key, i) => {
return <Descriptions.Item label={key} key={i}>{this.state.data["财务评分"]["盈利能力"][key]}</Descriptions.Item>
})}
</Descriptions>
<Descriptions column={4} title="债务风险">
{this.state.data["财务评分"] && Object.keys(this.state.data["财务评分"]["债务风险"]).map((key, i) => {
return <Descriptions.Item label={key} key={i}>{this.state.data["财务评分"]["债务风险"][key]}</Descriptions.Item>
})}
</Descriptions>
<Descriptions column={4} title="经营增长">
{this.state.data["财务评分"] && Object.keys(this.state.data["财务评分"]["经营增长"]).map((key, i) => {
return <Descriptions.Item label={key} key={i}>{this.state.data["财务评分"]["经营增长"][key]}</Descriptions.Item>
})}
</Descriptions>
<Descriptions column={4} title="资产质量">
{this.state.data["财务评分"] && Object.keys(this.state.data["财务评分"]["资产质量"]).map((key, i) => {
return <Descriptions.Item label={key} key={i}>{this.state.data["财务评分"]["资产质量"][key]}</Descriptions.Item>
})}
</Descriptions>
<Descriptions column={4} title="财务合计">
<Descriptions.Item label="合计">{this.state.data["财务评分"] && this.state.data["财务评分"]["合计"]}</Descriptions.Item>
</Descriptions>
<Divider />
<Tag color="#108ee9" style={{ marginBottom: 20 }}>风险评分</Tag>
<Descriptions column={4} title="合规风险">
<Descriptions.Item label="合规风险">{this.state.data["风险评分"] && this.state.data["风险评分"]["合规风险"]}</Descriptions.Item>
</Descriptions>
<Descriptions column={4} title="经营风险">
{this.state.data["风险评分"] && Object.keys(this.state.data["风险评分"]["经营风险"]).map((key, i) => {
return <Descriptions.Item label={key} key={i}>{this.state.data["风险评分"]["经营风险"][key]}</Descriptions.Item>
})}
</Descriptions>
<Divider />
{this.state.data["风险评分"] && this.state.data["风险评分"]["关联风险"] && this.state.data["风险评分"]["关联风险"]["变更记录"] && Object.keys(this.state.data["风险评分"]["关联风险"]["变更记录"]).map((key, i) => {
return <Descriptions column={4} title="关联风险 - 变更记录"><Descriptions.Item label={key} key={i}>{this.state.data["风险评分"]["关联风险"]["变更记录"][key]}</Descriptions.Item></Descriptions>
})}
</Descriptions>
<Divider />
<Tag color="#108ee9" style={{ marginBottom: 20 }}>经营评分</Tag>
<Descriptions column={4}>
{this.state.data["经营评分"] && Object.keys(this.state.data["经营评分"]).map((key, i) => {
return <Descriptions.Item label={key} key={i}>{this.state.data["经营评分"][key]}</Descriptions.Item>
{this.state.data["风险评分"] && this.state.data["风险评分"]["关联风险"] && this.state.data["风险评分"]["关联风险"]["周边风险"] && Object.keys(this.state.data["风险评分"]["关联风险"]["周边风险"]).map((key, i) => {
return <Descriptions column={4} title="关联风险 - 周边风险"><Descriptions.Item label={key} key={i}>{this.state.data["风险评分"]["关联风险"]["周边风险"][key]}</Descriptions.Item></Descriptions>
})}
</Descriptions>
<Divider />
<Tag color="#108ee9" style={{ marginBottom: 20 }}>财务评分</Tag>
<Descriptions column={4} title="盈利能力">
{this.state.data["财务评分"] && Object.keys(this.state.data["财务评分"]["盈利能力"]).map((key, i) => {
return <Descriptions.Item label={key} key={i}>{this.state.data["财务评分"]["盈利能力"][key]}</Descriptions.Item>
})}
</Descriptions>
<Descriptions column={4} title="债务风险">
{this.state.data["财务评分"] && Object.keys(this.state.data["财务评分"]["债务风险"]).map((key, i) => {
return <Descriptions.Item label={key} key={i}>{this.state.data["财务评分"]["债务风险"][key]}</Descriptions.Item>
})}
</Descriptions>
<Descriptions column={4} title="经营增长">
{this.state.data["财务评分"] && Object.keys(this.state.data["财务评分"]["经营增长"]).map((key, i) => {
return <Descriptions.Item label={key} key={i}>{this.state.data["财务评分"]["经营增长"][key]}</Descriptions.Item>
})}
</Descriptions>
<Descriptions column={4} title="资产质量">
{this.state.data["财务评分"] && Object.keys(this.state.data["财务评分"]["资产质量"]).map((key, i) => {
return <Descriptions.Item label={key} key={i}>{this.state.data["财务评分"]["资产质量"][key]}</Descriptions.Item>
})}
</Descriptions>
<Descriptions column={4} title="财务合计">
<Descriptions.Item label="合计">{this.state.data["财务评分"] && this.state.data["财务评分"]["合计"]}</Descriptions.Item>
</Descriptions>
<Divider />
<Tag color="#108ee9" style={{ marginBottom: 20 }}>风险评分</Tag>
<Descriptions column={4} title="合规风险">
<Descriptions.Item label="合规风险">{this.state.data["风险评分"] && this.state.data["风险评分"]["合规风险"]}</Descriptions.Item>
</Descriptions>
<Descriptions column={4} title="经营风险">
{this.state.data["风险评分"] && Object.keys(this.state.data["风险评分"]["经营风险"]).map((key, i) => {
return <Descriptions.Item label={key} key={i}>{this.state.data["风险评分"]["经营风险"][key]}</Descriptions.Item>
})}
</Descriptions>
<Divider />
{this.state.data["风险评分"] && this.state.data["风险评分"]["关联风险"] && this.state.data["风险评分"]["关联风险"]["变更记录"] && Object.keys(this.state.data["风险评分"]["关联风险"]["变更记录"]).map((key, i) => {
return <Descriptions column={4} title="关联风险 - 变更记录"><Descriptions.Item label={key} key={i}>{this.state.data["风险评分"]["关联风险"]["变更记录"][key]}</Descriptions.Item></Descriptions>
})}
{this.state.data["风险评分"] && this.state.data["风险评分"]["关联风险"] && this.state.data["风险评分"]["关联风险"]["周边风险"] && Object.keys(this.state.data["风险评分"]["关联风险"]["周边风险"]).map((key, i) => {
return <Descriptions column={4} title="关联风险 - 周边风险"><Descriptions.Item label={key} key={i}>{this.state.data["风险评分"]["关联风险"]["周边风险"][key]}</Descriptions.Item></Descriptions>
})}
<Descriptions column={4} title="关联风险 - 合计">
<Descriptions.Item label="合计">{this.state.data["风险评分"] && this.state.data["风险评分"]["关联风险"]["合计"]}</Descriptions.Item>
</Descriptions>
<Divider />
<Descriptions column={4} title="风险合计">
<Descriptions.Item label="合计">{this.state.data["风险评分"] && this.state.data["风险评分"]["合计"]}</Descriptions.Item>
</Descriptions>
<Descriptions column={4} title="关联风险 - 合计">
<Descriptions.Item label="合计">{this.state.data["风险评分"] && this.state.data["风险评分"]["关联风险"]["合计"]}</Descriptions.Item>
</Descriptions>
<Divider />
<Descriptions column={4} title="风险合计">
<Descriptions.Item label="合计">{this.state.data["风险评分"] && this.state.data["风险评分"]["合计"]}</Descriptions.Item>
</Descriptions>
</> : <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description="暂无数据" />}
</React.Fragment>
)
}

View File

@ -1,17 +1,18 @@
import React, { Component } from 'react'
import api from "@/api/request"
import { Descriptions, Tag } from 'antd'
import { Descriptions, Tag, Empty } from 'antd'
class RiskData extends Component {
constructor(props) {
super(props)
this.state = {
data: {}
data: []
}
}
componentDidMount() {
api.post("/admin/rating/risk", { rid: this.props.id })
const url = this.props.value.types === "综合评价流程" ? "/admin/rating/risk" : "/admin/rating/esg_risk"
api.post(url, { rid: this.props.value.rid })
.then(res => {
this.setState({
data: res.result.length !== 0 ? res.result[0] : []
@ -49,7 +50,7 @@ class RiskData extends Component {
render() {
return (
<React.Fragment>
{this.analysisObject(this.state.data)}
{this.state.data.length !== 0 ? this.analysisObject(this.state.data) : <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description="暂无数据" />}
</React.Fragment>
)
}

View File

@ -1,5 +1,5 @@
import React, { Component } from 'react'
import { Input, Button } from 'antd'
import { Input } from 'antd'
import Pdf from "@/components/pdf"
import FeTable from '@/components/table'
import api from "@/api/request"
@ -21,6 +21,11 @@ class ManageRate extends Component {
}
}
componentDidMount() {
this.onSearch("")
}
onSearch = (value) => {
api.post("/admin/rating/search", { query: value, skip: 0, limit: 10 }).then(res => {
const col = Object.keys(res.result[0]).map((key, i) => {
@ -29,7 +34,7 @@ class ManageRate extends Component {
dataIndex: key,
key: i,
align: 'center',
render: (record) => <Button type="primary" onClick={this.handleClick.bind(this, record)}> </Button>,
render: (record) => <span style={{ color: '#108ee9',cursor:'pointer' }} onClick={this.handleClick.bind(this, record)}> </span>
} : {
title: key, dataIndex: key, align: 'center', key: i
}
@ -39,7 +44,7 @@ class ManageRate extends Component {
dataIndex: '详 情',
key: col.length,
align: 'center',
render: () => <Button type="primary"> </Button>,
render: () => <span style={{ color: '#108ee9',cursor:'pointer' }}> </span>,
})
this.setState({
data: res.result,
@ -73,7 +78,7 @@ class ManageRate extends Component {
return item.title === value["评价项目"] + '(' + value["评价ID"] + ')' ? false : true
})
if (state) {
newPanes.push({ title: value["评价项目"] + '(' + value["评价ID"] + ')', content: "/manage/rate/details", key: (Number(newPanes[newPanes.length - 1].key) + 1).toString(),id:{cid:value["企业ID"],rid:value["评价ID"]} });
newPanes.push({ title: value["评价项目"] + '(' + value["评价ID"] + ')', content: "/manage/rate/details", key: (Number(newPanes[newPanes.length - 1].key) + 1).toString(),value:{cid:value["企业ID"],rid:value["评价ID"],types:value['评价项目'] === 'ESG评价'?'ESG评价流程':'综合评价流程'} });
store.dispatch(operationAction(newPanes, (newPanes[newPanes.length - 1].key)))
} else {
return null

View File

@ -22,8 +22,9 @@ class UserSet extends Component {
AddForm = React.createRef()
componentDidMount() {
}
this.onSearch("")
}
setVisible = () => {
this.setState({

View File

@ -92,21 +92,18 @@ class Main extends Component {
}
getBranch = (props, name, params) => {
var id
if (name.match(/\((.+)\)/g)) {
id = name.match(/\((.+)\)/g)[0].substr(1, name.match(/\((.+)\)/g)[0].length - 2)
}
console.log(params)
switch (props) {
case '/dashboard':
return <Dashboard />
case "/manage/company":
return <ManageCompany />
case "/manager/company/details":
return <CompanyDetails id={id} />
return <CompanyDetails cid={params.id.cid} />
case "/manage/rate":
return <ManageRate />
case "/manage/rate/details":
return <RateTabs cid={params.id.cid} rid={params.id.rid} />
return <RateTabs value={params.value}/>
case "/manage/industry":
return <ManageIndustry />
case "/manage/industry/analysis":