提交 7d235e20 authored 作者: wtj's avatar wtj

修改表单排版问题

上级 57bde6ea
...@@ -908,7 +908,7 @@ class FormList extends React.Component { ...@@ -908,7 +908,7 @@ class FormList extends React.Component {
render: (text, record) => { render: (text, record) => {
return <Fragment> return <Fragment>
<div > <div >
{record.process_biz_key?<><a onClick={this.view.bind(this, record)}>查看</a></>:''} {record.process_biz_key?<><a onClick={this.view.bind(this, record)}>查看详情</a></>:''}
</div> </div>
</Fragment> </Fragment>
} }
...@@ -917,15 +917,24 @@ class FormList extends React.Component { ...@@ -917,15 +917,24 @@ class FormList extends React.Component {
this.columns[this.columns.length-1]=column; this.columns[this.columns.length-1]=column;
} }
}else{ }else{
console.log(rights)
let width=0;
if(rights && rights.includes('view')){
width=width+75;
}
if(rights && rights.includes('edit')){
width=width+40;
}
if(rights && rights.includes('delete')){
width=width+40;
}
const column = { const column = {
title: '操作', title: '操作',
fixed: 'right', fixed: 'right',
width: Array.isArray(rights)&&rights.length>0?rights.length*70:150, width: width,
render: (text, record) => { render: (text, record) => {
return <Fragment> return <Fragment>
<div > <div style={{textAlign:'center'}}>
{isSelect ? this.state.selects.includes(record[valueName]) ? <><span>已选择</span><Divider {isSelect ? this.state.selects.includes(record[valueName]) ? <><span>已选择</span><Divider
type="vertical"/></> : <><a type="vertical"/></> : <><a
onClick={callback.bind(this, record, this.columns)}>选择</a><Divider onClick={callback.bind(this, record, this.columns)}>选择</a><Divider
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论