| | |
| | | BData: PropTypes.any, // 上级数据 |
| | | MenuID: PropTypes.string, // 菜单Id |
| | | SupMenuID: PropTypes.string, // 上级菜单Id |
| | | mainSearch: PropTypes.any, // 主表搜索条件 |
| | | ContainerId: PropTypes.any, // 三级菜单Container(html) ID |
| | | handleTableId: PropTypes.func, // 控制表格数据切换时,更新在主表中的id |
| | | handleMainTable: PropTypes.func, // 刷新主表 |
| | |
| | | |
| | | this.setState({ |
| | | triggerBtn: trigger |
| | | }) |
| | | } else if (!this.props.Tab.supMenu && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) { |
| | | this.setState({}, () => { |
| | | this.loadmaindata() |
| | | }) |
| | | } |
| | | } |
| | |
| | | |
| | | config.action = config.action.map(item => { |
| | | if (userConfig.action[item.uuid]) { |
| | | delete userConfig.action[item.uuid].label |
| | | item = {...item, ...userConfig.action[item.uuid]} |
| | | } |
| | | |
| | |
| | | if (userConfig) { |
| | | _columns = _columns.map(item => { |
| | | if (userConfig.columns[item.uuid]) { |
| | | delete userConfig.columns[item.uuid].label |
| | | item = {...item, ...userConfig.columns[item.uuid]} |
| | | } |
| | | |
| | |
| | | loadingview: false, |
| | | viewlost: true |
| | | }) |
| | | let prex = Tab && Tab.label ? Tab.label + ': ' : '' |
| | | |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 10 |
| | | message: prex + result.message, |
| | | duration: 5 |
| | | }) |
| | | } |
| | | } |
| | |
| | | }) |
| | | deffers.push(defer) |
| | | } else if (item.resourceType === '1' && !item.dataSource) { |
| | | let prex = this.props.Tab && this.props.Tab.label ? this.props.Tab.label + '-' : '' |
| | | |
| | | notification.warning({ |
| | | top: 92, |
| | | message: item.label + ': ' + this.state.dict['main.datasource.settingerror'], |
| | | duration: 10 |
| | | message: prex + item.label + ': ' + this.state.dict['main.datasource.settingerror'], |
| | | duration: 5 |
| | | }) |
| | | } |
| | | }) |
| | |
| | | return item |
| | | }) |
| | | } else { |
| | | let prex = this.props.Tab && this.props.Tab.label ? this.props.Tab.label + '-' : '' |
| | | |
| | | notification.warning({ |
| | | top: 92, |
| | | message: res.search.label + ':' + res.message, |
| | | duration: 10 |
| | | message: prex + res.search.label + ':' + res.message, |
| | | duration: 5 |
| | | }) |
| | | } |
| | | }) |
| | |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | let prex = this.props.Tab && this.props.Tab.label ? this.props.Tab.label + ': ' : '' |
| | | |
| | | notification.error({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 15 |
| | | message: prex + result.message, |
| | | duration: 10 |
| | | }) |
| | | } |
| | | } |
| | |
| | | * @description 获取用户自定义存储过程传参 |
| | | */ |
| | | getCustomParam = (BID) => { |
| | | const { mainSearch } = this.props |
| | | const { pageIndex, pageSize, orderBy, search, setting } = this.state |
| | | |
| | | let _search = Utils.formatCustomMainSearch(search) |
| | | let searches = search |
| | | if (mainSearch && mainSearch.length > 0) { // 主表搜索条件 |
| | | searches = [...mainSearch, ...search] |
| | | } |
| | | |
| | | let _search = Utils.formatCustomMainSearch(searches) |
| | | |
| | | let param = { |
| | | PageIndex: pageIndex, |
| | |
| | | * @description 获取系统存储过程 sPC_Get_TableData 的参数 |
| | | */ |
| | | getDefaultParam = (BID) => { |
| | | const { mainSearch } = this.props |
| | | const { arr_field, pageIndex, pageSize, orderBy, search, setting } = this.state |
| | | |
| | | let _search = Utils.joinMainSearchkey(search) |
| | | let searches = search |
| | | if (mainSearch && mainSearch.length > 0) { // 主表搜索条件 |
| | | searches = [...mainSearch, ...search] |
| | | } |
| | | |
| | | let _search = Utils.joinMainSearchkey(searches) |
| | | _search = _search ? 'where ' + _search : '' |
| | | |
| | | let param = { |
| | |
| | | * @description 导出Excel时,获取页面搜索排序等参数 |
| | | */ |
| | | getexceloutparam = () => { |
| | | const { Tab } = this.props |
| | | const { Tab, mainSearch } = this.props |
| | | const { arr_field, orderBy, search, setting} = this.state |
| | | |
| | | let searches = search |
| | | if (mainSearch && mainSearch.length > 0) { // 主表搜索条件 |
| | | searches = [...mainSearch, ...search] |
| | | } |
| | | |
| | | return { |
| | | arr_field: arr_field, |
| | | orderBy: orderBy || setting.order, |
| | | search: search, |
| | | search: searches, |
| | | menuName: Tab.label |
| | | } |
| | | } |
| | |
| | | data: record |
| | | } |
| | | }) |
| | | // this.refs.subButton.actionTrigger(btn, record) |
| | | } |
| | | |
| | | /** |