mode
This commit is contained in:
parent
241c346ef5
commit
01dcb93cb6
|
@ -49,7 +49,7 @@ class FeTable extends Component {
|
|||
<div style={{ height: this.state.minHeight }}>
|
||||
<Table bordered style={{ marginBottom: 20 }} dataSource={this.state.data} columns={this.state.columns} scroll={{ y: this.state.minHeight }} onRow={record => {
|
||||
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,
|
||||
|
|
|
@ -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) => <span style={{ color: '#108ee9', cursor: 'pointer' }} onClick={() => handleClick(record)}>预 览</span>
|
||||
} : {
|
||||
title: key,
|
||||
dataIndex: key,
|
||||
key: index,
|
||||
align: 'center'
|
||||
}
|
||||
}) : []
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<FeTable data={value} columns={getColumn(value)} />
|
||||
<Pdf file={file} visible={visible} callback={() => { setVisible(false) }}></Pdf>
|
||||
<FeTable data={value} columns={getColumn(value)} callback={callback} />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -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({})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 (
|
||||
<React.Fragment>
|
||||
<Pdf file={this.state.file} visible={this.state.visible} callback={this.setVisible.bind(this)}></Pdf>
|
||||
<Form layout="inline" onFinish={this.onSearch} style={{ marginBottom: 20 }}>
|
||||
<Form.Item name="企业ID" label="企业ID">
|
||||
<Input allowClear />
|
||||
</Form.Item>
|
||||
<Form.Item name="企业名称" label="企业名称">
|
||||
<Input allowClear />
|
||||
</Form.Item>
|
||||
<Button type="primary" htmlType="submit">
|
||||
检索
|
||||
</Button>
|
||||
</Form>
|
||||
<Row justify="space-between" align='middle' style={{ marginBottom: 20 }}>
|
||||
<Form layout="inline" onFinish={this.onSearch} style={{ display: 'flex', alignItems: 'center' }}>
|
||||
<Form.Item name="企业ID" label="企业ID">
|
||||
<Input allowClear />
|
||||
</Form.Item>
|
||||
<Form.Item name="企业名称" label="企业名称">
|
||||
<Input allowClear />
|
||||
</Form.Item>
|
||||
<Button type="primary" htmlType="submit">
|
||||
检索
|
||||
</Button>
|
||||
</Form>
|
||||
<Button onClick={this.reload.bind(this)} icon={<ReloadOutlined />} loading={this.state.loading} type="primary"></Button>
|
||||
</Row>
|
||||
<FeTable data={this.state.data} columns={this.state.columns} current={this.state.form.page_no} callback={this.callback.bind(this)} total={this.state.total} pageChange={this.pageChange.bind(this)} onShowSizeChange={this.onShowSizeChange.bind(this)} />
|
||||
</React.Fragment>
|
||||
)
|
||||
|
|
|
@ -103,15 +103,15 @@ class Main extends Component {
|
|||
case "/manager/company/details":
|
||||
return <CompanyDetails cid={params.id.cid} />
|
||||
case "/manage/rate":
|
||||
return <ManageRate/>
|
||||
return <ManageRate />
|
||||
case "/manage/rate/details":
|
||||
return <RateTabs value={params.value}/>
|
||||
return <RateTabs value={params.value} />
|
||||
case "/manage/industry":
|
||||
return <ManageIndustry />
|
||||
case "/manage/industry/analysis":
|
||||
return <AnalysisDetails value={name} />
|
||||
case "/modal/threshold":
|
||||
return <Threshold/>
|
||||
return <Threshold />
|
||||
case "/test/company":
|
||||
return <TestCompany />
|
||||
case "/setting/user":
|
||||
|
@ -144,6 +144,7 @@ class Main extends Component {
|
|||
onEdit={this.onEdit}
|
||||
tabBarExtraContent={{
|
||||
right: <Button
|
||||
type="primary"
|
||||
onClick={this.clearAll}
|
||||
icon={<CloseOutlined />}
|
||||
/>,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React, { Component } from 'react';
|
||||
import { withRouter } from "react-router-dom";
|
||||
import { Input, Row, Col, Avatar, Space, Popconfirm } from 'antd';
|
||||
import { SearchOutlined, BellOutlined, WifiOutlined } from '@ant-design/icons';
|
||||
import { SearchOutlined, BellOutlined, WifiOutlined} from '@ant-design/icons';
|
||||
|
||||
class Head extends Component {
|
||||
constructor(props) {
|
||||
|
|
|
@ -15,9 +15,7 @@ class Home extends Component {
|
|||
}
|
||||
|
||||
componentDidMount(){
|
||||
api.get("/admin/user/online_check").then(res=>{
|
||||
|
||||
})
|
||||
api.get("/admin/user/online_check").then(res=>{})
|
||||
}
|
||||
|
||||
getMenuItem = (value) => {
|
||||
|
|
Loading…
Reference in New Issue