| | |
| | | import zhCN from '@/locales/zh-CN/main.js' |
| | | import enUS from '@/locales/en-US/main.js' |
| | | import Utils from '@/utils/utils.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | // import asyncComponent from '@/utils/asyncComponent' |
| | | import asyncLoadComponent from '@/utils/asyncLoadComponent' |
| | | import {refreshTabView, modifyTabview} from '@/store/action' |
| | | |
| | | import MainTable from './mainTable' |
| | | import MainAction from '@/tabviews/tableshare/actionList' |
| | | import VerifyCard from '@/tabviews/tableshare/verifycard' |
| | | import MainSearch from '@/tabviews/tableshare/topSearch' |
| | | import NotFount from '@/components/404' |
| | | import './index.scss' |
| | | |
| | | const MainAction = asyncComponent(() => import('@/tabviews/tableshare/actionList')) |
| | | // const MainAction = asyncComponent(() => import('@/tabviews/tableshare/actionList')) |
| | | const SubTable = asyncLoadComponent(() => import('@/tabviews/subtable')) |
| | | const SubTabTable = asyncLoadComponent(() => import('@/tabviews/subtabtable')) |
| | | const FormTab = asyncLoadComponent(() => import('@/tabviews/formtab')) |
| | |
| | | MenuID: this.props.MenuID |
| | | } |
| | | let result = await Api.getSystemCacheConfig(param) |
| | | |
| | | if (result.status) { |
| | | let config = '' |
| | | let userConfig = '' |
| | |
| | | config[group] = config[group].filter(tab => permAction[tab.linkTab]) |
| | | }) |
| | | |
| | | // 字段权限黑名单 |
| | | config.search = config.search.filter(item => { |
| | | if (!item.blacklist || item.blacklist.length === 0) return true |
| | | |
| | | let _black = item.blacklist.filter(v => { |
| | | return this.props.permRoles.indexOf(v) !== -1 |
| | | }) |
| | | |
| | | if (_black.length > 0) { |
| | | return false |
| | | } else { |
| | | return true |
| | | } |
| | | }) |
| | | |
| | | config.columns = config.columns.filter(col => { |
| | | if (!col.field || !col.blacklist || col.blacklist.length === 0) return true |
| | | |
| | | let _black = col.blacklist.filter(v => { |
| | | return this.props.permRoles.indexOf(v) !== -1 |
| | | }) |
| | | |
| | | if (_black.length > 0) { |
| | | return false |
| | | } else { |
| | | return true |
| | | } |
| | | }) |
| | | |
| | | if (userConfig) { |
| | | config.setting = {...config.setting, ...userConfig.setting} |
| | | let _actions = {} |
| | |
| | | let _hideCol = [] // 隐藏及合并列中字段的uuid集 |
| | | let colMap = new Map() // 用于字段过滤 |
| | | |
| | | let _actions = [] // 工具栏按钮 |
| | | let _operations = [] // 操作列按钮(存在时) |
| | | let _actions = [] // 工具栏按钮 |
| | | let _operations = [] // 操作列按钮(存在时) |
| | | |
| | | config.action.forEach(item => { |
| | | if (item.execMode) { |
| | |
| | | config.columns.forEach(col => { |
| | | if (col.field) { |
| | | _arrField.push(col.field) |
| | | |
| | | // if () { // 权限黑名单 |
| | | // col.Hide = 'true' |
| | | // } |
| | | |
| | | _logcolumns.push(col) |
| | | } |
| | |
| | | |
| | | let istrigger = false |
| | | actions.forEach(item => { |
| | | if (!item.shortcut || istrigger) return |
| | | if (!item.shortcut || typeof(item.shortcut) !== 'object' || istrigger) return |
| | | |
| | | if (preKey === item.shortcut && keyCode === item.shortcutkey) { |
| | | if (preKey === item.shortcut[0] && keyCode === item.shortcut[1]) { |
| | | e.preventDefault() |
| | | istrigger = true |
| | | |
| | | this.refs.mainButton.actionTrigger(item) |
| | | } |
| | | }) |
| | |
| | | this.setState({ |
| | | settingVisible: false, |
| | | confirmLoading: false |
| | | }, () => { |
| | | window.GLOB.CacheMap = new Map() |
| | | this.reloadview() |
| | | }) |
| | | }) |
| | | }) |
| | |
| | | /> : null |
| | | } |
| | | {actions && setting.onload !== 'false' ? |
| | | <div style={{minHeight: '45px'}}> |
| | | <div style={{minHeight: '25px'}}> |
| | | <MainAction |
| | | ref="mainButton" |
| | | BID="" |
| | |
| | | actions={actions} |
| | | dict={this.state.dict} |
| | | MenuID={this.props.MenuID} |
| | | permRoles={this.props.permRoles} |
| | | logcolumns={this.state.logcolumns} |
| | | ContainerId={this.state.ContainerId} |
| | | refreshdata={this.refreshbyaction} |
| | |
| | | return { |
| | | tabviews: state.tabviews, |
| | | refreshTab: state.refreshTab, |
| | | permAction: state.permAction |
| | | permAction: state.permAction, |
| | | permRoles: state.permRoles |
| | | } |
| | | } |
| | | |