21 文件已重命名
63个文件已修改
1 文件已复制
1个文件已删除
| | |
| | | import ReactDOM from 'react-dom' |
| | | import Route from './router' |
| | | import { Provider } from 'react-redux' |
| | | import md5 from 'md5' |
| | | import store from '@/store' |
| | | import * as serviceWorker from './serviceWorker' |
| | | import options, { styles } from '@/store/options.js' |
| | |
| | | GLOB.WXAppID = config.WXAppID || '' |
| | | GLOB.WXminiAppID = config.WXminiAppID || '' |
| | | GLOB.accessToken = {} |
| | | GLOB.mkHS = false |
| | | |
| | | if (config.externalDatabase !== false && config.externalDatabase !== 'false' && config.externalDatabase !== undefined) { |
| | | GLOB.externalDatabase = config.externalDatabase ? `[${config.externalDatabase}]..` : '' |
| | |
| | | sessionStorage.setItem('lang', config.defaultLang !== 'en-US' ? 'zh-CN' : 'en-US') |
| | | } |
| | | |
| | | let _level = 10 |
| | | let _Mlevel = sessionStorage.getItem('Member_Level') |
| | | |
| | | if (_Mlevel) { |
| | | if (_Mlevel === md5('mksoft' + GLOB.appkey + new Date().getFullYear() + new Date().getMonth() + 10)) { |
| | | _level = 10 |
| | | } else if (_Mlevel === md5('mksoft' + GLOB.appkey + new Date().getFullYear() + new Date().getMonth() + 20)) { |
| | | _level = 20 |
| | | } else if (_Mlevel === md5('mksoft' + GLOB.appkey + new Date().getFullYear() + new Date().getMonth() + 30)) { |
| | | _level = 30 |
| | | } |
| | | } |
| | | GLOB.memberLevel = _level |
| | | |
| | | Object.defineProperty(GLOB, 'appId', { |
| | | writable: false, |
| | | value: GLOB.appId |
| | |
| | | // 初始化菜单权限 |
| | | export const INIT_MENUPERMISSION = 'INIT_MENUPERMISSION' |
| | | |
| | | // 修改会员等级 |
| | | export const MODIFY_MEMBERLEVEL = 'MODIFY_MEMBERLEVEL' |
| | | |
| | | // 退出 |
| | | export const LOGOUT = 'LOGOUT' |
| | |
| | | } |
| | | } |
| | | |
| | | // 初始化菜单权限 |
| | | export const modifyMemberLevel = (memberLevel) => { |
| | | return { |
| | | type: user.MODIFY_MEMBERLEVEL, |
| | | memberLevel: memberLevel |
| | | } |
| | | } |
| | | |
| | | // 退出重置 |
| | | export const logout = () => { |
| | | return { |
| | |
| | | import md5 from 'md5' |
| | | import moment from 'moment' |
| | | import * as Type from './action-type' |
| | | |
| | | let _mainMenu = null |
| | | let _url = window.location.href.split('#')[0] |
| | | let _collapse = localStorage.getItem('collapse') === 'true' |
| | | let _level = 10 |
| | | let _Mlevel = sessionStorage.getItem('Member_Level') |
| | | |
| | | if (_Mlevel) { |
| | | if (_Mlevel === md5('mksoft' + moment().format('YYYYMM') + 10)) { |
| | | _level = 10 |
| | | } else if (_Mlevel === md5('mksoft' + moment().format('YYYYMM') + 20)) { |
| | | _level = 20 |
| | | } else if (_Mlevel === md5('mksoft' + moment().format('YYYYMM') + 30)) { |
| | | _level = 30 |
| | | } |
| | | } |
| | | if (localStorage.getItem(_url + '-sideHidden') === 'true') { |
| | | _mainMenu = '' |
| | | } |
| | |
| | | editLevel: null, // 编辑菜单级别,值为level1、level2、level3、HS |
| | | permAction: {}, // 用户按钮权限 |
| | | permMenus: [], // 用户三级菜单列表 |
| | | memberLevel: _level, // 会员等级 |
| | | } |
| | | |
| | | // 用户消息 |
| | |
| | | return { |
| | | ...state, |
| | | permMenus: action.permMenus |
| | | } |
| | | case Type.MODIFY_MEMBERLEVEL: |
| | | // 修改会员等级 |
| | | return { |
| | | ...state, |
| | | memberLevel: action.memberLevel |
| | | } |
| | | case Type.LOGOUT: |
| | | return { |
| | |
| | | } |
| | | |
| | | // HS不使用自定义设置 |
| | | if (result.LongParamUser && this.props.menuType !== 'HS') { |
| | | if (result.LongParamUser && !window.GLOB.mkHS) { |
| | | try { // 配置信息解析 |
| | | userConfig = JSON.parse(window.decodeURIComponent(window.atob(result.LongParamUser))) |
| | | _curUserConfig = userConfig[this.props.MenuID] |
| | |
| | | } |
| | | |
| | | // 权限过滤 |
| | | if (this.props.menuType !== 'HS') { |
| | | if (!window.GLOB.mkHS) { |
| | | if (config.tab && !permAction[config.tab.linkTab]) { |
| | | config.tab = null |
| | | } |
| | |
| | | if (setting.interType === 'inner') { |
| | | param.func = setting.innerFunc |
| | | } else { |
| | | if (this.props.menuType === 'HS') { |
| | | if (window.GLOB.mkHS) { |
| | | if (setting.sysInterface === 'true' && options.cloudServiceApi) { |
| | | param.rduri = options.cloudServiceApi |
| | | } else if (setting.sysInterface !== 'true') { |
| | |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.DateCount = '' |
| | | |
| | | if (this.props.menuType === 'HS') { // 云端数据验证 |
| | | if (window.GLOB.mkHS) { // 云端数据验证 |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { menuType } = this.props |
| | | const { BID, setting, searchlist, loadingview, viewlost, config, loading, data, triggerTime } = this.state |
| | | |
| | | return ( |
| | | <div className="calendar-page" id={this.state.ContainerId}> |
| | | {loadingview && <Spin size="large" />} |
| | | {searchlist && searchlist.length > 0 ? |
| | | <MainSearch BID={BID} searchlist={searchlist} setting={setting} menuType={menuType} refreshdata={this.refreshbysearch}/> : null |
| | | <MainSearch BID={BID} searchlist={searchlist} setting={setting} refreshdata={this.refreshbysearch}/> : null |
| | | } |
| | | {config && config.calendar ? <CalendarComponent calendar={config.calendar} loading={loading} data={data} triggerDate={this.triggerDate} changeDate={this.changeDate}/> : null} |
| | | {menuType !== 'HS' && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null} |
| | | {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null} |
| | | <Modal |
| | | title={config.tab ? config.tab.label : ''} |
| | | width={'80vw'} |
| | |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | menuType: state.editLevel, |
| | | permAction: state.permAction |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | // HS不使用自定义设置 |
| | | if (result.LongParamUser && this.props.menuType !== 'HS') { |
| | | if (result.LongParamUser && !window.GLOB.mkHS) { |
| | | try { // 配置信息解析 |
| | | let userConfig = JSON.parse(window.decodeURIComponent(window.atob(result.LongParamUser))) |
| | | if (userConfig && !userConfig.version) { |
| | |
| | | config = updateCommonTable(config) |
| | | |
| | | // 权限过滤 |
| | | if (this.props.menuType !== 'HS') { |
| | | if (!window.GLOB.mkHS) { |
| | | config.action = config.action.filter(item => item.hidden !== 'true' && permAction[item.uuid]) |
| | | config.tabgroups.forEach(group => { |
| | | group.sublist = group.sublist.filter(tab => { |
| | |
| | | loadOutResource = () => { |
| | | const { setting, search, BID } = this.state |
| | | |
| | | let param = UtilsDM.getPrevQueryParams(setting, search, BID, this.props.menuType) |
| | | let param = UtilsDM.getPrevQueryParams(setting, search, BID) |
| | | |
| | | if (setting.execType === 'sync') { |
| | | this.setState({ |
| | |
| | | param.BID = BID |
| | | } |
| | | |
| | | if (this.props.menuType === 'HS') { // 函数 sPC_TableData_InUpDe 云端验证 |
| | | if (window.GLOB.mkHS) { // 函数 sPC_TableData_InUpDe 云端验证 |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | | } |
| | | } else { |
| | |
| | | }) |
| | | |
| | | let _orderBy = orderBy || setting.order |
| | | let param = UtilsDM.getQueryDataParams(setting, arr_field, search, _orderBy, pageIndex, pageSize, BID, this.props.menuType) |
| | | let param = UtilsDM.getQueryDataParams(setting, arr_field, search, _orderBy, pageIndex, pageSize, BID) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | |
| | |
| | | }) |
| | | |
| | | let _orderBy = orderBy || setting.order |
| | | let param = UtilsDM.getQueryDataParams(setting, arr_field, search, _orderBy, pageIndex, pageSize, BID, this.props.menuType, id) |
| | | let param = UtilsDM.getQueryDataParams(setting, arr_field, search, _orderBy, pageIndex, pageSize, BID, id) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | if (statFields.length === 0 || !(setting.interType === 'system' || (setting.interType === 'custom' && setting.requestMode === 'system')) || !setting.dataresource) return |
| | | |
| | | let _orderBy = orderBy || setting.order |
| | | let param = UtilsDM.getStatQueryDataParams(setting, statFields, search, _orderBy, BID, this.props.menuType) |
| | | let param = UtilsDM.getStatQueryDataParams(setting, statFields, search, _orderBy, BID) |
| | | |
| | | Api.genericInterface(param).then(res => { |
| | | if (res.status) { |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { menuType, MenuID } = this.props |
| | | const { MenuID } = this.props |
| | | const { BID, setting, searchlist, pageSize, actions, columns, loadingview, viewlost, pickup, config, chartId, search, selectedData, shortcuts, autoMatic } = this.state |
| | | |
| | | return ( |
| | | <div className="commontable" id={this.state.ContainerId}> |
| | | {loadingview ? <Spin size="large" /> : null} |
| | | {searchlist && searchlist.length ? |
| | | <MainSearch BID={BID} searchlist={searchlist} setting={setting} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null |
| | | <MainSearch BID={BID} searchlist={searchlist} setting={setting} refreshdata={this.refreshbysearch}/> : null |
| | | } |
| | | {setting && config.charts ? <Row className="chart-view" gutter={16}> |
| | | {/* 视图组 */} |
| | |
| | | })} |
| | | </Tabs>)) |
| | | } |
| | | {menuType !== 'HS' && autoMatic ? <AutoMatic autoMatic={autoMatic} config={config} /> : null} |
| | | {menuType !== 'HS' && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null} |
| | | {menuType !== 'HS' && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null} |
| | | {!window.GLOB.mkHS && autoMatic ? <AutoMatic autoMatic={autoMatic} config={config} /> : null} |
| | | {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null} |
| | | {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null} |
| | | {viewlost ? <NotFount msg={this.state.lostmsg} /> : null} |
| | | </div> |
| | | ) |
| | |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | menuType: state.editLevel, |
| | | permAction: state.permAction, |
| | | permMenus: state.permMenus |
| | | } |
| | |
| | | BID: PropTypes.any, |
| | | data: PropTypes.array, |
| | | config: PropTypes.object, |
| | | menuType: PropTypes.any, |
| | | } |
| | | |
| | | state = { |
| | |
| | | } |
| | | |
| | | async loadData (hastimer) { |
| | | const { menuType } = this.props |
| | | const { config, arr_field, BID, BData } = this.state |
| | | |
| | | if (config.wrap.datatype === 'static') { |
| | |
| | | } |
| | | |
| | | let _orderBy = config.setting.order || '' |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID, menuType) |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | data: PropTypes.array, // 统一查询数据 |
| | | config: PropTypes.object, // 组件配置信息 |
| | | mainSearch: PropTypes.any, // 外层搜索条件 |
| | | menuType: PropTypes.any, // 菜单类型 |
| | | } |
| | | |
| | | state = { |
| | |
| | | } |
| | | |
| | | async loadData (id) { |
| | | const { mainSearch, menuType } = this.props |
| | | const { mainSearch } = this.props |
| | | const { config, arr_field, pageIndex, search, BID, BData, selected } = this.state |
| | | |
| | | if (config.setting.supModule && !BID && config.wrap.supKey !== 'false') { // BID 不存在时,不做查询 |
| | |
| | | }) |
| | | |
| | | let _orderBy = config.setting.order || '' |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, pageIndex, config.setting.pageSize, BID, menuType) |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, pageIndex, config.setting.pageSize, BID) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | * @description 获取单行数据 |
| | | */ |
| | | async loadLinedata (id) { |
| | | const { mainSearch, menuType } = this.props |
| | | const { mainSearch } = this.props |
| | | const { config, arr_field, pageIndex, search, BID, BData } = this.state |
| | | |
| | | let searches = fromJS(search).toJS() |
| | |
| | | }) |
| | | |
| | | let _orderBy = config.setting.order || '' |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, pageIndex, config.setting.pageSize, BID, menuType, id) |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, pageIndex, config.setting.pageSize, BID, id) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | <Spin /> |
| | | </div> : null |
| | | } |
| | | <NormalHeader config={config} BID={BID} menuType={this.props.menuType} refresh={this.refreshSearch} /> |
| | | <NormalHeader config={config} BID={BID} refresh={this.refreshSearch} /> |
| | | {config.action && config.action.length > 0 ? |
| | | <MainAction |
| | | BID={BID} |
| | |
| | | data: PropTypes.array, // 统一查询数据 |
| | | config: PropTypes.object, // 组件配置信息 |
| | | mainSearch: PropTypes.any, // 外层搜索条件 |
| | | menuType: PropTypes.any, // 菜单类型 |
| | | } |
| | | |
| | | state = { |
| | |
| | | } |
| | | |
| | | async loadData (hastimer) { |
| | | const { mainSearch, menuType } = this.props |
| | | const { mainSearch } = this.props |
| | | const { config, arr_field, BID, BData, selected } = this.state |
| | | |
| | | if (config.wrap.datatype === 'static') { |
| | |
| | | } |
| | | |
| | | let _orderBy = config.setting.order || '' |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID, menuType) |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | data: PropTypes.array, // 统一查询数据 |
| | | config: PropTypes.object, // 组件配置信息 |
| | | mainSearch: PropTypes.any, // 外层搜索条件 |
| | | menuType: PropTypes.any, // 菜单类型 |
| | | } |
| | | |
| | | state = { |
| | |
| | | } |
| | | |
| | | async loadData () { |
| | | const { mainSearch, menuType } = this.props |
| | | const { mainSearch } = this.props |
| | | const { config, arr_field, pageIndex, search, BID, BData } = this.state |
| | | |
| | | if (config.setting.supModule && !BID) { // BID 不存在时,不做查询 |
| | |
| | | }) |
| | | |
| | | let _orderBy = config.setting.order || '' |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, pageIndex, config.setting.pageSize, BID, menuType) |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, pageIndex, config.setting.pageSize, BID) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | <Spin /> |
| | | </div> : null |
| | | } |
| | | <NormalHeader config={config} BID={BID} menuType={this.props.menuType} refresh={this.refreshSearch} /> |
| | | <NormalHeader config={config} BID={BID} refresh={this.refreshSearch} /> |
| | | {data && data.length > 0 ? <Row className="card-row-list" style={{height: config.wrap.contentHeight}}> |
| | | {data.map(item => this.getLines(item))} |
| | | </Row> : null} |
| | |
| | | data: PropTypes.array, // 统一查询数据 |
| | | config: PropTypes.object, // 组件配置信息 |
| | | mainSearch: PropTypes.any, // 外层搜索条件 |
| | | menuType: PropTypes.any, // 菜单类型 |
| | | } |
| | | |
| | | state = { |
| | |
| | | } |
| | | |
| | | async loadData () { |
| | | const { mainSearch, menuType } = this.props |
| | | const { mainSearch } = this.props |
| | | const { config, arr_field, BID, BData } = this.state |
| | | |
| | | if (config.setting.supModule && !BID) { // BID 不存在时,不做查询 |
| | |
| | | }) |
| | | |
| | | let _orderBy = config.setting.order || '' |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID, menuType) |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | data: PropTypes.array, // 统一查询数据 |
| | | config: PropTypes.object, // 组件配置信息 |
| | | mainSearch: PropTypes.any, // 外层搜索条件 |
| | | menuType: PropTypes.any, // 菜单类型 |
| | | } |
| | | |
| | | state = { |
| | |
| | | } |
| | | |
| | | async loadData () { |
| | | const { mainSearch, menuType } = this.props |
| | | const { mainSearch } = this.props |
| | | const { config, arr_field, BID, BData } = this.state |
| | | |
| | | if (config.wrap.datatype === 'static') { |
| | |
| | | }) |
| | | |
| | | let _orderBy = config.setting.order || '' |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID, menuType) |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | data: PropTypes.array, // 统一查询数据 |
| | | config: PropTypes.object, // 组件配置信息 |
| | | mainSearch: PropTypes.any, // 外层搜索条件 |
| | | menuType: PropTypes.any, // 菜单类型 |
| | | } |
| | | |
| | | state = { |
| | |
| | | * @description 数据加载 |
| | | */ |
| | | async loadData (hastimer) { |
| | | const { mainSearch, menuType } = this.props |
| | | const { mainSearch } = this.props |
| | | const { config, arr_field, BID, search } = this.state |
| | | |
| | | if (config.setting.supModule && !BID) { // BID 不存在时,不做查询 |
| | |
| | | } |
| | | |
| | | let _orderBy = config.setting.order || '' |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID, menuType) |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | <Spin /> |
| | | </div> : null |
| | | } |
| | | <NormalHeader config={config} BID={BID} menuType={this.props.menuType} refresh={this.refreshSearch} /> |
| | | <NormalHeader config={config} BID={BID} refresh={this.refreshSearch} /> |
| | | <div className="canvas-wrap" ref={ref => this.wrap = ref}> |
| | | {config.plot.download === 'enable' && this.state.chart && !empty ? <DownloadOutlined onClick={this.downloadImage} className="system-color download"/> : null} |
| | | <div className={'chart-action' + (config.plot.download === 'enable' ? ' downable' : '')}> |
| | |
| | | data: PropTypes.array, // 统一查询数据 |
| | | config: PropTypes.object, // 组件配置信息 |
| | | mainSearch: PropTypes.any, // 外层搜索条件 |
| | | menuType: PropTypes.any, // 菜单类型 |
| | | } |
| | | |
| | | state = { |
| | |
| | | } |
| | | |
| | | async loadData (hastimer) { |
| | | const { mainSearch, menuType } = this.props |
| | | const { mainSearch } = this.props |
| | | const { config, arr_field, BID } = this.state |
| | | |
| | | if (config.setting.supModule && !BID) { // BID 不存在时,不做查询 |
| | |
| | | } |
| | | |
| | | let _orderBy = config.setting.order || '' |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID, menuType) |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | data: PropTypes.array, // 统一查询数据 |
| | | config: PropTypes.object, // 组件配置信息 |
| | | mainSearch: PropTypes.any, // 外层搜索条件 |
| | | menuType: PropTypes.any, // 菜单类型 |
| | | } |
| | | |
| | | state = { |
| | |
| | | } |
| | | |
| | | async loadData (hastimer) { |
| | | const { mainSearch, menuType } = this.props |
| | | const { mainSearch } = this.props |
| | | const { config, arr_field, search, BID } = this.state |
| | | |
| | | if (config.setting.supModule && !BID) { // BID 不存在时,不做查询 |
| | |
| | | } |
| | | |
| | | let _orderBy = config.setting.order || '' |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID, menuType) |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | <Spin /> |
| | | </div> : null |
| | | } |
| | | <NormalHeader config={config} BID={BID} menuType={this.props.menuType} refresh={this.refreshSearch} /> |
| | | <NormalHeader config={config} BID={BID} refresh={this.refreshSearch} /> |
| | | <div className="canvas-wrap" ref={ref => this.wrap = ref}> |
| | | {config.plot.download === 'enable' && this.state.chart && !empty ? <DownloadOutlined onClick={this.downloadImage} className="system-color download"/> : null} |
| | | <div className={'canvas' + (empty ? ' empty' : '')} id={this.state.chartId}></div> |
| | |
| | | data: PropTypes.array, // 统一查询数据 |
| | | config: PropTypes.object, // 组件配置信息 |
| | | mainSearch: PropTypes.any, // 外层搜索条件 |
| | | menuType: PropTypes.any, // 菜单类型 |
| | | } |
| | | |
| | | state = { |
| | |
| | | * @description 数据加载 |
| | | */ |
| | | async loadData (hastimer) { |
| | | const { mainSearch, menuType } = this.props |
| | | const { mainSearch } = this.props |
| | | const { config, arr_field, BID, search } = this.state |
| | | |
| | | if (config.setting.supModule && !BID) { // BID 不存在时,不做查询 |
| | |
| | | } |
| | | |
| | | let _orderBy = config.setting.order || '' |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID, menuType) |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | <Spin /> |
| | | </div> : null |
| | | } |
| | | <NormalHeader config={config} BID={BID} menuType={this.props.menuType} refresh={this.refreshSearch} /> |
| | | <NormalHeader config={config} BID={BID} refresh={this.refreshSearch} /> |
| | | <div className="canvas-wrap" ref={ref => this.wrap = ref}> |
| | | {config.plot.download === 'enable' && this.state.chart && !empty ? <DownloadOutlined onClick={this.downloadImage} className="system-color download"/> : null} |
| | | <div className={'chart-action' + (config.plot.download === 'enable' ? ' downable' : '')}> |
| | |
| | | data: PropTypes.array, // 统一查询数据 |
| | | config: PropTypes.object, // 组件配置信息 |
| | | mainSearch: PropTypes.any, // 外层搜索条件 |
| | | menuType: PropTypes.any, // 菜单类型 |
| | | } |
| | | |
| | | state = { |
| | |
| | | * @description 数据加载 |
| | | */ |
| | | async loadData (hastimer) { |
| | | const { mainSearch, menuType } = this.props |
| | | const { mainSearch } = this.props |
| | | const { config, arr_field, BID, search } = this.state |
| | | |
| | | if (config.setting.supModule && !BID) { // BID 不存在时,不做查询 |
| | |
| | | } |
| | | |
| | | let _orderBy = config.setting.order || '' |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID, menuType) |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | <Spin /> |
| | | </div> : null |
| | | } |
| | | <NormalHeader config={config} BID={BID} menuType={this.props.menuType} refresh={this.refreshSearch} /> |
| | | <NormalHeader config={config} BID={BID} refresh={this.refreshSearch} /> |
| | | <div className={'canvas' + (empty ? ' empty' : '')} ref={ref => this.wrap = ref}></div> |
| | | {empty ? <Empty description={false}/> : null} |
| | | </div> |
| | |
| | | data: PropTypes.array, // 统一查询数据 |
| | | config: PropTypes.object, // 组件配置信息 |
| | | mainSearch: PropTypes.any, // 外层搜索条件 |
| | | menuType: PropTypes.any, // 菜单类型 |
| | | } |
| | | |
| | | state = { |
| | |
| | | } |
| | | |
| | | async loadData () { |
| | | const { mainSearch, menuType } = this.props |
| | | const { mainSearch } = this.props |
| | | const { config, arr_field, BID } = this.state |
| | | |
| | | if (config.wrap.datatype === 'static') { |
| | |
| | | }) |
| | | |
| | | let _orderBy = config.setting.order || '' |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID, menuType) |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | data: PropTypes.array, // 统一查询数据 |
| | | config: PropTypes.object, // 组件配置信息 |
| | | mainSearch: PropTypes.any, // 外层搜索条件 |
| | | menuType: PropTypes.any, // 菜单类型 |
| | | } |
| | | |
| | | state = { |
| | |
| | | } |
| | | |
| | | async loadData () { |
| | | const { mainSearch, menuType } = this.props |
| | | const { mainSearch } = this.props |
| | | const { config, arr_field, BID } = this.state |
| | | |
| | | if (config.wrap.datatype === 'static') { |
| | |
| | | }) |
| | | |
| | | let _orderBy = config.setting.order || '' |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID, menuType) |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | data: PropTypes.array, // 统一查询数据 |
| | | config: PropTypes.object, // 组件配置信息 |
| | | mainSearch: PropTypes.any, // 外层搜索条件 |
| | | menuType: PropTypes.any, // 菜单类型 |
| | | } |
| | | |
| | | state = { |
| | |
| | | |
| | | if (config.uuid !== menuId) return |
| | | |
| | | this.loadData('refresh') |
| | | this.loadData() |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | } |
| | | |
| | | async loadData (type) { |
| | | const { mainSearch, menuType } = this.props |
| | | async loadData () { |
| | | const { mainSearch } = this.props |
| | | const { config, arr_field, BID } = this.state |
| | | |
| | | if (config.wrap.datatype === 'static' || (config.setting.supModule && !BID)) { |
| | |
| | | }) |
| | | |
| | | let _orderBy = config.setting.order || '' |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID, menuType) |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | data: PropTypes.array, // 统一查询数据 |
| | | config: PropTypes.object, // 组件配置信息 |
| | | mainSearch: PropTypes.any, // 外层搜索条件 |
| | | menuType: PropTypes.any, // 菜单类型 |
| | | } |
| | | |
| | | state = { |
| | |
| | | } |
| | | |
| | | async loadData (type) { |
| | | const { mainSearch, menuType } = this.props |
| | | const { mainSearch } = this.props |
| | | const { config, arr_field, BID } = this.state |
| | | |
| | | if (config.wrap.datatype === 'static' || (config.setting.supModule && !BID)) { |
| | |
| | | }) |
| | | |
| | | let _orderBy = config.setting.order || '' |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID, menuType) |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | data: PropTypes.array, // 统一查询数据 |
| | | config: PropTypes.object, // 组件配置信息 |
| | | mainSearch: PropTypes.any, // 外层搜索条件 |
| | | menuType: PropTypes.any, // 菜单类型 |
| | | } |
| | | |
| | | state = { |
| | |
| | | } |
| | | |
| | | async loadData () { |
| | | const { mainSearch, menuType } = this.props |
| | | const { mainSearch } = this.props |
| | | const { config, arr_field, BID } = this.state |
| | | |
| | | if (config.wrap.datatype === 'static' || (config.setting.supModule && !BID)) { |
| | |
| | | }) |
| | | |
| | | let _orderBy = config.setting.order || '' |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID, menuType) |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { connect } from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Col, Empty, notification, Button, Row } from 'antd' |
| | | |
| | |
| | | bids: PropTypes.any, // 父级Id集 |
| | | config: PropTypes.object, // 组件配置信息 |
| | | mainSearch: PropTypes.any, // 全局搜索条件 |
| | | menuType: PropTypes.any, // 菜单类型 |
| | | } |
| | | |
| | | state = { |
| | |
| | | } |
| | | |
| | | getComponents = () => { |
| | | const { menuType, BID, bids, config } = this.props |
| | | const { BID, bids, config } = this.props |
| | | const { mainSearch, data } = this.state |
| | | |
| | | if (!config || !config.components || config.components.length === 0) return (<Empty description={false} />) |
| | |
| | | if (item.type === 'bar' || item.type === 'line') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvBarAndLine data={data} config={item} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <AntvBarAndLine data={data} config={item} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'pie') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvPie data={data} config={item} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <AntvPie data={data} config={item} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'dashboard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvDashboard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <AntvDashboard config={item} data={data} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'stepform') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <NormalForm config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <NormalForm config={item} data={data} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'tabform') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <TabForm config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <TabForm config={item} data={data} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'scatter') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvScatter config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <AntvScatter config={item} data={data} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'carousel' && item.subtype === 'datacard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <CarouselDataCard config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch} menuType={menuType} /> |
| | | <CarouselDataCard config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'carousel' && item.subtype === 'propcard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <CarouselPropCard config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch} menuType={menuType} /> |
| | | <CarouselPropCard config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'datacard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <DataCard config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch} menuType={menuType} /> |
| | | <DataCard config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'propcard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <PropCard config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch} menuType={menuType} /> |
| | | <PropCard config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'tablecard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <TableCard config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch} menuType={menuType} /> |
| | | <TableCard config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'normaltable') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <NormalTable config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch} menuType={menuType} /> |
| | | <NormalTable config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'editable') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <EditTable config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch} menuType={menuType} /> |
| | | <EditTable config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'tree') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <NormalTree config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <NormalTree config={item} data={data} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'editor') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <BraftEditor config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <BraftEditor config={item} data={data} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'code') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <SandBox config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <SandBox config={item} data={data} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'balcony') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Balcony config={item} data={data} BID={_bid} menuType={menuType} /> |
| | | <Balcony config={item} data={data} BID={_bid}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'chart') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <CustomChart config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <CustomChart config={item} data={data} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else { |
| | |
| | | } |
| | | } |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | menuType: state.editLevel |
| | | } |
| | | } |
| | | |
| | | const mapDispatchToProps = () => { |
| | | return {} |
| | | } |
| | | |
| | | export default connect(mapStateToProps, mapDispatchToProps)(TabTransfer) |
| | | export default TabTransfer |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import md5 from 'md5' |
| | | import { connect } from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Table, Typography, Col, Switch, message } from 'antd' |
| | | |
| | |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | const { menuType, memberLevel, setting, fields, columns } = this.props |
| | | const { setting, fields, columns } = this.props |
| | | let radio = 5 // 虚化比例 |
| | | let _format = false // 是否虚化处理 |
| | | let rowspans = [] |
| | | let orderfields = {} |
| | | |
| | | if (window.GLOB.dataFormat && menuType !== 'HS' && memberLevel) { |
| | | if (window.GLOB.dataFormat && !window.GLOB.mkHS) { |
| | | _format = true |
| | | |
| | | if (memberLevel >= 30) { |
| | | if (window.GLOB.memberLevel >= 30) { |
| | | radio = 20 |
| | | } else if (memberLevel >= 20) { |
| | | } else if (window.GLOB.memberLevel >= 20) { |
| | | radio = 10 |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | menuType: state.editLevel, |
| | | memberLevel: state.memberLevel |
| | | } |
| | | } |
| | | |
| | | const mapDispatchToProps = () => { |
| | | return {} |
| | | } |
| | | |
| | | export default connect(mapStateToProps, mapDispatchToProps)(NormalTable) |
| | | export default NormalTable |
| | |
| | | class NormalHeader extends Component { |
| | | static propTpyes = { |
| | | BID: PropTypes.any, // 上级主键值 |
| | | menuType: PropTypes.any, // 菜单类型 |
| | | config: PropTypes.object, // 配置信息 |
| | | refresh: PropTypes.func // 条件刷新 |
| | | } |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { config, menuType, BID } = this.props |
| | | const { config, BID } = this.props |
| | | const { title, show } = this.state |
| | | |
| | | if (!title && !show) return null |
| | |
| | | return ( |
| | | <div className={'normal-header' + (show ? ' header-search' : '')} style={config.headerStyle}> |
| | | <span className="title">{title}</span> |
| | | {show ? <SearchComponent config={config} BID={BID} menuType={menuType} refreshdata={this.props.refresh}/> : null} |
| | | {show ? <SearchComponent config={config} BID={BID} refreshdata={this.props.refresh}/> : null} |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { connect } from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Row, Col, Empty, notification } from 'antd' |
| | | |
| | |
| | | bids: PropTypes.any, // 父级Id集 |
| | | config: PropTypes.object, // 组件配置信息 |
| | | mainSearch: PropTypes.any, // 全局搜索条件 |
| | | menuType: PropTypes.any, // 菜单类型 |
| | | } |
| | | |
| | | state = { |
| | |
| | | } |
| | | |
| | | getComponents = () => { |
| | | const { menuType, bids, config } = this.props |
| | | const { bids, config } = this.props |
| | | const { mainSearch, data } = this.state |
| | | |
| | | if (!config || !config.components || config.components.length === 0) return (<Empty description={false} />) |
| | |
| | | if (item.type === 'bar' || item.type === 'line') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvBarAndLine data={data} config={item} BID={BID} mainSearch={mainSearch} menuType={menuType} /> |
| | | <AntvBarAndLine data={data} config={item} BID={BID} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'pie') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvPie data={data} config={item} BID={BID} mainSearch={mainSearch} menuType={menuType} /> |
| | | <AntvPie data={data} config={item} BID={BID} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'dashboard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvDashboard config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> |
| | | <AntvDashboard config={item} data={data} BID={BID} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'scatter') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvScatter config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> |
| | | <AntvScatter config={item} data={data} BID={BID} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'search') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <MainSearch config={item} BID={BID} menuType={menuType} refreshdata={this.resetSearch} /> |
| | | <MainSearch config={item} BID={BID} refreshdata={this.resetSearch} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'tabs') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvTabs config={item} BID={BID} bids={bids} mainSearch={mainSearch} menuType={menuType} /> |
| | | <AntvTabs config={item} BID={BID} bids={bids} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'datacard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <DataCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> |
| | | <DataCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'propcard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <PropCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> |
| | | <PropCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'carousel' && item.subtype === 'datacard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <CarouselDataCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> |
| | | <CarouselDataCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'carousel' && item.subtype === 'propcard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <CarouselPropCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> |
| | | <CarouselPropCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'tablecard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <TableCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> |
| | | <TableCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'normaltable') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <NormalTable config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> |
| | | <NormalTable config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'editable') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <EditTable config={item} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> |
| | | <EditTable config={item} BID={BID} BData={BData} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'group' && item.subtype === 'normalgroup') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <NormalGroup config={item} BID={BID} bids={bids} mainSearch={mainSearch} menuType={menuType} /> |
| | | <NormalGroup config={item} BID={BID} bids={bids} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'simpleform') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <SimpleForm config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> |
| | | <SimpleForm config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'stepform') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <StepForm config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> |
| | | <StepForm config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'tabform') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <TabForm config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> |
| | | <TabForm config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'tree') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <NormalTree config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> |
| | | <NormalTree config={item} data={data} BID={BID} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'editor') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <BraftEditor config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> |
| | | <BraftEditor config={item} data={data} BID={BID} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'code') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <SandBox config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> |
| | | <SandBox config={item} data={data} BID={BID} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'balcony') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Balcony config={item} data={data} BID={BID} menuType={menuType} /> |
| | | <Balcony config={item} data={data} BID={BID}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'chart') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <CustomChart config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> |
| | | <CustomChart config={item} data={data} BID={BID} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else { |
| | |
| | | } |
| | | } |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | menuType: state.editLevel |
| | | } |
| | | } |
| | | |
| | | const mapDispatchToProps = () => { |
| | | return {} |
| | | } |
| | | |
| | | export default connect(mapStateToProps, mapDispatchToProps)(TabTransfer) |
| | | export default TabTransfer |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { connect } from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { notification } from 'antd' |
| | | |
| | |
| | | BID: PropTypes.any, // 父级Id |
| | | config: PropTypes.object, // 组件配置信息 |
| | | mainSearch: PropTypes.any, // 外层搜索条件 |
| | | menuType: PropTypes.any, // 菜单类型 |
| | | } |
| | | |
| | | state = { |
| | |
| | | }) |
| | | |
| | | let _orderBy = orderBy || setting.order |
| | | let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, this.props.menuType) |
| | | let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | }) |
| | | |
| | | let _orderBy = orderBy || setting.order |
| | | let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, this.props.menuType, id) |
| | | let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, id) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | } |
| | | |
| | | let _orderBy = orderBy || setting.order |
| | | let param = UtilsDM.getStatQueryDataParams(setting, config.statFields, searches, _orderBy, BID, this.props.menuType) |
| | | let param = UtilsDM.getStatQueryDataParams(setting, config.statFields, searches, _orderBy, BID) |
| | | |
| | | Api.genericInterface(param).then(res => { |
| | | if (res.status) { |
| | |
| | | <div className="custom-edit-table" id={'anchor' + config.uuid} style={config.style}> |
| | | <NormalHeader config={config}/> |
| | | {config.search && config.search.length ? |
| | | <MainSearch BID={BID} config={config} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null |
| | | <MainSearch BID={BID} config={config} refreshdata={this.refreshbysearch}/> : null |
| | | } |
| | | <MainAction |
| | | BID={BID} |
| | |
| | | } |
| | | } |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | menuType: state.editLevel |
| | | } |
| | | } |
| | | |
| | | const mapDispatchToProps = () => { |
| | | return {} |
| | | } |
| | | |
| | | export default connect(mapStateToProps, mapDispatchToProps)(EditableTable) |
| | | export default EditableTable |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import {connect} from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { notification, Collapse } from 'antd' |
| | | |
| | |
| | | data: PropTypes.array, // 统一查询数据 |
| | | config: PropTypes.object, // 组件配置信息 |
| | | mainSearch: PropTypes.any, // 外层搜索条件 |
| | | menuType: PropTypes.any, // 菜单类型 |
| | | } |
| | | |
| | | state = { |
| | |
| | | }) |
| | | |
| | | let _orderBy = orderBy || setting.order |
| | | let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, this.props.menuType) |
| | | let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | }) |
| | | |
| | | let _orderBy = orderBy || setting.order |
| | | let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, this.props.menuType, id) |
| | | let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, id) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | } |
| | | |
| | | let _orderBy = orderBy || setting.order |
| | | let param = UtilsDM.getStatQueryDataParams(setting, config.statFields, searches, _orderBy, BID, this.props.menuType) |
| | | let param = UtilsDM.getStatQueryDataParams(setting, config.statFields, searches, _orderBy, BID) |
| | | |
| | | Api.genericInterface(param).then(res => { |
| | | if (res.status) { |
| | |
| | | {config.wrap.collapse === 'true' ? <Collapse bordered={false} defaultActiveKey="1" expandIconPosition="right"> |
| | | <Panel forceRender={true} header={<NormalHeader config={config}/>} key="1"> |
| | | {config.search && config.search.length ? |
| | | <MainSearch BID={BID} config={config} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null |
| | | <MainSearch BID={BID} config={config} refreshdata={this.refreshbysearch}/> : null |
| | | } |
| | | <MainAction |
| | | BID={BID} |
| | |
| | | </Collapse> : <> |
| | | <NormalHeader config={config}/> |
| | | {config.search && config.search.length ? |
| | | <MainSearch BID={BID} config={config} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null |
| | | <MainSearch BID={BID} config={config} refreshdata={this.refreshbysearch}/> : null |
| | | } |
| | | <MainAction |
| | | BID={BID} |
| | |
| | | } |
| | | } |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | menuType: state.editLevel |
| | | } |
| | | } |
| | | |
| | | const mapDispatchToProps = () => { |
| | | return {} |
| | | } |
| | | |
| | | export default connect(mapStateToProps, mapDispatchToProps)(NormalTable) |
| | | export default NormalTable |
| | |
| | | bids: PropTypes.any, // 父级Id集 |
| | | config: PropTypes.object, // 组件配置信息 |
| | | mainSearch: PropTypes.any, // 外层搜索条件 |
| | | menuType: PropTypes.any, // 菜单类型 |
| | | } |
| | | |
| | | state = { |
| | |
| | | data: PropTypes.array, // 统一查询数据 |
| | | config: PropTypes.object, // 组件配置信息 |
| | | mainSearch: PropTypes.any, // 外层搜索条件 |
| | | menuType: PropTypes.any, // 菜单类型 |
| | | } |
| | | |
| | | state = { |
| | |
| | | } |
| | | |
| | | async loadData () { |
| | | const { mainSearch, menuType } = this.props |
| | | const { mainSearch } = this.props |
| | | const { config, arr_field, BID, BData } = this.state |
| | | |
| | | if (config.setting.supModule && !BID) { // BID 不存在时,不做查询 |
| | |
| | | }) |
| | | |
| | | let _orderBy = config.setting.order || '' |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, config.setting.pageSize, BID, menuType) |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, config.setting.pageSize, BID) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | data: PropTypes.array, // 统一查询数据 |
| | | config: PropTypes.object, // 组件配置信息 |
| | | mainSearch: PropTypes.any, // 外层搜索条件 |
| | | menuType: PropTypes.any, // 菜单类型 |
| | | } |
| | | |
| | | state = { |
| | |
| | | * @description 数据加载 |
| | | */ |
| | | async loadData (hastimer) { |
| | | const { mainSearch, menuType } = this.props |
| | | const { mainSearch } = this.props |
| | | const { config, arr_field, BID } = this.state |
| | | |
| | | if (config.setting.supModule && !BID) { // BID 不存在时,不做查询 |
| | |
| | | } |
| | | |
| | | let _orderBy = config.setting.order || '' |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID, menuType) |
| | | let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | } |
| | | |
| | | // HS不使用自定义设置 |
| | | if (result.LongParamUser && this.props.menuType !== 'HS') { |
| | | if (result.LongParamUser && !window.GLOB.mkHS) { |
| | | try { // 配置信息解析 |
| | | let userConfig = JSON.parse(window.decodeURIComponent(window.atob(result.LongParamUser))) |
| | | if (userConfig) { |
| | |
| | | // 权限过滤 |
| | | let roleId = sessionStorage.getItem('role_id') || '' // 角色ID |
| | | let balMap = new Map() |
| | | let skip = config.permission === 'false' || this.props.menuType === 'HS' |
| | | let skip = config.permission === 'false' || window.GLOB.mkHS |
| | | config.components = this.filterComponent(config.components, roleId, permAction, balMap, skip) |
| | | |
| | | // 获取主搜索条件 |
| | |
| | | |
| | | loadOutResource = (inters) => { |
| | | let setting = inters.shift() |
| | | let param = UtilsDM.getPrevQueryParams(setting, [], this.state.BID, this.props.menuType) |
| | | let param = UtilsDM.getPrevQueryParams(setting, [], this.state.BID) |
| | | |
| | | Api.genericInterface(param).then(res => { |
| | | if (res.status) { |
| | |
| | | param.BID = this.state.BID |
| | | } |
| | | |
| | | if (this.props.menuType === 'HS') { // 函数 sPC_TableData_InUpDe 云端验证 |
| | | if (window.GLOB.mkHS) { // 函数 sPC_TableData_InUpDe 云端验证 |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | | } |
| | | } else { |
| | |
| | | } |
| | | |
| | | getComponents = () => { |
| | | const { menuType } = this.props |
| | | const { config, BID, data, mainSearch } = this.state |
| | | |
| | | if (!config || !config.components) return |
| | |
| | | if (item.type === 'bar' || item.type === 'line') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvBarAndLine config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <AntvBarAndLine config={item} data={data} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'pie') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvPie config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <AntvPie config={item} data={data} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'scatter') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvScatter config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <AntvScatter config={item} data={data} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'dashboard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvDashboard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <AntvDashboard config={item} data={data} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'simpleform') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <SimpleForm config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <SimpleForm config={item} data={data} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'stepform') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <StepForm config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <StepForm config={item} data={data} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'tabform') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <TabForm config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <TabForm config={item} data={data} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'search') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <MainSearch config={item} BID={BID} menuType={menuType} refreshdata={this.resetSearch} /> |
| | | <MainSearch config={item} BID={BID} refreshdata={this.resetSearch} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'tabs') { |
| | |
| | | } else if (item.type === 'card' && item.subtype === 'datacard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <DataCard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <DataCard config={item} data={data} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'propcard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <PropCard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <PropCard config={item} data={data} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'balcony') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Balcony config={item} data={data} BID={_bid} menuType={menuType} /> |
| | | <Balcony config={item} data={data} BID={_bid}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'timeline') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <TimeLine config={item} data={data} BID={_bid} menuType={menuType} /> |
| | | <TimeLine config={item} data={data} BID={_bid}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'carousel' && item.subtype === 'datacard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <CarouselDataCard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <CarouselDataCard config={item} data={data} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'carousel' && item.subtype === 'propcard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <CarouselPropCard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <CarouselPropCard config={item} data={data} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'tablecard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <TableCard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <TableCard config={item} data={data} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'normaltable') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <NormalTable config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <NormalTable config={item} data={data} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'editable') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <EditTable config={item} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <EditTable config={item} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'group' && item.subtype === 'normalgroup') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <NormalGroup config={item} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <NormalGroup config={item} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'editor') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <BraftEditor config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <BraftEditor config={item} data={data} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'tree') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <NormalTree config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <NormalTree config={item} data={data} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'code') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <SandBox config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <SandBox config={item} data={data} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'chart') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <CustomChart config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> |
| | | <CustomChart config={item} data={data} BID={_bid} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'module' && item.subtype === 'voucher') { |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { menuType } = this.props |
| | | const { loadingview, viewlost, config, loading, shortcuts } = this.state |
| | | |
| | | return ( |
| | | <div className={'custom-page-wrap ' + (loadingview || loading ? 'loading' : '')} id={this.state.ContainerId} style={config ? config.style : null}> |
| | | {(loadingview || loading) ? <Spin className="view-spin" size="large" /> : null} |
| | | <Row className="component-wrap">{this.getComponents()}</Row> |
| | | {menuType !== 'HS' && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null} |
| | | {menuType !== 'HS' && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null} |
| | | {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null} |
| | | {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null} |
| | | {viewlost ? <NotFount msg={this.state.lostmsg} /> : null} |
| | | </div> |
| | | ) |
| | |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | menuType: state.editLevel, |
| | | refreshTab: state.refreshTab, |
| | | permAction: state.permAction, |
| | | permMenus: state.permMenus |
| | |
| | | |
| | | class MainAction extends Component { |
| | | static propTpyes = { |
| | | menuType: PropTypes.any, // 菜单类型,普通菜单或HS |
| | | MenuID: PropTypes.string, // 菜单ID |
| | | primaryId: PropTypes.string, // 主键 |
| | | actions: PropTypes.array, // 按钮组 |
| | |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | } |
| | | |
| | | if (this.props.menuType === 'HS' && param.timestamp) { // 云端验证 |
| | | if (window.GLOB.mkHS && param.timestamp) { // 云端验证 |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | | } |
| | | |
| | |
| | | // 外部请求 |
| | | _outParam = JSON.parse(JSON.stringify(res)) |
| | | |
| | | if (this.props.menuType === 'HS') { |
| | | if (window.GLOB.mkHS) { |
| | | if (btn.sysInterface === 'true' && options.cloudServiceApi) { |
| | | res.rduri = options.cloudServiceApi |
| | | } else if (btn.sysInterface !== 'true') { |
| | |
| | | config.tabgroups = _tabgroups |
| | | } |
| | | |
| | | if (this.props.menuType !== 'HS') { |
| | | if (!window.GLOB.mkHS) { |
| | | config.action = config.action.filter(item => permAction[item.uuid]) |
| | | config.tabgroups.forEach(group => { |
| | | group.sublist = group.sublist.filter(tab => { |
| | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | |
| | | if (this.props.menuType === 'HS') { // 云端数据验证 |
| | | if (window.GLOB.mkHS) { // 云端数据验证 |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | | |
| | | if (item.database === 'sso' && options.cloudServiceApi) { // 存在云端地址时,使用云端系统参数 |
| | |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.DateCount = '' |
| | | |
| | | if (this.props.menuType !== 'HS') { // 云端数据验证 |
| | | if (!window.GLOB.mkHS) { // 云端数据验证 |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | | } |
| | | |
| | |
| | | if (setting.interType === 'inner') { |
| | | param.func = setting.innerFunc |
| | | } else { |
| | | if (this.props.menuType === 'HS') { |
| | | if (window.GLOB.mkHS) { |
| | | if (setting.sysInterface === 'true' && options.cloudServiceApi) { |
| | | param.rduri = options.cloudServiceApi |
| | | } else if (setting.sysInterface !== 'true') { |
| | |
| | | } |
| | | {hasform ? |
| | | <FormAction |
| | | menuType={this.props.menuType} |
| | | setting={setting} |
| | | actions={actions} |
| | | dict={this.state.dict} |
| | |
| | | ) |
| | | }) |
| | | } |
| | | {this.props.menuType !== 'HS' && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null} |
| | | {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null} |
| | | {viewlost ? <NotFount msg={this.state.lostmsg} /> : null} |
| | | </div> |
| | | ) |
| | |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | menuType: state.editLevel, |
| | | permAction: state.permAction |
| | | } |
| | | } |
| | |
| | | destroyOnClose |
| | | > |
| | | <MutilForm |
| | | menuType="HS" |
| | | dict={this.props.dict} |
| | | action={execAction} |
| | | inputSubmit={this.handleOk} |
| | |
| | | |
| | | return ( |
| | | <div className="script-manage-table" id={this.state.ContainerId}> |
| | | <MainSearch searchlist={searchlist} menuType="HS" refreshdata={this.refreshbysearch}/> |
| | | <MainSearch searchlist={searchlist} refreshdata={this.refreshbysearch}/> |
| | | <MainAction |
| | | BID="" |
| | | type="main" |
| | |
| | | config = updateSubTable(config) |
| | | |
| | | // 权限过滤 |
| | | if (this.props.menuType !== 'HS') { |
| | | if (!window.GLOB.mkHS) { |
| | | config.action = config.action.filter(item => item.hidden !== 'true' && permAction[item.uuid]) |
| | | } else { |
| | | config.action = config.action.filter(item => item.hidden !== 'true') |
| | |
| | | loadOutResource = (searches) => { |
| | | const { setting, BID } = this.state |
| | | |
| | | let param = UtilsDM.getPrevQueryParams(setting, searches, BID, this.props.menuType) |
| | | let param = UtilsDM.getPrevQueryParams(setting, searches, BID) |
| | | |
| | | if (setting.execType === 'sync') { |
| | | this.setState({ |
| | |
| | | param.BID = BID |
| | | } |
| | | |
| | | if (this.props.menuType === 'HS') { // 函数 sPC_TableData_InUpDe 云端验证 |
| | | if (window.GLOB.mkHS) { // 函数 sPC_TableData_InUpDe 云端验证 |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | | } |
| | | } else { |
| | |
| | | }) |
| | | |
| | | let _orderBy = orderBy || setting.order |
| | | let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, this.props.menuType) |
| | | let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | |
| | |
| | | }) |
| | | |
| | | let _orderBy = orderBy || setting.order |
| | | let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, this.props.menuType, id) |
| | | let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, id) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | if (statFields.length === 0 || !(setting.interType === 'system' || (setting.interType === 'custom' && setting.requestMode === 'system')) || !setting.dataresource) return |
| | | |
| | | let _orderBy = orderBy || setting.order |
| | | let param = UtilsDM.getStatQueryDataParams(setting, statFields, searches, _orderBy, BID, this.props.menuType) |
| | | let param = UtilsDM.getStatQueryDataParams(setting, statFields, searches, _orderBy, BID) |
| | | |
| | | Api.genericInterface(param).then(res => { |
| | | if (res.status) { |
| | |
| | | <div className="subtable" id={'subtable' + this.props.MenuID}> |
| | | {loadingview && <Spin />} |
| | | {searchlist && searchlist.length ? |
| | | <SubSearch BID={BID} setting={setting} searchlist={searchlist} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null |
| | | <SubSearch BID={BID} setting={setting} searchlist={searchlist} refreshdata={this.refreshbysearch}/> : null |
| | | } |
| | | {config && config.charts ? <Row className="chart-view" gutter={16}> |
| | | {/* 视图组 */} |
| | |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | menuType: state.editLevel, |
| | | permAction: state.permAction, |
| | | permMenus: state.permMenus, |
| | | } |
| | |
| | | } |
| | | |
| | | // 权限过滤 |
| | | if (this.props.menuType !== 'HS') { |
| | | if (!window.GLOB.mkHS) { |
| | | config.action = config.action.filter(item => item.hidden !== 'true' && permAction[item.uuid]) |
| | | } else { |
| | | config.action = config.action.filter(item => item.hidden !== 'true') |
| | |
| | | loadOutResource = (searches) => { |
| | | const { setting } = this.state |
| | | |
| | | let param = UtilsDM.getPrevQueryParams(setting, searches, this.props.BID, this.props.menuType) |
| | | let param = UtilsDM.getPrevQueryParams(setting, searches, this.props.BID) |
| | | |
| | | if (setting.execType === 'sync') { |
| | | this.setState({ |
| | |
| | | param.BID = this.props.BID |
| | | } |
| | | |
| | | if (this.props.menuType === 'HS') { // 函数 sPC_TableData_InUpDe 云端验证 |
| | | if (window.GLOB.mkHS) { // 函数 sPC_TableData_InUpDe 云端验证 |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | | } |
| | | } else { |
| | |
| | | }) |
| | | |
| | | let _orderBy = orderBy || setting.order |
| | | let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, this.props.menuType) |
| | | let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | |
| | |
| | | if (statFields.length === 0 || !(setting.interType === 'system' || (setting.interType === 'custom' && setting.requestMode === 'system')) || !setting.dataresource) return |
| | | |
| | | let _orderBy = orderBy || setting.order |
| | | let param = UtilsDM.getStatQueryDataParams(setting, statFields, searches, _orderBy, BID, this.props.menuType) |
| | | let param = UtilsDM.getStatQueryDataParams(setting, statFields, searches, _orderBy, BID) |
| | | |
| | | Api.genericInterface(param).then(res => { |
| | | if (res.status) { |
| | |
| | | }) |
| | | |
| | | let _orderBy = orderBy || setting.order |
| | | let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, this.props.menuType, id) |
| | | let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, id) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | <div className="subtabtable" id={'subtabtable' + this.props.MenuID}> |
| | | {loadingview && <Spin />} |
| | | {searchlist && searchlist.length ? |
| | | <SubSearch BID={this.props.BID} setting={setting} searchlist={searchlist} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null |
| | | <SubSearch BID={this.props.BID} setting={setting} searchlist={searchlist} refreshdata={this.refreshbysearch}/> : null |
| | | } |
| | | {config ? <div style={{minHeight: '25px'}}> |
| | | <SubAction |
| | |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | menuType: state.editLevel, |
| | | permAction: state.permAction, |
| | | memberLevel: state.memberLevel |
| | | permAction: state.permAction |
| | | } |
| | | } |
| | | |
| | |
| | | }) |
| | | |
| | | let arr_field = `${setting.valueField},${setting.labelField},${setting.parentField}` |
| | | let param = UtilsDM.getQueryDataParams(setting, arr_field, [], setting.order, '', '', BID, this.props.menuType) |
| | | let param = UtilsDM.getQueryDataParams(setting, arr_field, [], setting.order, '', '', BID) |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { menuType } = this.props |
| | | const { setting, loadingview, viewlost, config, tabgroups, treeNodes, treedata, expandedKeys, selectedKeys, shortcuts } = this.state |
| | | |
| | | return ( |
| | |
| | | )} |
| | | </Col> |
| | | </Row> : null} |
| | | {menuType !== 'HS' && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null} |
| | | {menuType !== 'HS' && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null} |
| | | {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null} |
| | | {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null} |
| | | {viewlost ? <NotFount msg={this.state.lostmsg} /> : null} |
| | | </div> |
| | | ) |
| | |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | menuType: state.editLevel, |
| | | permAction: state.permAction, |
| | | memberLevel: state.memberLevel |
| | | permAction: state.permAction |
| | | } |
| | | } |
| | | |
| | |
| | | destroyOnClose |
| | | > |
| | | <MutilForm |
| | | menuType="HS" |
| | | dict={this.props.dict} |
| | | action={execAction} |
| | | inputSubmit={this.handleOk} |
| | |
| | | |
| | | return ( |
| | | <div className="veruptable" id={this.state.ContainerId}> |
| | | <MainSearch searchlist={searchlist} menuType="HS" refreshdata={this.refreshbysearch}/> |
| | | <MainSearch searchlist={searchlist} refreshdata={this.refreshbysearch}/> |
| | | <MainAction |
| | | BID="" |
| | | type="main" |
| | |
| | | return ( |
| | | <div className="verup-subtable" id={'subtable' + this.props.MenuID}> |
| | | {searchlist && searchlist.length ? |
| | | <MainSearch searchlist={searchlist} menuType="HS" refreshdata={this.refreshbysearch}/> : null |
| | | <MainSearch searchlist={searchlist} refreshdata={this.refreshbysearch}/> : null |
| | | } |
| | | {actions ? |
| | | <div className="sub-action"> |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import moment from 'moment' |
| | | import {connect} from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Button, Modal, notification, message } from 'antd' |
| | | |
| | |
| | | param.LText = Utils.formatOptions(result.sql) |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | if (this.props.menuType === 'HS' && param.timestamp) { // 云端验证 |
| | | if (window.GLOB.mkHS && param.timestamp) { // 云端验证 |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | | } |
| | | |
| | |
| | | // 外部请求 |
| | | _outParam = fromJS(res).toJS() |
| | | |
| | | if (this.props.menuType === 'HS') { |
| | | if (window.GLOB.mkHS) { |
| | | if (btn.sysInterface === 'true' && options.cloudServiceApi) { |
| | | param.rduri = options.cloudServiceApi |
| | | } else if (btn.sysInterface !== 'true') { |
| | |
| | | res.func = btn.outerFunc |
| | | } |
| | | |
| | | if (this.props.menuType === 'HS' && res.func === 's_sDataDictb_excelIn') { // s_sDataDictb_excelIn 云端验证 |
| | | if (window.GLOB.mkHS && res.func === 's_sDataDictb_excelIn') { // s_sDataDictb_excelIn 云端验证 |
| | | param.LText = Utils.formatOptions(result.sql) |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | |
| | | } |
| | | } |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | menuType: state.editLevel |
| | | } |
| | | } |
| | | |
| | | const mapDispatchToProps = () => { |
| | | return {} |
| | | } |
| | | |
| | | export default connect(mapStateToProps, mapDispatchToProps)(ExcelInButton) |
| | | export default ExcelInButton |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import moment from 'moment' |
| | | import {connect} from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Button, Modal, notification, message } from 'antd' |
| | | import * as XLSX from 'xlsx' |
| | |
| | | } else if (btn.intertype === 'outer' && !btn.innerFunc) { // 使用外部函数 |
| | | let param = this.getExcelCustomParam(viewParam.orderBy, viewParam.search) |
| | | |
| | | if (this.props.menuType === 'HS') { |
| | | if (window.GLOB.mkHS) { |
| | | if (btn.sysInterface === 'true' && options.cloudServiceApi) { |
| | | param.rduri = options.cloudServiceApi |
| | | } else if (btn.sysInterface !== 'true') { |
| | |
| | | delete res.message |
| | | delete res.status |
| | | |
| | | if (this.props.menuType === 'HS') { |
| | | if (window.GLOB.mkHS) { |
| | | if (btn.sysInterface === 'true' && options.cloudServiceApi) { |
| | | res.rduri = options.cloudServiceApi |
| | | } else if (btn.sysInterface !== 'true') { |
| | |
| | | delete res.message |
| | | delete res.status |
| | | |
| | | if (this.props.menuType === 'HS') { |
| | | if (window.GLOB.mkHS) { |
| | | if (btn.sysInterface === 'true' && options.cloudServiceApi) { |
| | | res.rduri = options.cloudServiceApi |
| | | } else if (btn.sysInterface !== 'true') { |
| | |
| | | } else if (btn.intertype === 'outer' && !btn.innerFunc) { // 使用外部函数 |
| | | param = this.getExcelCustomParam(viewParam.orderBy, viewParam.search, true, pageIndex, pageSize) |
| | | |
| | | if (this.props.menuType === 'HS') { |
| | | if (window.GLOB.mkHS) { |
| | | if (btn.sysInterface === 'true' && options.cloudServiceApi) { |
| | | param.rduri = options.cloudServiceApi |
| | | } else if (btn.sysInterface !== 'true') { |
| | |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.LText = Utils.formatOptions(script) |
| | | |
| | | if (this.props.menuType === 'HS') { // 函数 sPC_TableData_InUpDe 云端验证 |
| | | if (window.GLOB.mkHS) { // 函数 sPC_TableData_InUpDe 云端验证 |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | | } |
| | | |
| | |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.DateCount = '' |
| | | |
| | | if (this.props.menuType === 'HS') { // 云端数据验证 |
| | | if (window.GLOB.mkHS) { // 云端数据验证 |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | menuType: state.editLevel |
| | | } |
| | | } |
| | | |
| | | const mapDispatchToProps = () => { |
| | | return {} |
| | | } |
| | | |
| | | export default connect(mapStateToProps, mapDispatchToProps)(ExcelOutButton) |
| | | export default ExcelOutButton |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import moment from 'moment' |
| | | import {connect} from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Button, Modal, notification, message, Drawer, Switch, Checkbox, Progress } from 'antd' |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | if (this.props.menuType === 'HS') { // 函数 sPC_TableData_InUpDe 云端验证 |
| | | if (window.GLOB.mkHS) { // 函数 sPC_TableData_InUpDe 云端验证 |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | | if (check_param) { |
| | | check_param.open_key = Utils.encryptOpenKey(check_param.secretkey, check_param.timestamp) |
| | |
| | | } |
| | | } |
| | | |
| | | if (this.props.menuType === 'HS') { // 函数 sPC_TableData_InUpDe 云端验证 |
| | | if (window.GLOB.mkHS) { // 函数 sPC_TableData_InUpDe 云端验证 |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | | } |
| | | |
| | |
| | | }) |
| | | } |
| | | |
| | | if (this.props.menuType === 'HS' && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { // 函数 s_sDataDictb_TBBack 云端验证 |
| | | if (window.GLOB.mkHS && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { // 函数 s_sDataDictb_TBBack 云端验证 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LTextOut, param.timestamp) |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | |
| | | param[setting.primaryKey] = primaryId |
| | | } |
| | | |
| | | if (this.props.menuType === 'HS' && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { // 函数 s_sDataDictb_TBBack 云端验证 |
| | | if (window.GLOB.mkHS && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { // 函数 s_sDataDictb_TBBack 云端验证 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LTextOut, param.timestamp) |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | |
| | | param.s_debug_type = 'Y' |
| | | } |
| | | |
| | | if (this.props.menuType === 'HS') { // 函数 sPC_TableData_InUpDe 云端验证 |
| | | if (window.GLOB.mkHS) { // 函数 sPC_TableData_InUpDe 云端验证 |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | | } |
| | | } else { |
| | |
| | | param.func = btn.innerFunc |
| | | |
| | | // 函数 s_sDataDictb_TBBack 云端验证 |
| | | if (this.props.menuType === 'HS' && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { |
| | | if (window.GLOB.mkHS && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LTextOut, param.timestamp) |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | |
| | | if (btn.outerFunc) { |
| | | res.func = btn.outerFunc |
| | | } |
| | | if (this.props.menuType === 'HS') { |
| | | if (window.GLOB.mkHS) { |
| | | if (btn.sysInterface === 'true' && options.cloudServiceApi) { |
| | | res.rduri = options.cloudServiceApi |
| | | } else if (btn.sysInterface !== 'true') { |
| | |
| | | let _callbackparam = {..._outParam, ...response} |
| | | |
| | | // 函数 s_sDataDictb_TBBack 云端验证 |
| | | if (this.props.menuType === 'HS' && _callbackparam.func === 's_sDataDictb_TBBack' && _callbackparam.LTextOut) { |
| | | if (window.GLOB.mkHS && _callbackparam.func === 's_sDataDictb_TBBack' && _callbackparam.LTextOut) { |
| | | _callbackparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | _callbackparam.secretkey = Utils.encrypt(_callbackparam.LTextOut, _callbackparam.timestamp) |
| | | _callbackparam.open_key = Utils.encryptOpenKey(_callbackparam.secretkey, _callbackparam.timestamp) |
| | |
| | | <MutilForm |
| | | BID={BID} |
| | | dict={this.state.dict} |
| | | menuType={this.props.menuType} |
| | | action={btnconfig} |
| | | inputSubmit={this.handleOk} |
| | | data={this.state.selines[0]} |
| | |
| | | <MutilForm |
| | | BID={BID} |
| | | dict={this.state.dict} |
| | | menuType={this.props.menuType} |
| | | action={btnconfig} |
| | | inputSubmit={this.handleOk} |
| | | data={this.state.selines[0]} |
| | |
| | | } |
| | | } |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | menuType: state.editLevel |
| | | } |
| | | } |
| | | |
| | | const mapDispatchToProps = () => { |
| | | return {} |
| | | } |
| | | |
| | | export default connect(mapStateToProps, mapDispatchToProps)(NormalButton) |
| | | export default NormalButton |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import moment from 'moment' |
| | | import {connect} from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Button, Modal, notification, message } from 'antd' |
| | | |
| | |
| | | // 外部请求 |
| | | _outParam = JSON.parse(JSON.stringify(res)) |
| | | |
| | | if (this.props.menuType === 'HS') { |
| | | if (window.GLOB.mkHS) { |
| | | if (btn.sysInterface === 'true' && options.cloudServiceApi) { |
| | | res.rduri = options.cloudServiceApi |
| | | } else if (btn.sysInterface !== 'true') { |
| | |
| | | <MutilForm |
| | | BID={BID} |
| | | dict={this.state.dict} |
| | | menuType={this.props.menuType} |
| | | action={btnconfig} |
| | | inputSubmit={this.handleOk} |
| | | data={this.state.selines[0]} |
| | |
| | | } |
| | | } |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | menuType: state.editLevel |
| | | } |
| | | } |
| | | |
| | | const mapDispatchToProps = () => { |
| | | return {} |
| | | } |
| | | |
| | | export default connect(mapStateToProps, mapDispatchToProps)(PrintButton) |
| | | export default PrintButton |
| | |
| | | |
| | | class MainSearch extends Component { |
| | | static propTpyes = { |
| | | menuType: PropTypes.object, // 菜单类型,是否为HS |
| | | action: PropTypes.object, // 按钮信息、表单列表 |
| | | data: PropTypes.any, // 表格数据 |
| | | BID: PropTypes.any, // 主表ID |
| | |
| | | } |
| | | |
| | | if (deForms.length > 0) { |
| | | if (this.props.menuType !== 'HS' && options.sysType === 'local' && window.GLOB.systemType !== 'production') { |
| | | if (!window.GLOB.mkHS && options.sysType === 'local' && window.GLOB.systemType !== 'production') { |
| | | this.improveSimpleActionForm(deForms) |
| | | } else { |
| | | this.improveActionForm(deForms) |
| | |
| | | * @description 获取下拉表单选项信息 |
| | | */ |
| | | improveActionForm = (deForms) => { |
| | | const { BID, menuType, action } = this.props |
| | | const { BID, action } = this.props |
| | | |
| | | let deffers = [] |
| | | let mainItems = [] // 云端或单点数据 |
| | |
| | | } |
| | | }) |
| | | |
| | | if (menuType !== 'HS' && options.sysType !== 'local') { |
| | | if (!window.GLOB.mkHS && options.sysType !== 'local') { |
| | | localItems = [...localItems, ...mainItems] |
| | | mainItems = [] |
| | | } |
| | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | |
| | | if (menuType === 'HS') { // 云端数据验证 |
| | | if (window.GLOB.mkHS) { // 云端数据验证 |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | | } |
| | | |
| | |
| | | mainparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | mainparam.secretkey = Utils.encrypt(mainparam.LText, mainparam.timestamp) |
| | | |
| | | if (menuType === 'HS') { // 云端数据验证 |
| | | if (window.GLOB.mkHS) { // 云端数据验证 |
| | | mainparam.open_key = Utils.encryptOpenKey(mainparam.secretkey, mainparam.timestamp) |
| | | if (options.cloudServiceApi) { |
| | | mainparam.rduri = options.cloudServiceApi |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import md5 from 'md5' |
| | | import { connect } from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Table, Affix, Typography } from 'antd' |
| | | |
| | |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | const { menuType, memberLevel, pageSize, setting } = this.props |
| | | const { pageSize, setting } = this.props |
| | | let columns = fromJS(this.props.columns).toJS() |
| | | let lineMarks = [] |
| | | let _columns = [] |
| | |
| | | _columns.push(cell) |
| | | }) |
| | | } else { |
| | | if (window.GLOB.dataFormat && menuType !== 'HS' && memberLevel) { |
| | | if (window.GLOB.dataFormat && !window.GLOB.mkHS) { |
| | | _format = true |
| | | |
| | | if (memberLevel >= 30) { |
| | | if (window.GLOB.memberLevel >= 30) { |
| | | radio = 20 |
| | | } else if (memberLevel >= 20) { |
| | | } else if (window.GLOB.memberLevel >= 20) { |
| | | radio = 10 |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | menuType: state.editLevel, |
| | | memberLevel: state.memberLevel |
| | | } |
| | | } |
| | | |
| | | const mapDispatchToProps = () => { |
| | | return {} |
| | | } |
| | | |
| | | export default connect(mapStateToProps, mapDispatchToProps)(NormalTable) |
| | | export default NormalTable |
| | |
| | | class MainSearch extends Component { |
| | | static propTpyes = { |
| | | BID: PropTypes.any, // 父级Id,用于查询下拉选择项 |
| | | menuType: PropTypes.any, // 菜单权限,是否为HS |
| | | searchlist: PropTypes.array, // 搜索条件列表 |
| | | config: PropTypes.object, // 组件配置信息(自定义页面) |
| | | setting: PropTypes.object, // 组件配置信息(自定义页面) |
| | |
| | | record = {} |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | const { config, menuType, searchlist, setting } = this.props |
| | | const { config, searchlist, setting } = this.props |
| | | |
| | | let _searchlist = [] |
| | | let fieldMap = new Map() |
| | |
| | | let _option = Utils.getSelectQueryOptions(item) |
| | | |
| | | // 测试系统单个请求 |
| | | if (menuType !== 'HS' && options.sysType === 'local' && !window.GLOB.systemType) { |
| | | if (!window.GLOB.mkHS && options.sysType === 'local' && !window.GLOB.systemType) { |
| | | deForms.push({ |
| | | ...item, |
| | | arr_field: _option.field, |
| | |
| | | advanceValues, |
| | | searchlist: _list |
| | | }, () => { |
| | | if (menuType !== 'HS' && options.sysType === 'local' && !window.GLOB.systemType) { |
| | | if (!window.GLOB.mkHS && options.sysType === 'local' && !window.GLOB.systemType) { |
| | | this.improveSimpleSearch(deForms) |
| | | } else { |
| | | this.improveSearch(mainItems, localItems) |
| | |
| | | |
| | | // 查询下拉菜单 |
| | | improveSearch = (mainItems, localItems) => { |
| | | const { menuType, BID } = this.props |
| | | const { BID } = this.props |
| | | let deffers = [] |
| | | |
| | | if (menuType !== 'HS' && window.GLOB.systemType !== 'production') { |
| | | if (!window.GLOB.mkHS && window.GLOB.systemType !== 'production') { |
| | | localItems = [...localItems, ...mainItems] |
| | | mainItems = [] |
| | | } |
| | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | |
| | | if (menuType === 'HS') { // 云端数据验证 |
| | | if (window.GLOB.mkHS) { // 云端数据验证 |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | | } |
| | | |
| | |
| | | mainparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | mainparam.secretkey = Utils.encrypt(mainparam.LText, mainparam.timestamp) |
| | | |
| | | if (menuType === 'HS') { // 云端数据验证 |
| | | if (window.GLOB.mkHS) { // 云端数据验证 |
| | | mainparam.open_key = Utils.encryptOpenKey(mainparam.secretkey, mainparam.timestamp) |
| | | if (options.cloudServiceApi) { |
| | | mainparam.rduri = options.cloudServiceApi |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import {connect} from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { DndProvider } from 'react-dnd' |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | |
| | | } |
| | | } |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | memberLevel: state.memberLevel |
| | | } |
| | | } |
| | | |
| | | const mapDispatchToProps = () => { |
| | | return {} |
| | | } |
| | | |
| | | export default connect(mapStateToProps, mapDispatchToProps)(SubTableConfig) |
| | | export default SubTableConfig |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { connect } from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { DndProvider } from 'react-dnd' |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | |
| | | } |
| | | } |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | memberLevel: state.memberLevel |
| | | } |
| | | } |
| | | |
| | | const mapDispatchToProps = () => { |
| | | return {} |
| | | } |
| | | |
| | | export default connect(mapStateToProps, mapDispatchToProps)(ComTableConfig) |
| | | export default ComTableConfig |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import {connect} from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { DndProvider } from 'react-dnd' |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | |
| | | } |
| | | } |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | memberLevel: state.memberLevel |
| | | } |
| | | } |
| | | |
| | | const mapDispatchToProps = () => { |
| | | return {} |
| | | } |
| | | |
| | | export default connect(mapStateToProps, mapDispatchToProps)(SubTableConfig) |
| | | export default SubTableConfig |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { connect } from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { DndProvider } from 'react-dnd' |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | |
| | | } |
| | | } |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | memberLevel: state.memberLevel |
| | | } |
| | | } |
| | | |
| | | const mapDispatchToProps = () => { |
| | | return {} |
| | | } |
| | | |
| | | export default connect(mapStateToProps, mapDispatchToProps)(ComTableConfig) |
| | | export default ComTableConfig |
| | |
| | | * @param {Number} pageIndex 页码 |
| | | * @param {Number} pageSize 每页数量 |
| | | * @param {String} BID 上级ID |
| | | * @param {String} menuType 菜单类型,普通菜单与HS |
| | | * @return {Object} param |
| | | */ |
| | | static getQueryDataParams (setting, arrFields, search = [], orderBy = '', pageIndex = 1, pageSize = 10, BID, menuType, id) { |
| | | static getQueryDataParams (setting, arrFields, search = [], orderBy = '', pageIndex = 1, pageSize = 10, BID, id) { |
| | | let param = null |
| | | |
| | | if (setting.interType === 'system' || (setting.interType === 'custom' && setting.requestMode === 'system')) { |
| | | param = this.getDefaultQueryParam(setting, arrFields, search, orderBy, pageIndex, pageSize, menuType, id, BID) |
| | | param = this.getDefaultQueryParam(setting, arrFields, search, orderBy, pageIndex, pageSize, id, BID) |
| | | } else { |
| | | param = this.getCustomQueryParam(setting, search, orderBy, pageIndex, pageSize, menuType, id) |
| | | param = this.getCustomQueryParam(setting, search, orderBy, pageIndex, pageSize, id) |
| | | } |
| | | |
| | | if (BID) { |
| | |
| | | /** |
| | | * @description 获取用户自定义存储过程传参 |
| | | */ |
| | | static getCustomQueryParam (setting, search, orderBy, pageIndex, pageSize, menuType, id) { |
| | | static getCustomQueryParam (setting, search, orderBy, pageIndex, pageSize, id) { |
| | | let param = Utils.formatCustomMainSearch(search) |
| | | |
| | | if (orderBy) { |
| | |
| | | if (setting.interType === 'inner' || (setting.interType === 'custom' && setting.requestMode === 'inner')) { |
| | | param.func = setting.innerFunc |
| | | } else { |
| | | if (menuType === 'HS') { |
| | | if (window.GLOB.mkHS) { |
| | | if (setting.sysInterface === 'true' && options.cloudServiceApi) { |
| | | param.rduri = options.cloudServiceApi |
| | | } else if (setting.sysInterface !== 'true') { |
| | |
| | | /** |
| | | * @description 获取系统存储过程 sPC_Get_TableData 的参数 |
| | | */ |
| | | static getDefaultQueryParam (setting, arrFields, search, orderBy, pageIndex, pageSize, menuType, id, BID) { |
| | | static getDefaultQueryParam (setting, arrFields, search, orderBy, pageIndex, pageSize, id, BID) { |
| | | let param = { |
| | | func: 'sPC_Get_TableData', |
| | | obj_name: 'data', |
| | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | | if (menuType === 'HS') { // 云端数据验证 |
| | | if (window.GLOB.mkHS) { // 云端数据验证 |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | | } |
| | | |
| | |
| | | /** |
| | | * @description 获取系统存储过程 sPC_Get_TableData 合计值的参数 |
| | | */ |
| | | static getStatQueryDataParams (setting, statFields, search, orderBy, BID, menuType) { |
| | | static getStatQueryDataParams (setting, statFields, search, orderBy, BID) { |
| | | let param = { |
| | | func: 'sPC_Get_TableData', |
| | | obj_name: 'data', |
| | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | | if (menuType === 'HS') { // 云端数据验证 |
| | | if (window.GLOB.mkHS) { // 云端数据验证 |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | | } |
| | | |
| | |
| | | * @param {Number} pageIndex 页码 |
| | | * @param {Number} pageSize 每页数量 |
| | | * @param {String} BID 上级ID |
| | | * @param {String} menuType 菜单类型,普通菜单与HS |
| | | * @return {Object} param |
| | | */ |
| | | static getPrevQueryParams (setting, search = [], BID, menuType) { |
| | | static getPrevQueryParams (setting, search = [], BID) { |
| | | let param = null |
| | | |
| | | if (setting.procMode !== 'inner') { |
| | | param = this.getDefaultPrevQueryParam(setting, search, menuType, BID) |
| | | param = this.getDefaultPrevQueryParam(setting, search, BID) |
| | | } else { |
| | | param = Utils.formatCustomMainSearch(search) |
| | | param.func = setting.prevFunc || '' |
| | |
| | | /** |
| | | * @description 获取系统前置脚本 |
| | | */ |
| | | static getDefaultPrevQueryParam (setting, search, menuType, BID) { |
| | | static getDefaultPrevQueryParam (setting, search, BID) { |
| | | let param = { |
| | | func: 'sPC_TableData_InUpDe', |
| | | exec_type: 'y', |
| | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | | if (menuType === 'HS') { // 函数 sPC_TableData_InUpDe 云端验证 |
| | | if (window.GLOB.mkHS) { // 函数 sPC_TableData_InUpDe 云端验证 |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | | } |
| | | |
| | |
| | | |
| | | export default class Utils { |
| | | /** |
| | | * @description 获取会员等级 |
| | | * @return {String} level |
| | | */ |
| | | static getMemberLevel () { |
| | | let _level = 10 |
| | | let _Mlevel = sessionStorage.getItem('Member_Level') |
| | | |
| | | if (_Mlevel) { |
| | | if (_Mlevel === md5('mksoft' + window.GLOB.appkey + new Date().getFullYear() + new Date().getMonth() + 10)) { |
| | | _level = 10 |
| | | } else if (_Mlevel === md5('mksoft' + window.GLOB.appkey + new Date().getFullYear() + new Date().getMonth() + 20)) { |
| | | _level = 20 |
| | | } else if (_Mlevel === md5('mksoft' + window.GLOB.appkey + new Date().getFullYear() + new Date().getMonth() + 30)) { |
| | | _level = 30 |
| | | } |
| | | } |
| | | return _level |
| | | } |
| | | |
| | | /** |
| | | * @description 数据源名称,用于统一查询 |
| | | * @return {String} name |
| | | */ |
| | |
| | | _pars.push(param) |
| | | } else { |
| | | let arr_field = component.columns.map(col => col.field).join(',') |
| | | let param = UtilsDM.getQueryDataParams(component.setting, arr_field, [], component.setting.order || '', 1, 1000, BID, '') |
| | | let param = UtilsDM.getQueryDataParams(component.setting, arr_field, [], component.setting.order || '', 1, 1000, BID) |
| | | |
| | | param.componentId = component.uuid |
| | | |
| | |
| | | if (item.type === 'bar' || item.type === 'line') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvBarAndLine config={item} initdata={item.data} mainSearch={[]} menuType="" /> |
| | | <AntvBarAndLine config={item} initdata={item.data} mainSearch={[]} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'pie') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvPie config={item} initdata={item.data} mainSearch={[]} menuType="" /> |
| | | <AntvPie config={item} initdata={item.data} mainSearch={[]} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'scatter') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvScatter config={item} initdata={item.data} mainSearch={[]} menuType="" /> |
| | | <AntvScatter config={item} initdata={item.data} mainSearch={[]}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'dashboard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvDashboard config={item} initdata={item.data} mainSearch={[]} menuType="" /> |
| | | <AntvDashboard config={item} initdata={item.data} mainSearch={[]}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'datacard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <DataCard config={item} initdata={item.data} mainSearch={[]} menuType="" /> |
| | | <DataCard config={item} initdata={item.data} mainSearch={[]} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'propcard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <PropCard config={item} initdata={item.data} mainSearch={[]} menuType="" /> |
| | | <PropCard config={item} initdata={item.data} mainSearch={[]} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'tablecard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <TableCard config={item} initdata={item.data} mainSearch={[]} menuType="" /> |
| | | <TableCard config={item} initdata={item.data} mainSearch={[]}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'normaltable') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <NormalTable config={item} initdata={item.data} mainSearch={[]} menuType="" /> |
| | | <NormalTable config={item} initdata={item.data} mainSearch={[]}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'code') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <SandBox config={item} initdata={item.data} mainSearch={[]} menuType="" /> |
| | | <SandBox config={item} initdata={item.data} mainSearch={[]}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'balcony') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Balcony config={item} initdata={item.data} menuType="" /> |
| | | <Balcony config={item} initdata={item.data}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'timeline') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <TimeLine config={item} initdata={item.data} menuType="" /> |
| | | <TimeLine config={item} initdata={item.data}/> |
| | | </Col> |
| | | ) |
| | | } else { |
| | |
| | | import MKEmitter from '@/utils/events.js' |
| | | import './index.scss' |
| | | |
| | | const EditMenu = asyncComponent(() => import('@/templates/menuconfig/editfirstmenu')) |
| | | const EditMenu = asyncComponent(() => import('./editfirstmenu')) |
| | | const VersionsUp = asyncComponent(() => import('./versions')) |
| | | const { confirm } = Modal |
| | | |
| | |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | userName: sessionStorage.getItem('CloudUserName'), |
| | | avatar: Utils.getrealurl(sessionStorage.getItem('CloudAvatar')), |
| | | memberLevel: Utils.getMemberLevel() |
| | | } |
| | | |
| | | logout = () => { |
| | |
| | | this.props.modifyMenuTree(menulist) |
| | | if (window.GLOB.systemType !== 'production') { // 非正式系统选择第一项 |
| | | this.props.modifyMainMenu(menulist[0] || null) |
| | | } else { |
| | | this.props.resetEditLevel('HS') |
| | | window.GLOB.mkHS = true |
| | | this.props.modifyMainMenu({ |
| | | MenuID: 'systemManageView' |
| | | }) |
| | | } |
| | | } else { |
| | | notification.error({ |
| | |
| | | trdItem.type = trdItem.PageParam.Template || trdItem.type |
| | | trdItem.OpenType = trdItem.PageParam.OpenType || trdItem.OpenType |
| | | |
| | | if (trdItem.type === 'CustomPage' && this.props.memberLevel < 20) { // 会员等级大于等于20时,有编辑权限 |
| | | if (trdItem.type === 'CustomPage' && this.state.memberLevel < 20) { // 会员等级大于等于20时,有编辑权限 |
| | | trdItem.forbidden = true |
| | | } |
| | | } |
| | |
| | | |
| | | if (editLevel === 'HS') return |
| | | |
| | | window.GLOB.mkHS = true |
| | | this.props.resetEditLevel('HS') |
| | | this.props.modifyMainMenu({ |
| | | MenuID: 'systemManageView' |
| | |
| | | |
| | | this.props.modifyMainMenu(menulist[0] || null) |
| | | this.props.resetEditLevel(false) |
| | | window.GLOB.mkHS = false |
| | | |
| | | MKEmitter.emit('modifyTabs', null, 'replace') |
| | | } |
| | |
| | | exitEdit = () => { |
| | | // 退出编辑状态 |
| | | this.props.resetEditLevel(false) |
| | | window.GLOB.mkHS = false |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | |
| | | } |
| | | }) |
| | | }, 50) |
| | | } else if (window.GLOB.systemType === 'production') { |
| | | this.props.resetEditLevel('HS') |
| | | this.props.modifyMainMenu({ |
| | | MenuID: 'systemManageView' |
| | | }) |
| | | } |
| | | |
| | | window.addEventListener('storage', (e) => { |
| | | if (e.key !== 'menuUpdate') return |
| | | |
| | | this.reload() |
| | | }) |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | |
| | | |
| | | render () { |
| | | const { mainMenu, editLevel } = this.props |
| | | const { menulist } = this.state |
| | | const { menulist, memberLevel } = this.state |
| | | |
| | | return ( |
| | | <header className={'sys-header-container ant-menu-dark ' + (['level2', 'level3', 'HS'].includes(editLevel) ? 'mask' : '')} id="main-header-container"> |
| | |
| | | <div className="icon"><AppstoreOutlined /></div> |
| | | <div className="title">应用管理</div> |
| | | <div className="detail">可创建及管理PC、pad及移动端等不同设备的应用,实现明科云APP、微信公众号、小程序等多平台的应用共享。</div> |
| | | <Button type="primary" disabled={!(this.props.memberLevel >= 20)} title={this.props.memberLevel >= 20 ? '' : '会员等级不够,无开发权限。'} onClick={() => {window.open('#/appmanage')}}> |
| | | <Button type="primary" disabled={!(memberLevel >= 20)} title={memberLevel >= 20 ? '' : '会员等级不够,无开发权限。'} onClick={() => {window.open('#/appmanage')}}> |
| | | 编辑 |
| | | </Button> |
| | | </div> : null |
| | |
| | | <div className="icon"><AppstoreOutlined /></div> |
| | | <div className="title">应用管理</div> |
| | | <div className="detail">可创建及管理PC、pad及移动端等不同设备的应用,实现明科云APP、微信公众号、小程序等多平台的应用共享。</div> |
| | | <Button type="primary" disabled={!(this.props.memberLevel >= 20)} title={this.props.memberLevel >= 20 ? '' : '会员等级不够,无开发权限。'} onClick={() => {window.open('#/appcheck')}}> |
| | | <Button type="primary" disabled={!(memberLevel >= 20)} title={memberLevel >= 20 ? '' : '会员等级不够,无开发权限。'} onClick={() => {window.open('#/appcheck')}}> |
| | | 查看 |
| | | </Button> |
| | | </div> : null |
| | |
| | | <div className="icon"><ApiOutlined /></div> |
| | | <div className="title">接口调试</div> |
| | | <div className="detail">可自动处理登录接口的参数加密,以及业务接口的签名计算,方便开发人员的接口测试工作。</div> |
| | | <Button type="primary" disabled={!(this.props.memberLevel >= 20)} title={this.props.memberLevel >= 20 ? '' : '会员等级不够,无开发权限。'} onClick={() => {window.open('#/interface')}}> |
| | | <Button type="primary" disabled={!(memberLevel >= 20)} title={memberLevel >= 20 ? '' : '会员等级不够,无开发权限。'} onClick={() => {window.open('#/interface')}}> |
| | | 编辑 |
| | | </Button> |
| | | </div> : null |
| | |
| | | <div className="icon"><HomeOutlined /></div> |
| | | <div className="title">首页</div> |
| | | <div className="detail">基于自定义页面的首页设计,可实现灵活的元素配置及样式调整,展现当前系统的风格。</div> |
| | | <Button type="primary" disabled={!(this.props.memberLevel >= 20)} title={this.props.memberLevel >= 20 ? '' : '会员等级不够,无开发权限。'} onClick={() => {window.open('#/menudesign/JTdCJTIyTWVudVR5cGUlMjIlM0ElMjJob21lJTIyJTJDJTIyTWVudUlkJTIyJTNBJTIyaG9tZV9wYWdlX2lkJTIyJTJDJTIyTWVudU5hbWUlMjIlM0ElMjIlRTklQTYlOTYlRTklQTElQjUlMjIlN0Q=')}}> |
| | | <Button type="primary" disabled={!(memberLevel >= 20)} title={memberLevel >= 20 ? '' : '会员等级不够,无开发权限。'} onClick={() => {window.open('#/menudesign/JTdCJTIyTWVudVR5cGUlMjIlM0ElMjJob21lJTIyJTJDJTIyTWVudUlkJTIyJTNBJTIyaG9tZV9wYWdlX2lkJTIyJTJDJTIyTWVudU5hbWUlMjIlM0ElMjIlRTklQTYlOTYlRTklQTElQjUlMjIlN0Q=')}}> |
| | | 编辑 |
| | | </Button> |
| | | </div> : null |
| | |
| | | menuTree: state.menuTree, |
| | | mainMenu: state.mainMenu, |
| | | editLevel: state.editLevel, |
| | | permAction: state.permAction, |
| | | memberLevel: state.memberLevel |
| | | permAction: state.permAction |
| | | } |
| | | } |
| | | |
File was renamed from src/templates/menuconfig/editthdmenu/index.jsx |
| | |
| | | } |
| | | |
| | | getUsedTemplate = () => { |
| | | const { memberLevel } = this.props |
| | | let { sysTemplates } = this.state |
| | | let memberLevel = Utils.getMemberLevel() |
| | | const illust = { // 模板图片,用于已使用模板 |
| | | CommonTable: mainsubtable, |
| | | TreePage: treepage, |
| | |
| | | {this.state.usedTemplates && this.state.usedTemplates.map((template, index) => { |
| | | if (template.title.toLowerCase().indexOf(this.state.tempSearchKey.toLowerCase()) >= 0) { |
| | | return ( |
| | | <Col key={template.type + index} className={template.disabled ? 'disabled' : ''} title={template.disTitle || ''} span={8}> |
| | | <Col key={template.type + index} className={template.disabled ? 'disabled' : ''} title={template.disTitle || ''} span={6}> |
| | | <Card |
| | | title={template.title}> |
| | | <img onClick={() => {this.previewPicture(template)}} src={template.url} alt=""/> |
| | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | mainMenu: state.mainMenu, |
| | | menuTree: state.menuTree, |
| | | memberLevel: state.memberLevel |
| | | menuTree: state.menuTree |
| | | } |
| | | } |
| | | |
| | |
| | | import React, {Component} from 'react' |
| | | import { connect } from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Menu, notification, Popover } from 'antd' |
| | | import { EditOutlined, CloseOutlined, SwapOutlined, PlusOutlined, UnlockOutlined, SettingOutlined } from '@ant-design/icons' |
| | | import { Menu, notification, Popover, Modal, Spin } from 'antd' |
| | | import { EditOutlined, SwapOutlined, PlusOutlined, UnlockOutlined, SettingOutlined } from '@ant-design/icons' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import { resetEditLevel, modifyMenuTree, modifyMainMenu } from '@/store/action' |
| | |
| | | import MkIcon from '@/components/mk-icon' |
| | | import './index.scss' |
| | | |
| | | const EditSecMenu = asyncComponent(() => import('@/templates/menuconfig/editsecmenu')) |
| | | const EditThdMenu = asyncComponent(() => import('@/templates/menuconfig/editthdmenu')) |
| | | const EditSecMenu = asyncComponent(() => import('./editsecmenu')) |
| | | const EditThdMenu = asyncComponent(() => import('./editthdmenu')) |
| | | const TransferForm = asyncComponent(() => import('@/templates/zshare/basetransferform')) |
| | | const { SubMenu } = Menu |
| | | |
| | | class Sidemenu extends Component { |
| | |
| | | |
| | | render () { |
| | | const { mainMenu, editLevel } = this.props |
| | | const { visible } = this.state |
| | | |
| | | let isnew = false |
| | | let isnew = true |
| | | |
| | | return ( |
| | | <aside className="mk-sys-side-menu ant-menu-dark mk-edit"> |
| | |
| | | {item.children.map(cell => { |
| | | return ( |
| | | <Menu.Item key={cell.MenuID}> |
| | | {editLevel !== 'HS' && isnew ? |
| | | <Popover overlayClassName="mk-popover-control-wrap mk-menu-control" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <EditOutlined className="edit" onClick={() => this.editmenu(cell)} /> |
| | | <CloseOutlined className="close" onClick={() => {}} /> |
| | | </div> |
| | | } trigger="hover" placement="top"> |
| | | <span className="editable-menu-item">{cell.MenuName}</span> |
| | | </Popover> : |
| | | {editLevel !== 'HS' ? |
| | | <span className="editable-menu-item" onDoubleClick={() => this.editmenu(cell)}>{cell.MenuName}</span> : |
| | | <a href={cell.src} id={cell.MenuID} onClick={(e) => this.changemenu(e, cell)}>{cell.MenuName}</a> |
| | | } |
| | | </Menu.Item> |
| | |
| | | exitEdit={this.exitEdit} |
| | | /> : null |
| | | } |
| | | <Modal |
| | | title="解冻菜单" |
| | | width={600} |
| | | visible={visible} |
| | | onOk={this.thawMemuSubmit} |
| | | confirmLoading={this.state.confirmLoading} |
| | | onCancel={this.thawMemuCancel} |
| | | destroyOnClose |
| | | > |
| | | {!this.state.thawmenulist ? <Spin style={{marginLeft: 'calc(50% - 22px)', marginTop: '70px', marginBottom: '70px'}} size="large" /> : |
| | | <TransferForm onChange={(vals) => this.setState({targetKeys: vals})} menulist={this.state.thawmenulist}/>} |
| | | </Modal> |
| | | </aside> |
| | | ) |
| | | } |
| | |
| | | return { |
| | | mainMenu: state.mainMenu, |
| | | menuTree: state.menuTree, |
| | | memberLevel: state.memberLevel, |
| | | editLevel: state.editLevel |
| | | } |
| | | } |
| | |
| | | .editable-menu-item { |
| | | display: block; |
| | | padding-left: 48px; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | .ant-menu-sub.ant-menu-inline { |
copy from src/templates/menuconfig/editfirstmenu/menuform/index.scss
copy to src/views/design/sidemenu/menuform/index.scss
| | |
| | | import React, { Component } from 'react' |
| | | import { message, Modal, notification } from 'antd' |
| | | import { connect } from 'react-redux' |
| | | import md5 from 'md5' |
| | | import moment from 'moment' |
| | | |
| | |
| | | import enUS from '@/locales/en-US/login.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import asyncLoadComponent from '@/utils/asyncLoadComponent' |
| | | import { modifyMemberLevel } from '@/store/action' |
| | | import './index.scss' |
| | | |
| | | const LoginForm = asyncLoadComponent(() => import('./loginform')) |
| | |
| | | let memberLevel = res.member_level |
| | | |
| | | if (typeof(memberLevel) === 'number' && memberLevel > 10 && parseInt(memberLevel / 10) * 10 === memberLevel) { |
| | | sessionStorage.setItem('Member_Level', md5('mksoft' + moment().format('YYYYMM') + memberLevel)) |
| | | this.props.modifyMemberLevel(memberLevel) |
| | | sessionStorage.setItem('Member_Level', md5('mksoft' + window.GLOB.appkey + new Date().getFullYear() + new Date().getMonth() + memberLevel)) |
| | | window.GLOB.memberLevel = memberLevel |
| | | } |
| | | |
| | | // positecgroup |
| | |
| | | } |
| | | } |
| | | |
| | | const mapStateToProps = () => { |
| | | return {} |
| | | } |
| | | |
| | | const mapDispatchToProps = (dispatch) => { |
| | | return { |
| | | modifyMemberLevel: (memberLevel) => dispatch(modifyMemberLevel(memberLevel)) |
| | | } |
| | | } |
| | | |
| | | export default connect(mapStateToProps, mapDispatchToProps)(Login) |
| | | export default Login |
| | |
| | | import React, { Component } from 'react' |
| | | import { connect } from 'react-redux' |
| | | import { DndProvider } from 'react-dnd' |
| | | import { withRouter } from 'react-router' |
| | | import { is, fromJS } from 'immutable' |
| | |
| | | window.GLOB.urlFields = [] // url变量 |
| | | window.GLOB.customMenu = null // 保存菜单信息 |
| | | |
| | | const memberLevel = Utils.getMemberLevel() |
| | | |
| | | class MobDesign extends Component { |
| | | state = { |
| | | localedict: sessionStorage.getItem('lang') !== 'en-US' ? antdZhCN : antdEnUS, |
| | |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | | if (this.props.memberLevel < 30) return |
| | | if (memberLevel < 30) return |
| | | try { |
| | | let param = JSON.parse(window.decodeURIComponent(window.atob(this.props.match.params.param))) |
| | | |
| | |
| | | } |
| | | |
| | | componentDidMount () { |
| | | if (this.props.memberLevel < 30) { |
| | | if (memberLevel < 30) { |
| | | document.getElementById('mk-mob-design-view').innerHTML = '<div style="text-align: center; font-size: 30px; margin-top: 40vh; height: 100vh; background: #fff;">本应用没有PC端页面的编辑权限,请联系管理员!</div>' |
| | | return |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | memberLevel: state.memberLevel |
| | | } |
| | | } |
| | | |
| | | const mapDispatchToProps = () => { |
| | | return {} |
| | | } |
| | | |
| | | export default withRouter(connect(mapStateToProps, mapDispatchToProps)(MobDesign)) |
| | | export default withRouter(MobDesign) |
| | |
| | | import React, { Component } from 'react' |
| | | import { connect } from 'react-redux' |
| | | import { DndProvider } from 'react-dnd' |
| | | import { withRouter } from 'react-router' |
| | | import { is, fromJS } from 'immutable' |
| | |
| | | window.GLOB.urlFields = [] // url变量 |
| | | window.GLOB.customMenu = null // 保存菜单信息 |
| | | |
| | | const memberLevel = Utils.getMemberLevel() |
| | | |
| | | class MenuDesign extends Component { |
| | | state = { |
| | | localedict: sessionStorage.getItem('lang') !== 'en-US' ? antdZhCN : antdEnUS, |
| | |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | | if (this.props.memberLevel < 30) return |
| | | if (memberLevel < 30) return |
| | | try { |
| | | let param = JSON.parse(window.decodeURIComponent(window.atob(this.props.match.params.param))) |
| | | |
| | |
| | | } |
| | | |
| | | componentDidMount () { |
| | | if (this.props.memberLevel < 30) { |
| | | if (memberLevel < 30) { |
| | | document.getElementById('mk-pc-design-view').innerHTML = '<div style="text-align: center; font-size: 30px; margin-top: 40vh; height: 100vh; background: #fff;">本应用没有PC端页面的编辑权限,请联系管理员!</div>' |
| | | return |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | const mapStateToProps = (state) => { |
| | | return { |
| | | memberLevel: state.memberLevel |
| | | } |
| | | } |
| | | |
| | | const mapDispatchToProps = () => { |
| | | return {} |
| | | } |
| | | |
| | | export default withRouter(connect(mapStateToProps, mapDispatchToProps)(MenuDesign)) |
| | | export default withRouter(MenuDesign) |
| | |
| | | import React, {Component} from 'react' |
| | | import { Spin, notification } from 'antd' |
| | | import { connect } from 'react-redux' |
| | | import md5 from 'md5' |
| | | import moment from 'moment' |
| | | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | | import { styles } from '@/store/options.js' |
| | | import { modifyMemberLevel } from '@/store/action' |
| | | import './index.scss' |
| | | |
| | | class SSOLogin extends Component { |
| | |
| | | let memberLevel = res.member_level |
| | | |
| | | if (typeof(memberLevel) === 'number' && memberLevel > 10 && parseInt(memberLevel / 10) * 10 === memberLevel) { |
| | | sessionStorage.setItem('Member_Level', md5('mksoft' + moment().format('YYYYMM') + memberLevel)) |
| | | this.props.modifyMemberLevel(memberLevel) |
| | | sessionStorage.setItem('Member_Level', md5('mksoft' + window.GLOB.appkey + new Date().getFullYear() + new Date().getMonth() + memberLevel)) |
| | | window.GLOB.memberLevel = memberLevel |
| | | } |
| | | this.props.history.replace('/main') |
| | | } else { |
| | |
| | | } |
| | | } |
| | | |
| | | const mapStateToProps = () => { |
| | | return {} |
| | | } |
| | | |
| | | const mapDispatchToProps = (dispatch) => { |
| | | return { |
| | | modifyMemberLevel: (memberLevel) => dispatch(modifyMemberLevel(memberLevel)) |
| | | } |
| | | } |
| | | |
| | | export default connect(mapStateToProps, mapDispatchToProps)(SSOLogin) |
| | | export default SSOLogin |