| | |
| | | } |
| | | let parentID = submenuId ? submenuId : result.data[0].ParentID // 展开二级菜单ID |
| | | |
| | | let iframes = ['Main/Index', 'bda/rdt', 'Home/rdt'] |
| | | |
| | | let menulist = result.data.map(item => { |
| | | let _smenu = {} |
| | | _smenu.id = item.ParentID |
| | |
| | | } catch (e) { |
| | | _smenu.PageParam = {Icon: 'folder'} |
| | | } |
| | | |
| | | if (item.FunMenu) { |
| | | _smenu.children = item.FunMenu.map(child => { |
| | | let _tmenu = {} |
| | |
| | | // } else if (child.LinkUrl === 'bda/rdt?pageno=rolemenus&MenuNo=RoleMenuM') { |
| | | // _tmenu.type = 'RoleManage' |
| | | // _tmenu.forbidden = true |
| | | } else if (child.LinkUrl.split('?')[0] === 'Main/Index' || child.LinkUrl.split('?')[0] === 'bda/rdt') { |
| | | } else if (iframes.includes(child.LinkUrl.split('?')[0])) { |
| | | _tmenu.type = 'iframe' |
| | | _tmenu.forbidden = true |
| | | } |
| | |
| | | 'header.menu.page.configurable': 'Configuration Page', |
| | | 'header.menu.menuID': 'Menu ID', |
| | | 'header.menu.menuName': 'Menu Name', |
| | | 'header.menu.viewName': '页面名称', |
| | | 'header.menu.tabName': '标签名称', |
| | | 'header.menu.Remark': '备注', |
| | | 'header.menu.menuNo': 'Menu Parameter', |
| | |
| | | 'header.menu.page.configurable': '页面配置', |
| | | 'header.menu.menuID': '菜单ID', |
| | | 'header.menu.menuName': '菜单名称', |
| | | 'header.menu.viewName': '页面名称', |
| | | 'header.menu.tabName': '标签名称', |
| | | 'header.menu.Remark': '备注', |
| | | 'header.menu.menuNo': '菜单参数', |
| | |
| | | loadingview: true, // 页面加载中 |
| | | viewlost: false, // 页面丢失:1、未获取到配置-页面丢失;2、页面未启用 |
| | | lostmsg: '', // 页面丢失时的提示信息 |
| | | config: {}, // 页面配置信息,包括按钮、搜索、显示列、标签等 |
| | | config: null, // 页面配置信息,包括按钮、搜索、显示列、标签等 |
| | | searchlist: null, // 搜索条件 |
| | | actions: null, // 按钮集 |
| | | columns: null, // 显示列 |
| | |
| | | * @description 上级菜单id变化时,刷新数据 |
| | | */ |
| | | UNSAFE_componentWillReceiveProps(nextProps) { |
| | | if (this.props.Tab.supMenu && !is(fromJS(this.props.BID), fromJS(nextProps.BID))) { |
| | | if (this.state.config && this.props.Tab.supMenu && !is(fromJS(this.props.BID), fromJS(nextProps.BID))) { |
| | | this.loadmaindata(nextProps.BID, 'refresh') |
| | | } else if (nextProps.refreshtabs && nextProps.refreshtabs.includes(this.props.Tab.uuid)) { |
| | | } else if (this.state.config && nextProps.refreshtabs && nextProps.refreshtabs.includes(this.props.Tab.uuid)) { |
| | | this.reloadtable() |
| | | } |
| | | } |
| | |
| | | loadingview: true, |
| | | viewlost: false, |
| | | lostmsg: '', |
| | | config: {}, |
| | | config: null, |
| | | searchlist: null, |
| | | actions: null, |
| | | columns: null, |
| | |
| | | { |
| | | type: 'text', |
| | | key: 'label', |
| | | label: this.state.dict['header.form.name'], |
| | | label: this.state.dict['header.menu.tabName'], |
| | | initVal: card.label || '', |
| | | required: true |
| | | }, |
| | |
| | | { |
| | | type: 'text', |
| | | key: 'label', |
| | | label: this.state.dict['header.form.name'], |
| | | label: this.state.dict['header.menu.tabName'], |
| | | initVal: card.label || '', |
| | | required: true |
| | | }, |
| | |
| | | { |
| | | type: 'text', |
| | | key: 'tabName', |
| | | label: this.state.dict['header.menu.tabName'], |
| | | label: this.state.dict['header.menu.viewName'], |
| | | initVal: _config.tabName, |
| | | required: true, |
| | | readonly: false |
| | |
| | | const { formlist } = this.props |
| | | |
| | | let type = formlist.filter(cell => cell.key === 'type')[0].initVal |
| | | let _initval = formlist.filter(cell => cell.key === 'linkTab')[0].initVal |
| | | // let _initval = formlist.filter(cell => cell.key === 'linkTab')[0].initVal |
| | | |
| | | let _tabs = this.props.tabs.filter(tab => tab.type === type) |
| | | let initTab = _tabs.filter(tab => tab.uuid === _initval)[0] |
| | | // let initTab = _tabs.filter(tab => tab.uuid === _initval)[0] |
| | | |
| | | this.setState({ |
| | | formlist: formlist.map(item => { |
| | |
| | | }, |
| | | ..._tabs |
| | | ] |
| | | if (!initTab) { |
| | | item.initVal = '' |
| | | } |
| | | // if (!initTab) { |
| | | // item.initVal = '' |
| | | // } |
| | | } |
| | | |
| | | return item |
| | |
| | | initialValue: '', |
| | | rules: [ |
| | | { |
| | | required: this.props.range === 1, |
| | | required: true, |
| | | message: this.props.dict['form.required.input'] + 'Text!' |
| | | } |
| | | ] |
| | |
| | | UNSAFE_componentWillMount() { |
| | | let _verify = this.props.card.verify || {} |
| | | |
| | | let _columns = _verify.columns || [] |
| | | _columns = _columns.map(col => { |
| | | col.required = col.required || 'true' |
| | | col.type = col.type || 'Nvarchar(50)' |
| | | |
| | | return col |
| | | }) |
| | | |
| | | this.setState({ |
| | | verify: { |
| | | ..._verify, |
| | | sheet: _verify.sheet || 'Sheet1', |
| | | range: _verify.range || 0, |
| | | columns: _verify.columns || [], |
| | | columns: _columns, |
| | | scripts: _verify.scripts || [] |
| | | } |
| | | }) |
| | |
| | | UNSAFE_componentWillMount() { |
| | | let _verify = this.props.card.verify || {} |
| | | |
| | | let _columns = _verify.columns || [] |
| | | _columns = _columns.map(col => { |
| | | col.Width = col.Width || 20 |
| | | |
| | | return col |
| | | }) |
| | | |
| | | this.setState({ |
| | | verify: { |
| | | ..._verify, |
| | | columns: _verify.columns || [], |
| | | columns: _columns, |
| | | } |
| | | }) |
| | | } |