File was renamed from src/tabviews/managetable/secretKeyTable/actionList/index.jsx |
| | |
| | | class MainAction extends Component { |
| | | static propTpyes = { |
| | | BID: PropTypes.string, // 主表ID |
| | | datalist: PropTypes.any, // 列表数据 |
| | | datalist: PropTypes.any, // 列表数据 |
| | | Tab: PropTypes.any, // 如果当前元素为标签时,tab为标签信息 |
| | | type: PropTypes.string, // 判断当前为主表(main)、子表(sub)、子表标签(subtab) |
| | | MenuID: PropTypes.string, // 菜单ID |
| | | actions: PropTypes.array, // 按钮组 |
| | | logcolumns: PropTypes.array, // 显示列 |
| | | selectedData: PropTypes.array, // 选中数据 |
| | | dict: PropTypes.object, // 字典项 |
| | | setting: PropTypes.any, // 页面通用设置 |
| | | ContainerId: PropTypes.any, // tab页面ID,用于弹窗控制 |
| | | refreshdata: PropTypes.func, // 执行完成后数据刷新 |
| | | gettableselected: PropTypes.func // 获取表格中数据 |
| | | } |
| | | |
| | | state = { |
| | |
| | | configMap: {}, |
| | | loadingNumber: '' |
| | | } |
| | | |
| | | refreshdata = (item, type) => { |
| | | this.props.refreshdata(item, type) |
| | | } |
| | | |
| | | /** |
| | | * @description 触发按钮操作 |
| | | */ |
| | | actionTrigger = (item) => { |
| | | const { setting, BID, datalist } = this.props |
| | | const { setting, BID, datalist, selectedData } = this.props |
| | | |
| | | if (!BID) { |
| | | notification.warning({ |
| | |
| | | } |
| | | |
| | | let _this = this |
| | | let data = this.props.gettableselected() || [] |
| | | let data = selectedData || [] |
| | | |
| | | if (item.Ot !== 'notRequired' && data.length === 0) { |
| | | // 需要选择行时,校验数据 |
| | |
| | | }) |
| | | } |
| | | |
| | | this.refreshdata(btn, 'success') |
| | | this.props.refreshdata(btn.execSuccess) |
| | | } |
| | | |
| | | /** |
| | |
| | | message.error(res.message || res.ErrMesg) |
| | | } |
| | | |
| | | this.refreshdata(btn, 'error') |
| | | this.props.refreshdata(btn.execError) |
| | | } |
| | | |
| | | /** |
| | |
| | | if (execAction.setting.clickouter === 'close') { |
| | | clickouter = true |
| | | } |
| | | } |
| | | |
| | | if (this.props.type === 'subtab') { |
| | | container = document.body |
| | | } |
| | | |
| | | return ( |