diff --git a/src/components/table.js b/src/components/table.js index 94b5842..221587b 100644 --- a/src/components/table.js +++ b/src/components/table.js @@ -49,7 +49,7 @@ class FeTable extends Component {
{ return { - onClick: event => this.jumpRow(event, record) + onClick: (event) => this.jumpRow(event, record) } }} pagination={{ defaultPageSize: this.state.defaultPageSize, current: this.state.current, total: this.state.total, onChange: this.onChange.bind(this), showSizeChanger: true, diff --git a/src/pages/home/branch/manage/company/companyDetails/evaluationRecords.js b/src/pages/home/branch/manage/company/companyDetails/evaluationRecords.js index d905d51..1a2e7ff 100644 --- a/src/pages/home/branch/manage/company/companyDetails/evaluationRecords.js +++ b/src/pages/home/branch/manage/company/companyDetails/evaluationRecords.js @@ -3,10 +3,12 @@ import { } from 'antd' import api from "@/api/request" import FeTable from "@/components/table" import "./index.css" -import { getColumn } from "@/utils/utils" +import Pdf from "@/components/pdf" function EvaluationRecords(props) { const [value, setValue] = useState([]) + const [file, setFile] = useState("") + const [visible, setVisible] = useState(false) useEffect(() => { if (props.table === '评价记录') { @@ -14,11 +16,42 @@ function EvaluationRecords(props) { setValue(res['评价记录']) }) } - }, [props.cid,props.table]) + }, [props.cid, props.table]) + + function handleClick(value) { + setVisible(true) + api.BlobGet("/admin" + value).then(res => { + setFile(res) + }) + } + + function callback(e, value) { + if (e === "预 览") { + + } + } + + function getColumn(params) { + return Array.isArray(params) && params.length !== 0 ? Object.keys(params[0]).map((key, index) => { + return key === "证书" || key === "报告" ? { + title: key, + dataIndex: key, + key: index, + align: 'center', + render: (record) => handleClick(record)}>预 览 + } : { + title: key, + dataIndex: key, + key: index, + align: 'center' + } + }) : [] + } return ( <> - + { setVisible(false) }}> + ) } diff --git a/src/pages/home/branch/manage/rate/branch/rateProcess.js b/src/pages/home/branch/manage/rate/branch/rateProcess.js index 6e8f5c1..fa0f107 100644 --- a/src/pages/home/branch/manage/rate/branch/rateProcess.js +++ b/src/pages/home/branch/manage/rate/branch/rateProcess.js @@ -37,7 +37,7 @@ function RateProcess1(props) { id: count.toString(), data: { label: key }, type: index === 0 ? "input" : "default", - position: { x: 0, y: scroll * 70 }, + position: { x: 0, y: scroll * 100 }, style: status ? { background: '#87d068', color: '#fff', @@ -48,17 +48,26 @@ function RateProcess1(props) { border: '1px solid #f5f5f5', }, }) + edges.push({ + id: `e${count}-${count + Object.keys(item[key]).length + 1}`, + source: count.toString(), + target: (count + Object.keys(item[key]).length + 1).toString(), + animated: true, + label: '完成', + }) count++ + Object.keys(item[key]).forEach((k, j) => { nodes.push({ id: count.toString(), data: { label: k }, - type: index === res.info['评价流程'].length - 1 ? "output" : "default", - position: { x: j * 200, y: (scroll + 1) * 70 }, + type: "output", + position: { x: 200, y: Object.keys(item[key]).length !== 1 ? 50 * (j - 1) + (scroll) * 100 : scroll * 100 }, + targetPosition: 'left', style: item[key][k] === 1 ? { - background: '#87d068', + background: '#806d9e', color: '#fff', - border: '1px solid #87d068', + border: '1px solid #806d9e', } : { background: '#f5f5f5', color: '#000', @@ -71,12 +80,6 @@ function RateProcess1(props) { target: count.toString(), animated: true }) - edges.push({ - id: `e${count}-${source + Object.keys(item[key]).length + 1}`, - source: count.toString(), - target: (source + Object.keys(item[key]).length + 1).toString(), - animated: true - }) count++ }) scroll += 2 @@ -131,7 +134,7 @@ function RateProcess1(props) { api.post(url, { rid: props.value.rid }).then(res => { setTarget(res) }) - }else{ + } else { setTarget({}) } } diff --git a/src/pages/home/branch/manage/rate/rate.js b/src/pages/home/branch/manage/rate/rate.js index c6f64ab..2d109bc 100644 --- a/src/pages/home/branch/manage/rate/rate.js +++ b/src/pages/home/branch/manage/rate/rate.js @@ -1,11 +1,12 @@ import React, { Component } from 'react' -import { Input, Form, Button } from 'antd' +import { Input, Form, Button, Row } from 'antd' import Pdf from "@/components/pdf" import FeTable from '@/components/table' import api from "@/api/request" import { connect } from 'react-redux'; import store from "@/store/index" import { operationAction } from "@/action/index" +import {ReloadOutlined} from '@ant-design/icons'; var status = { name: '', @@ -26,7 +27,8 @@ class ManageRate extends Component { sort: {}, page_no: 1, page_size: 10 - } + }, + loading: false } } @@ -157,21 +159,38 @@ class ManageRate extends Component { }) } + reload = () => { + this.setState({ + loading: true + }, () => { + setTimeout(() => { + this.init(); + this.setState({ + loading: false + }) + }, 1000) + }) + + } + render() { return ( -
- - - - - - - - + +
+ + + + + + + + + +
) diff --git a/src/pages/home/content.js b/src/pages/home/content.js index 99688ad..ab97baf 100644 --- a/src/pages/home/content.js +++ b/src/pages/home/content.js @@ -103,15 +103,15 @@ class Main extends Component { case "/manager/company/details": return case "/manage/rate": - return + return case "/manage/rate/details": - return + return case "/manage/industry": return case "/manage/industry/analysis": return case "/modal/threshold": - return + return case "/test/company": return case "/setting/user": @@ -144,6 +144,7 @@ class Main extends Component { onEdit={this.onEdit} tabBarExtraContent={{ right: