提交 488c6c59 authored 作者: chscls@163.com's avatar chscls@163.com

树型列表

上级 f03547a3
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
import React from 'react'; import React from 'react';
import { Tree, Table, Spin } from 'antd'; import { Tree, Table, Spin } from 'antd';
import FormList from './formList'; import FormList from './formList';
import TreeList from './formList/TreeList'
import { connect } from 'dva'; import { connect } from 'dva';
export default class TableList extends React.Component { export default class TableList extends React.Component {
...@@ -40,7 +41,30 @@ export default class TableList extends React.Component { ...@@ -40,7 +41,30 @@ export default class TableList extends React.Component {
} }
render() { render() {
return <FormList const {isTree} = this.props
return isTree?
<TreeList
onSelectRow={this.props.value.onSelectRow}
istableCom={true}
showHeader={this.props.showHeader}
get={this.props.get}
isHiddenPage={
this.props.isHiddenPage!=null?
this.props.isHiddenPage
:false}
loading={this.props.loading}
pageSize={this.props.pageSize||10}
value={this.state}
notShowBack={true}
rights={this.props.rights || []}
objCode={this.props.objCode}
isFormCom={true}
sql={this.props.sql}/>:
<FormList
onSelectRow={this.props.value.onSelectRow} onSelectRow={this.props.value.onSelectRow}
istableCom={true} istableCom={true}
showHeader={this.props.showHeader} showHeader={this.props.showHeader}
......
差异被折叠。
...@@ -962,7 +962,7 @@ class FormList extends React.Component { ...@@ -962,7 +962,7 @@ class FormList extends React.Component {
onClick={this.view.bind(this, record)}>查看详情</a><Divider type="vertical"/></>} onClick={this.view.bind(this, record)}>查看详情</a><Divider type="vertical"/></>}
{rights && !rights.includes('edit') ? '' : <><a {rights && !rights.includes('edit') ? '' : <><a
onClick={this.modify.bind(this, record)}>编辑</a><Divider type="vertical"/></>} onClick={this.modify.bind(this, record)}>编辑</a><Divider type="vertical"/></>}
{rignt&&rights.includes("viewProcess")&&record.process_biz_key?<><a onClick={this.viewProcess.bind(this, record)}>查看流程详情</a><Divider type="vertical"/></>:''} {rights&&rights.includes("viewProcess")&&record.process_biz_key?<><a onClick={this.viewProcess.bind(this, record)}>查看流程详情</a><Divider type="vertical"/></>:''}
{rights && !rights.includes('delete') ? '' : <> <Popconfirm {rights && !rights.includes('delete') ? '' : <> <Popconfirm
title="确定删除该数据?" title="确定删除该数据?"
onConfirm={this.delete.bind(this, record)} onConfirm={this.delete.bind(this, record)}
......
...@@ -2086,6 +2086,8 @@ export default class tableCom extends Component { ...@@ -2086,6 +2086,8 @@ export default class tableCom extends Component {
} }
cm = <TableList cm = <TableList
get={get} get={get}
isTree = {json.isTree}
json={json}
loading={this.props.loading} loading={this.props.loading}
showHeader={json.showHeader} showHeader={json.showHeader}
isHiddenPage={json.isHiddenPage} isHiddenPage={json.isHiddenPage}
...@@ -2729,6 +2731,8 @@ export default class tableCom extends Component { ...@@ -2729,6 +2731,8 @@ export default class tableCom extends Component {
initialValue: initValue || {} initialValue: initValue || {}
})(<TableList })(<TableList
json={json}
isTree = {json.isTree}
isHiddenPage={json.isHiddenPage} isHiddenPage={json.isHiddenPage}
showHeader={json.showHeader} showHeader={json.showHeader}
loading={this.props.loading} loading={this.props.loading}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论