| | |
| | | |
| | | let home = { |
| | | MenuID: 'home_page_id', |
| | | MenuName: this.state.dict['main.homepage'], |
| | | MenuName: '首页', |
| | | selected: true, |
| | | type: 'Home' |
| | | } |
| | |
| | | gotoHome = () => { |
| | | let home = { |
| | | MenuID: 'home_page_id', |
| | | MenuName: this.state.dict['main.homepage'], |
| | | MenuName: '首页', |
| | | selected: true, |
| | | type: 'Home' |
| | | } |
| | |
| | | let tabs = fromJS(this.props.tabviews).toJS() |
| | | let menu = fromJS(response[1]).toJS() |
| | | |
| | | if (this.state.navBar === 'topmenu') { |
| | | if (this.state.navBar === 'topmenu' && this.state.menuType !== 'menu_board_navigation') { |
| | | menu.selected = true |
| | | this.props.modifyTabview([menu]) |
| | | } else { |
| | |
| | | |
| | | state = { |
| | | activeId: '', |
| | | // tabviews: [{ |
| | | // MenuID: 'home_page_id', |
| | | // MenuName: '首页', |
| | | // selected: true, |
| | | // type: 'Home' |
| | | // }], // 标签集 |
| | | tabviews: null, // 标签集 |
| | | iFrameHeight: 0, |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? mzhCN : menUS, |
| | |
| | | } |
| | | } |
| | | |
| | | // modifyTabs = (tab, type) => { |
| | | |
| | | // } |
| | | |
| | | changeTab = (e, menu) => { |
| | | e.stopPropagation() |
| | | // 窗口切换 |
| | |
| | | if (sessionStorage.getItem('isEditState') !== 'true') { |
| | | let home = { |
| | | MenuID: 'home_page_id', |
| | | MenuName: this.state.dict['main.homepage'], |
| | | MenuName: '首页', |
| | | selected: true, |
| | | type: 'Home' |
| | | } |
| | | this.props.modifyTabview([home]) |
| | | } |
| | | // MKEmitter.addListener('modifyTabs', this.modifyTabs) |
| | | MKEmitter.addListener('closeTabView', this.closeTabView) |
| | | } |
| | | |
| | |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | // MKEmitter.removeListener('modifyTabs', this.modifyTabs) |
| | | MKEmitter.removeListener('closeTabView', this.closeTabView) |
| | | } |
| | | |
| | |
| | | 'main.cancel': 'Cancel', |
| | | 'main.logout': 'Logout', |
| | | 'main.doc': '文档中心', |
| | | 'main.homepage': '首页', |
| | | 'main.logout.hint': 'Are you sure you want to log out?', |
| | | 'main.verup': 'Version upgrade', |
| | | 'main.password': 'Change the password', |
| | |
| | | 'main.cancel': '取消', |
| | | 'main.logout': '退出', |
| | | 'main.doc': '文档中心', |
| | | 'main.homepage': '首页', |
| | | 'main.logout.hint': '您确定要退出吗?', |
| | | 'main.verup': '版本升级', |
| | | 'main.password': '修改密码', |
| | |
| | | const { TextArea } = Input |
| | | const MkIcon = asyncComponent(() => import('@/components/mkIcon')) |
| | | const actionTypeOptions = { |
| | | pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width', 'openmenu', 'open', 'output', 'refreshTab'], |
| | | prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width', 'openmenu', 'open', 'output', 'refreshTab'], |
| | | exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width', 'openmenu', 'open', 'output', 'refreshTab'], |
| | | excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'sheet', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width'], |
| | | excelOut: ['label', 'OpenType', 'intertype', 'show', 'icon', 'class', 'execSuccess', 'execError', 'syncComponent', 'resetPageIndex', 'pagination', 'search', 'width'], |
| | | pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab'], |
| | | prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab'], |
| | | exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab'], |
| | | excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'sheet', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width'], |
| | | excelOut: ['label', 'OpenType', 'intertype', 'show', 'icon', 'class', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'resetPageIndex', 'pagination', 'search', 'width'], |
| | | popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'popClose', 'resetPageIndex', 'width', 'display', 'ratio', 'placement'], |
| | | tab: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'linkmenu', 'width'], |
| | | innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'icon', 'class', 'width', 'open'], |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'cascader') { // 多选 |
| | | } else if (item.type === 'cascader') { |
| | | fields.push( |
| | | <Col span={12} key={index}> |
| | | <Form.Item label={item.tooltip ? |
| | |
| | | } |
| | | ] |
| | | })( |
| | | <Cascader options={item.options || []} placeholder=""/> |
| | | <Cascader options={item.options || []} expandTrigger="hover" placeholder=""/> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | |
| | | ] |
| | | })( |
| | | <MkIcon allowClear/> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'mcascader') { |
| | | fields.push( |
| | | <Col span={12} key={index}> |
| | | <Form.Item label={item.tooltip ? |
| | | <Tooltip placement="topLeft" overlayClassName={item.tooltipClass} title={item.tooltip}> |
| | | <Icon type="question-circle" /> |
| | | {item.label} |
| | | </Tooltip> : item.label |
| | | }> |
| | | {getFieldDecorator(item.key, { |
| | | initialValue: item.initVal |
| | | })( |
| | | <Cascader options={item.options} expandTrigger="hover" placeholder="" /> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | |
| | | } |
| | | ] |
| | | |
| | | let getTabs = (list) => { |
| | | return list.filter(item => { |
| | | if (item.type !== 'tabs') return false |
| | | |
| | | item.children = item.children.map(cell => { |
| | | cell.children = getTabs(cell.children) |
| | | return cell |
| | | }) |
| | | return item |
| | | }) |
| | | } |
| | | |
| | | let tabs = getTabs(JSON.parse(JSON.stringify(modules))) |
| | | |
| | | let pageTemps = [ |
| | | { value: 'billprint', text: '单据打印' }, |
| | | { value: 'pay', text: Formdict['model.pay'] }, |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'mcascader', |
| | | type: 'cascader', |
| | | key: 'syncComponent', |
| | | label: '刷新组件', |
| | | initVal: card.syncComponent || [], |
| | |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | | key: 'switchTab', |
| | | label: '切换标签', |
| | | initVal: card.switchTab || [], |
| | | tooltip: '执行成功后,需要切换的标签页', |
| | | required: false, |
| | | options: tabs |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | | key: 'refreshTab', |
| | | label: '刷新标签', |
| | | label: '刷新菜单', |
| | | initVal: card.refreshTab || [], |
| | | tooltip: '执行成功后或标签关闭时,需要同步刷新的标签', |
| | | tooltip: '执行成功后或标签关闭时,需要同步刷新的菜单', |
| | | required: false, |
| | | forbid: isApp, |
| | | options: menulist |
| | |
| | | field: 'scan', |
| | | label: '扫一扫', |
| | | initval: wrap.scan || 'false', |
| | | tooltip: '系统功能:1、扫码登录,二维码信息以“login”开头,2、页面跳转,二维码信息以“url”开头', |
| | | tooltip: '系统功能:1、扫码登录,二维码以“login”开头,2、页面跳转,二维码以“http”开头,3、菜单跳转,二维码以“mkbid”开头,且设置关联菜单', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', label: '显示'}, |
| | |
| | | field: 'linkmenu', |
| | | label: '关联菜单', |
| | | initval: wrap.linkmenu || '', |
| | | tooltip: '使用扫码登录功能时的跳转页面,不使用扫码登录可忽略。', |
| | | tooltip: '使用扫码登录功能或菜单跳转功能时,需选择跳转的菜单。', |
| | | required: false, |
| | | options: menulist |
| | | }, |
| | |
| | | <div className="menu-antv-tabs-wrap" style={tabs.style}> |
| | | <Tabs defaultActiveKey="1" tabPosition={tabs.setting.position} type={tabs.setting.tabStyle}> |
| | | {tabs.subtabs.map(tab => ( |
| | | <TabPane tab={<span>{tab.icon ? <Icon type={tab.icon} /> : null}{tab.label}</span>} key={tab.uuid}> |
| | | <TabPane tab={<span id={'tab' + tab.uuid}>{tab.icon ? <Icon type={tab.icon} /> : null}{tab.label}</span>} key={tab.uuid}> |
| | | <TabTransfer BID={BID} config={tab} bids={bids} mainSearch={mainSearch}/> |
| | | </TabPane> |
| | | ))} |
| | |
| | | if (btn.execSuccess !== 'never') { |
| | | MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execSuccess, btn) |
| | | } |
| | | if (btn.switchTab && btn.switchTab.length > 0) { |
| | | let id = btn.switchTab[btn.switchTab.length - 1] |
| | | let node = document.getElementById('tab' + id) |
| | | node && node.click() |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | if (btn.execSuccess !== 'never') { |
| | | MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execSuccess, btn) |
| | | } |
| | | if (btn.switchTab && btn.switchTab.length > 0) { |
| | | let id = btn.switchTab[btn.switchTab.length - 1] |
| | | let node = document.getElementById('tab' + id) |
| | | node && node.click() |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | if (btn.refreshTab && btn.refreshTab.length > 0) { |
| | | MKEmitter.emit('reloadMenuView', btn.refreshTab[btn.refreshTab.length - 1], 'table') |
| | | } |
| | | if (btn.switchTab && btn.switchTab.length > 0) { |
| | | let id = btn.switchTab[btn.switchTab.length - 1] |
| | | let node = document.getElementById('tab' + id) |
| | | node && node.click() |
| | | } |
| | | } |
| | | |
| | | sendMessage = () => { |
| | |
| | | } |
| | | } else if (item.type === 'tabs') { |
| | | let _item = { |
| | | type: 'tabs', |
| | | value: item.uuid, |
| | | label: item.name, |
| | | children: item.subtabs.map(f_tab => { |
| | | let subItem = { |
| | | type: 'tab', |
| | | value: f_tab.uuid, |
| | | label: f_tab.label, |
| | | children: this.getSubModules(f_tab.components, selfId) |
| | |
| | | // }) |
| | | const _addressUrl = window.location.href.split('#')[0] + 'queryAddress' |
| | | |
| | | if (_addressUrl !== 'true') { |
| | | if (localStorage.getItem(_addressUrl) !== 'true') { |
| | | sessionStorage.setItem('city', '') |
| | | sessionStorage.setItem('ipAddress', '') |
| | | } else { |
| | | window.callbackFunction = (res) => { |
| | | if (res.result && res.result.ad_info) { |
| | | sessionStorage.setItem('city', res.result.ad_info.city) |
| | | sessionStorage.setItem('ipAddress', res.result.ip) |
| | | } |
| | | } |
| | | |
| | | const JSONP = document.createElement('script') |
| | | JSONP.type = 'text/javascript' |
| | | JSONP.src = 'https://apis.map.qq.com/ws/location/v1/ip?callback=callbackFunction&key=BA7BZ-4QB65-LFCIA-QPDA6-4G6O7-MJB4Q&output=jsonp&sig=3e5ebecb324ba266bf80014dcc8380db' |
| | | document.getElementsByTagName('head')[0].appendChild(JSONP) |
| | | |
| | | setTimeout(() => { |
| | | document.getElementsByTagName('head')[0].removeChild(JSONP) |
| | | },500) |
| | | this.queryAddress() |
| | | } |
| | | |
| | | const timeStamp = new Date().getTime() |
| | |
| | | localStorage.setItem(_addressUrl, 'false') |
| | | } else { |
| | | localStorage.setItem(_addressUrl, 'true') |
| | | this.queryAddress() |
| | | } |
| | | } else if (res.ErrCode === 'N') { |
| | | localStorage.removeItem(_authUrl) |
| | |
| | | } |
| | | } |
| | | |
| | | queryAddress = () => { |
| | | window.callbackFunction = (res) => { |
| | | if (res.result && res.result.ad_info) { |
| | | sessionStorage.setItem('city', res.result.ad_info.city) |
| | | sessionStorage.setItem('ipAddress', res.result.ip) |
| | | } |
| | | } |
| | | |
| | | const JSONP = document.createElement('script') |
| | | JSONP.type = 'text/javascript' |
| | | JSONP.src = 'https://apis.map.qq.com/ws/location/v1/ip?callback=callbackFunction&key=BA7BZ-4QB65-LFCIA-QPDA6-4G6O7-MJB4Q&output=jsonp&sig=3e5ebecb324ba266bf80014dcc8380db' |
| | | document.getElementsByTagName('head')[0].appendChild(JSONP) |
| | | |
| | | setTimeout(() => { |
| | | document.getElementsByTagName('head')[0].removeChild(JSONP) |
| | | },500) |
| | | } |
| | | |
| | | syncSubmit = () => { |
| | | this.setState({ |
| | | syncing: true |