提交 8cc8187f authored 作者: 徐立's avatar 徐立
......@@ -15,10 +15,10 @@ export default class userButton extends Component {
super()
this.state = {
// 路由位置
visibleOk: false, // 通过模态框状态
visibleOk: false, // 通过模态框状态
value:'', // 文本域输入
user: '', // 用于保存用户点击了对应按钮
returnText: '',
returnText: '',
key: '',// 后端返回按钮规格
btnValue: '',// 后端返回按钮状态
}
......@@ -119,7 +119,7 @@ export default class userButton extends Component {
};
render() {
let { btnList,visibleOk,value,user,returnText } = this.state
let {
let {
affairOk,
btns,
isSecond,
......
......@@ -2,7 +2,7 @@
* web端文件预览功能
*/
import React, { Component } from 'react';
import { Modal,Icon,Tooltip,Popconfirm } from 'antd';
import { Modal,Popconfirm } from 'antd';
import FileViewer from 'react-file-viewer';
export default class index extends Component {
constructor(props){
......@@ -16,13 +16,13 @@ export default class index extends Component {
visible: true,
});
};
handleOk = e => {
this.setState({
visible: false,
});
};
handleCancel = e => {
this.setState({
visible: false,
......@@ -88,19 +88,19 @@ export default class index extends Component {
okText="下载"
cancelText="预览"
>
<a
target="_blank"
<a
target="_blank"
href={path}>
{pathName}
</a>
</Popconfirm>
: <a
target="_blank"
: <a
target="_blank"
href={path}>
{pathName}
</a>
}
<Modal
title={pathName}
visible={visible}
......@@ -123,7 +123,7 @@ export default class index extends Component {
height:600,
}}
>
<FileViewer
<FileViewer
fileType={type}
filePath={path}
// onError={this.onError}
......@@ -132,7 +132,7 @@ export default class index extends Component {
/>
</div>
}
</Modal>
</>
)
......
......@@ -40,7 +40,8 @@ export default class TableList extends React.Component {
}
render() {
return <FormList
return <FormList
onSelectRow={this.props.value.onSelectRow}
istableCom={true}
showHeader={this.props.showHeader}
get={this.props.get}
......
......@@ -626,6 +626,9 @@ class FormList extends React.Component {
};
handleSelectRows = rows => {
if(this.props.onSelectRow){
this.props.onSelectRow(rows)
}
this.setState({
selectedRows: rows,
});
......@@ -1063,7 +1066,7 @@ class FormList extends React.Component {
(!istableCom)||(this.props.value&&this.props.value.columns)?
<StandardTable
showHeader={this.props.showHeader!=null?this.props.showHeader:true}
noSelectRow={rights==null|| !rights.includes('delete') }
noSelectRow={this.props.onSelectRow==null&&( rights==null|| !rights.includes('delete')) }
rowKey="id"
data={data}
isHiddenPage={this.props.isHiddenPage!=null?this.props.isHiddenPage:false}
......@@ -1093,7 +1096,7 @@ class FormList extends React.Component {
{
showDiv&&<StandardTable
showHeader={this.props.showHeader!=null?this.props.showHeader:true}
noSelectRow={rights==null|| !rights.includes('delete') }
noSelectRow={this.props.onSelectRow==null&&( rights==null|| !rights.includes('delete')) }
rowKey="id"
data={data}
columns={this.columns}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论