| | |
| | | visible: false, // 标签页控制 |
| | | triggerTime: '', // 点击时间 |
| | | treevisible: false, // 菜单结构树弹框显示隐藏控制 |
| | | calendarYear: moment().format('YYYY') // 日历年份 |
| | | calendarYear: moment().format('YYYY'), // 日历年份 |
| | | debug: sessionStorage.getItem('debug') === 'true' |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | // 字段权限黑名单、必填、字段透视 |
| | | let valid = true |
| | | let roleId = sessionStorage.getItem('role_id') || '' |
| | | config.search = config.search.map(item => { |
| | | item.oriInitval = item.initval |
| | | if (['text', 'select', 'link'].includes(item.type) && param) { |
| | |
| | | } |
| | | |
| | | if (!item.blacklist || item.blacklist.length === 0) return item |
| | | |
| | | let _black = item.blacklist.filter(v => { |
| | | return this.props.permRoles.indexOf(v) !== -1 |
| | | }) |
| | | |
| | | if (_black.length > 0) { |
| | | if (item.blacklist.filter(v => roleId.indexOf(v) > -1).length > 0) { |
| | | item.Hide = 'true' |
| | | } |
| | | |
| | |
| | | config.setting.dataresource = '(' + config.setting.dataresource + ') tb' |
| | | } |
| | | |
| | | if (this.props.dataManager) { // 数据权限 |
| | | if (sessionStorage.getItem('dataM') === 'true') { // 数据权限 |
| | | config.setting.dataresource = config.setting.dataresource.replace(/\$@/ig, '/*') |
| | | config.setting.dataresource = config.setting.dataresource.replace(/@\$/ig, '*/') |
| | | _customScript = _customScript.replace(/\$@/ig, '/*') |
| | |
| | | param.BID = BID |
| | | } |
| | | // 数据管理权限 |
| | | if (this.props.dataManager) { |
| | | if (sessionStorage.getItem('dataM') === 'true') { |
| | | param.dataM = 'Y' |
| | | } |
| | | |
| | |
| | | |
| | | render() { |
| | | const { menuType } = this.props |
| | | const { BID, searchlist, loadingview, viewlost, config, loading, data, triggerTime } = this.state |
| | | const { debug, BID, searchlist, loadingview, viewlost, config, loading, data, triggerTime } = this.state |
| | | |
| | | return ( |
| | | <div className="calendar-page" id={this.state.ContainerId}> |
| | |
| | | dict={this.state.dict} |
| | | searchlist={searchlist} |
| | | menuType={menuType} |
| | | dataManager={this.props.dataManager} |
| | | refreshdata={this.refreshbysearch} |
| | | /> : null |
| | | } |
| | | {config && config.calendar ? <CalendarComponent calendar={config.calendar} loading={loading} data={data} triggerDate={this.triggerDate} changeDate={this.changeDate}/> : null} |
| | | {options.sysType !== 'cloud' && menuType !== 'HS' ? <Button |
| | | {debug && options.sysType !== 'cloud' && menuType !== 'HS' ? <Button |
| | | icon="copy" |
| | | shape="circle" |
| | | className="common-table-copy" |
| | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | menuType: state.editLevel, |
| | | permAction: state.permAction, |
| | | permRoles: state.permRoles, |
| | | dataManager: state.dataManager |
| | | permAction: state.permAction |
| | | } |
| | | } |
| | | |