| | |
| | | transfer -- 是否使用转接口,使用转接口时请设置为 true, 使用转接口时,外部接口调用前不会做登录验证 |
| | | keepPwd -- 记住密码,默认开启,当值为 false 时禁用,当值为 invisible 时记住密码但密码不可查看 |
| | | execType -- 脚本传输方式,值为x时,启用AES加密 |
| | | SysNotice -- 是否开启系统消息 |
| | | updateStatus -- 是否更新开发状态,默认开启,当值为 false 时禁用 |
| | | forcedUpdate -- 传输号升级时,是否自动退出,格式为(YYYY-MM-DD),用于升级后刷新用户本地配置 |
| | |
| | | "display": "standalone", |
| | | "theme_color": "#000000", |
| | | "background_color": "#ffffff", |
| | | "mk_version": "20241002" |
| | | "mk_version": "20241106" |
| | | } |
| | |
| | | "probation": "", |
| | | "transfer": "true", |
| | | "keepPwd": "true", |
| | | "SysNotice": "false", |
| | | "host": "http://dms-test.worx.cn", |
| | | "service": "new/" |
| | | } |
| | |
| | | const Resetpwd = asyncComponent(() => import('@/components/resetPassword')) |
| | | const QrCode = asyncComponent(() => import('@/components/qrcode')) |
| | | const LoginForm = asyncSpinComponent(() => import('./loginform')) |
| | | const SysIcon = asyncComponent(() => import('./sysmessage/icon')) |
| | | |
| | | class Header extends Component { |
| | | state = { |
| | |
| | | ParentNames: [fst.MenuName, snd.MenuName], |
| | | MenuNo: trd.MenuNo, |
| | | EasyCode: trd.EasyCode, |
| | | type: 'CommonTable', |
| | | type: 'CustomPage', |
| | | OpenType: 'newtab', |
| | | hidden: 'false' |
| | | } |
| | |
| | | try { |
| | | let PageParam = JSON.parse(trd.PageParam) |
| | | |
| | | trdItem.type = PageParam.Template || 'CommonTable' |
| | | trdItem.type = PageParam.Template || 'CustomPage' |
| | | trdItem.OpenType = PageParam.OpenType || 'newtab' |
| | | trdItem.hidden = PageParam.hidden || 'false' |
| | | trdItem.menuColor = PageParam.menuColor || '' |
| | |
| | | <SearchOutlined className="search-menu" /> |
| | | </Dropdown> : null |
| | | } |
| | | {window.GLOB.SysNotice ? <SysIcon /> : null} |
| | | {/* 头像、用户名 */} |
| | | <Dropdown className="header-setting" overlay={menu}> |
| | | <div> |
New file |
| | |
| | | import React, { Component } from 'react' |
| | | import { notification } from 'antd' |
| | | import { MessageFilled } from '@ant-design/icons' |
| | | |
| | | import Api from '@/api' |
| | | import MKEmitter from '@/utils/events.js' |
| | | |
| | | class SysIcon extends Component { |
| | | state = { |
| | | notices: [] |
| | | } |
| | | |
| | | componentDidMount () { |
| | | setTimeout(() => { |
| | | this.getMsgList() |
| | | }, 2000) |
| | | } |
| | | |
| | | getMsgList = () => { |
| | | let param = { |
| | | func: 's_get_kei' |
| | | } |
| | | |
| | | Api.getSystemConfig(param).then(result => { |
| | | if (result.status) { |
| | | let notices = result.data || [] |
| | | |
| | | this.setState({ notices }) |
| | | MKEmitter.emit('sysMessageChange', notices) |
| | | |
| | | setTimeout(() => { |
| | | this.getMsgList() |
| | | }, 600000) |
| | | } else { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 5 |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | open = () => { |
| | | MKEmitter.emit('sysMessageOpen') |
| | | } |
| | | |
| | | render() { |
| | | const { notices } = this.state |
| | | |
| | | return ( |
| | | <MessageFilled className="mk-msg-icon" data-title={notices.length ? notices.length : ''} onClick={this.open} /> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | export default SysIcon |
New file |
| | |
| | | import React, { Component } from 'react' |
| | | import { CloseOutlined } from '@ant-design/icons' |
| | | |
| | | import MKEmitter from '@/utils/events.js' |
| | | |
| | | import './index.scss' |
| | | |
| | | class SysMessage extends Component { |
| | | state = { |
| | | visible: false, |
| | | notices: [] |
| | | } |
| | | |
| | | componentDidMount() { |
| | | MKEmitter.addListener('sysMessageChange', this.sysMessageChange) |
| | | MKEmitter.addListener('sysMessageOpen', this.sysMessageOpen) |
| | | } |
| | | |
| | | componentWillUnmount () { |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | MKEmitter.removeListener('sysMessageChange', this.sysMessageChange) |
| | | MKEmitter.removeListener('sysMessageOpen', this.sysMessageOpen) |
| | | } |
| | | |
| | | sysMessageChange = (notices) => { |
| | | this.setState({ notices }) |
| | | } |
| | | |
| | | sysMessageOpen = () => { |
| | | this.setState({ visible: true }) |
| | | } |
| | | |
| | | close = () => { |
| | | this.setState({ visible: false }) |
| | | } |
| | | |
| | | render() { |
| | | const { visible, notices } = this.state |
| | | |
| | | return ( |
| | | <div className={'mk-msg-wrap' + (visible ? ' visible' : '')}> |
| | | <div className="title"> |
| | | 系统消息 |
| | | <CloseOutlined onClick={this.close}/> |
| | | </div> |
| | | <div className="msg-list">{notices.map((item, index) => { |
| | | return <div className="msg-item" key={index}> |
| | | {item.remark} |
| | | </div> |
| | | })}</div> |
| | | </div> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | export default SysMessage |
New file |
| | |
| | | .mk-msg-icon { |
| | | font-size: 16px; |
| | | margin-top: 17px; |
| | | margin-right: 20px; |
| | | margin-left: 0px; |
| | | color: #1CD66C; |
| | | cursor: pointer; |
| | | } |
| | | .mk-msg-icon[data-title] { |
| | | position: relative; |
| | | |
| | | &::before { |
| | | content: " "; |
| | | position: absolute; |
| | | top: 6px; |
| | | left: 2px; |
| | | z-index: -1; |
| | | width: 12px; |
| | | height: 3px; |
| | | display: block; |
| | | background: #fff; |
| | | } |
| | | &::after { |
| | | position: absolute; |
| | | top: -10px; |
| | | left: 15px; |
| | | color: #f5222d; |
| | | font-size: 12px; |
| | | line-height: 16px; |
| | | white-space: nowrap; |
| | | font-weight: 600; |
| | | content: attr(data-title); |
| | | } |
| | | } |
| | | .mk-msg-wrap { |
| | | position: fixed; |
| | | width: 200px; |
| | | height: 400px; |
| | | top: 92px; |
| | | right: 15px; |
| | | z-index: -1; |
| | | opacity: 0; |
| | | padding: 10px; |
| | | font-size: 13px; |
| | | background-color: #fff; |
| | | background-clip: padding-box; |
| | | color: rgba(0, 0, 0, 0.85); |
| | | border: 0; |
| | | border-radius: 4px; |
| | | -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); |
| | | box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); |
| | | pointer-events: auto; |
| | | transition: all 0.2s; |
| | | |
| | | .title { |
| | | text-align: center; |
| | | |
| | | .anticon-close { |
| | | position: absolute; |
| | | right: 10px; |
| | | color: rgba(0, 0, 0, 0.45); |
| | | cursor: pointer; |
| | | transition: color 0.2s; |
| | | } |
| | | .anticon-close:hover { |
| | | color: rgba(0, 0, 0, 0.85); |
| | | } |
| | | } |
| | | .msg-list { |
| | | .msg-item { |
| | | height: 80px; |
| | | background: rgba(0, 0, 0, 0.05); |
| | | margin: 10px 0px; |
| | | padding: 5px; |
| | | border-radius: 2px; |
| | | } |
| | | } |
| | | } |
| | | .mk-msg-wrap.visible { |
| | | z-index: 3000; |
| | | opacity: 1; |
| | | } |
| | |
| | | |
| | | selectcomponent = (view) => { |
| | | // 根据tab页中菜单信息,选择所需的组件 |
| | | if (view.type === 'Home') { |
| | | return (<Home MenuID={view.MenuID} MenuName={view.MenuName}/>) |
| | | } else if (view.type === 'BaseTable') { |
| | | if (view.type === 'BaseTable') { |
| | | return (<BaseTable MenuID={view.MenuID} MenuName={view.MenuName} param={view.param} changeTemp={this.changeTemp}/>) |
| | | } else if (view.type === 'CustomPage') { |
| | | return (<CustomPage MenuID={view.MenuID} MenuName={view.MenuName} param={view.param} changeTemp={this.changeTemp}/>) |
| | | } else if (view.type === 'Home') { |
| | | return (<Home MenuID={view.MenuID} MenuName={view.MenuName}/>) |
| | | } else if (view.type === 'RolePermission') { |
| | | return (<RoleManage MenuID={view.MenuID}/>) |
| | | } else if (view.type === 'CommonTable') { |
| | | return (<CommonTable MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} param={view.param} changeTemp={this.changeTemp}/>) |
| | | } else if (view.type === 'TreePage') { |
| | | return (<TreePage MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} param={view.param}/>) |
| | | } else if (view.type === 'RolePermission') { |
| | | return (<RoleManage MenuID={view.MenuID}/>) |
| | | } else if (view.type === 'iframe') { |
| | | return (<Iframe MenuID={view.MenuID} title={view.MenuName} url={view.src}/>) |
| | | } else { |
| | |
| | | GLOB.WXminiAppID = config.WXminiAppID || '' |
| | | GLOB.WXMerchID = config.WXMerchID || '' |
| | | GLOB.WXNotice = config.WXNotice + '' === 'true' |
| | | GLOB.SysNotice = config.SysNotice + '' === 'true' |
| | | GLOB.execType = config.execType === 'x' ? 'x' : '' |
| | | GLOB.mkHS = false |
| | | GLOB.debugger = false |
| | |
| | | } |
| | | } else if (this.record.eleType === 'formula') { |
| | | if (this.record.eval !== 'func') { |
| | | _options.push('prefix', 'postfix', 'fixStyle', 'alignItems', 'evalchars') |
| | | _options.push('link', 'prefix', 'postfix', 'fixStyle', 'alignItems', 'evalchars') |
| | | } |
| | | if (this.record.eval === 'true') { |
| | | _options.push('decimal') |
| | | } |
| | | if (this.record.eval !== 'func') { |
| | | _options.push('link') |
| | | } |
| | | if (this.record.link && this.record.eval !== 'func') { |
| | | _options.push('linkType') |
| | |
| | | |
| | | let pass = checkSQL(values.sql, 'customscript') |
| | | |
| | | if (!pass) return |
| | | if (!pass && !skip) return |
| | | |
| | | let sql = ` |
| | | /* 系统字段 */ |
| | |
| | | |
| | | let pass = checkSQL(values.sql, 'customscript') |
| | | |
| | | if (!pass) return |
| | | if (!pass && !skip) return |
| | | |
| | | let sql = ` |
| | | /* 系统字段 */ |
| | |
| | | type: 'radio', |
| | | key: 'IsSort', |
| | | label: '排序', |
| | | initVal: card.IsSort || (card.isSub || card.type === 'custom' ? 'false' : 'true'), |
| | | initVal: card.IsSort || 'false', |
| | | required: true, |
| | | options: [{ |
| | | value: 'true', |
| | |
| | | columns: [], |
| | | cols: [ |
| | | { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label1', field: '', Hide: 'false', type: 'text', Width: 120 }, |
| | | { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label2', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 }, |
| | | { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label3', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 }, |
| | | { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label2', field: '', Hide: 'false', IsSort: 'false', type: 'text', Width: 120 }, |
| | | { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label3', field: '', Hide: 'false', IsSort: 'false', type: 'text', Width: 120 }, |
| | | ], |
| | | scripts: [], |
| | | isNew: true |
| | |
| | | type: 'radio', |
| | | key: 'IsSort', |
| | | label: '排序', |
| | | initVal: card.IsSort || (card.isSub || card.type === 'custom' ? 'false' : 'true'), |
| | | initVal: card.IsSort || 'false', |
| | | required: true, |
| | | options: [{ |
| | | value: 'true', |
| | |
| | | |
| | | let pass = checkSQL(values.sql, 'customscript') |
| | | |
| | | if (!pass) return |
| | | if (!pass && !skip) return |
| | | |
| | | let sheet = btn.sheet.replace(/(.*)\.(.*)\.|@db@/ig, '') |
| | | let tail = ` |
| | |
| | | columns: [], |
| | | cols: [ |
| | | { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label1', field: '', Hide: 'false', type: 'text', Width: 120 }, |
| | | { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label2', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 }, |
| | | { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label3', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 }, |
| | | { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label2', field: '', Hide: 'false', IsSort: 'false', type: 'text', Width: 120 }, |
| | | { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label3', field: '', Hide: 'false', IsSort: 'false', type: 'text', Width: 120 }, |
| | | ], |
| | | scripts: [], |
| | | submit: {intertype: 'system', default: 'true', innerFunc: '', execSuccess: 'grid', execError: 'never', scripts: [], uniques: []}, |
| | |
| | | type: 'radio', |
| | | key: 'IsSort', |
| | | label: '排序', |
| | | initVal: card.IsSort || (card.isSub || card.type === 'custom' ? 'false' : 'true'), |
| | | initVal: card.IsSort || 'false', |
| | | required: true, |
| | | options: [{ |
| | | value: 'true', |
| | |
| | | fields.forEach(item => { |
| | | if (keys.includes(item.field)) return |
| | | |
| | | let cell = { uuid: Utils.getuuid(), label: item.label, field: item.field, Align: 'left', Hide: 'false', IsSort: 'true', Width: 120, blacklist: [], postfix: '', prefix: '', linkmenu: [], marks: [], perspective: 'linkmenu' } |
| | | let cell = { uuid: Utils.getuuid(), label: item.label, field: item.field, Align: 'left', Hide: 'false', IsSort: 'false', Width: 120, blacklist: [], postfix: '', prefix: '', linkmenu: [], marks: [], perspective: 'linkmenu' } |
| | | |
| | | if (/Nvarchar|date/ig.test(item.datatype)) { |
| | | cell.type = 'text' |
| | |
| | | columns: [], |
| | | cols: [ |
| | | { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label1', field: '', Hide: 'false', type: 'text', Width: 120 }, |
| | | { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label2', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 }, |
| | | { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label3', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 }, |
| | | { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label2', field: '', Hide: 'false', IsSort: 'false', type: 'text', Width: 120 }, |
| | | { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label3', field: '', Hide: 'false', IsSort: 'false', type: 'text', Width: 120 }, |
| | | ], |
| | | scripts: [], |
| | | isNew: true |
| | |
| | | |
| | | let pass = checkSQL(values.sql, 'customscript') |
| | | |
| | | if (!pass) return |
| | | if (!pass && !skip) return |
| | | |
| | | if (skip) { |
| | | this.setState({ |
| | |
| | | |
| | | Object.keys(data).forEach(key => { |
| | | if (/^\$/.test(key)) return |
| | | if (key === 'children') return |
| | | let reg = new RegExp('@' + key + '@', 'ig') |
| | | url = url.replace(reg, data[key]) |
| | | }) |
| | |
| | | val = '' |
| | | } else if (data) { |
| | | let _val = card.formula |
| | | |
| | | if (card.$keys && card.noValue === 'hide') { // 空值隐藏 |
| | | let _data = {} |
| | | let empty = true |
| | | |
| | | Object.keys(data).forEach(key => { |
| | | _data[key.toLowerCase()] = data[key] |
| | | }) |
| | | _data.username = sessionStorage.getItem('User_Name') || '' |
| | | _data.fullname = sessionStorage.getItem('Full_Name') || '' |
| | | _data.bid = data.$$BID || '' |
| | | |
| | | card.$keys.forEach(key => { |
| | | if (!_data.hasOwnProperty(key)) { |
| | | empty = false |
| | | } else if (_data[key] && !/^1949-10-01/.test(_data[key])) { |
| | | empty = false |
| | | } |
| | | }) |
| | | |
| | | if (empty) return null |
| | | } |
| | | |
| | | if (/@username@|@fullName@|@bid@/ig.test(_val)) { |
| | | _val = _val.replace(/@username@/ig, sessionStorage.getItem('User_Name') || '').replace(/@fullName@/ig, sessionStorage.getItem('Full_Name') || '').replace(/@bid@/ig, data.$$BID || '') |
| | | } |
| | | let _data = {} |
| | | Object.keys(data).forEach(key => { |
| | | if (/^\$/.test(key)) return |
| | | if (key === 'children') return |
| | | if (/^1949-10-01/.test(data[key])) { |
| | | _data[key.toLowerCase()] = '' |
| | | } else { |
| | | _data[key.toLowerCase()] = data[key] |
| | | } |
| | | }) |
| | | _data.username = sessionStorage.getItem('User_Name') || '' |
| | | _data.fullname = sessionStorage.getItem('Full_Name') || '' |
| | | _data.bid = data.$$BID || '' |
| | | |
| | | if (card.eval === 'false' && card.noValue === 'hide') { // 空值隐藏 |
| | | if (card.$keys) { |
| | | let empty = true |
| | | |
| | | card.$keys.forEach(key => { |
| | | if (!_data.hasOwnProperty(key)) { |
| | | empty = false |
| | | } else if (_data[key]) { |
| | | empty = false |
| | | } |
| | | }) |
| | | |
| | | if (empty) return null |
| | | } |
| | | |
| | | Object.keys(_data).forEach(key => { |
| | | if (_data[key]) return |
| | | |
| | | _val = _val.replace(new RegExp('[^@]*@' + key + '@', 'ig'), '') |
| | | }) |
| | | |
| | | if (!_val) return null |
| | | } |
| | | |
| | | Object.keys(_data).forEach(key => { |
| | | let reg = new RegExp('@' + key + '@', 'ig') |
| | | _val = _val.replace(reg, data[key]) |
| | | _val = _val.replace(reg, _data[key]) |
| | | }) |
| | | |
| | | if (card.eval !== 'false') { |
| | |
| | | font-weight: inherit; |
| | | text-decoration: inherit; |
| | | font-family: inherit; |
| | | min-height: 1px; |
| | | .sequence-wrap { |
| | | display: inline-block; |
| | | width: 21px; |
| | |
| | | } |
| | | |
| | | if (_config.wrap.zHeight) { |
| | | _config.wrap.zoomStyle = {} |
| | | if (_config.wrap.zHeight <= 100) { |
| | | if (_config.wrap.zHeight < 0) { |
| | | _config.wrap.zHeight = `calc(100vh - ${-_config.wrap.zHeight}px)` |
| | | _config.wrap.zoomStyle.maxHeight = `calc(100vh - ${-_config.wrap.zHeight}px)` |
| | | _config.wrap.zoomStyle.minHeight = '100px' |
| | | } else { |
| | | _config.wrap.zHeight = _config.wrap.zHeight + 'vh' |
| | | _config.wrap.zoomStyle.maxHeight = _config.wrap.zHeight + 'vh' |
| | | } |
| | | } else { |
| | | _config.wrap.zoomStyle.maxHeight = _config.wrap.zHeight + 'px' |
| | | } |
| | | |
| | | if (_config.style) { |
| | |
| | | } |
| | | _config.wrap.layout += ' fix-height' |
| | | } else { |
| | | _config.wrap.zHeight = 'none' |
| | | _config.wrap.zoomStyle = null |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | {config.wrap.pickup === 'true' && this.state.data.length > 0 ? <div className="pickup-wrap"><Switch title="收起" checkedChildren={window.GLOB.dict['open'] || '开'} unCheckedChildren={window.GLOB.dict['shut'] || '关'} checked={pickup} onChange={this.pickupChange} /></div> : null} |
| | | <div className={`data-zoom ${config.wrap.wrapClass}`}> |
| | | {switchable ? <div className={'prev-page ' + (pageIndex === 1 ? 'disabled' : '')} onClick={this.prevPage}><div><div><img src={preImg} alt=""/></div></div></div> : null} |
| | | <Row className={'card-row-list ' + config.wrap.layout} style={{maxHeight: config.wrap.zHeight}}> |
| | | <Row className={'card-row-list ' + config.wrap.layout} style={config.wrap.zoomStyle}> |
| | | {precards.map((item, index) => ( |
| | | <Col key={'pre' + index} className="extend-card" style={item.wStyle} span={item.setting.width || 6}> |
| | | {item.setting.cardRole === 'header' ? <TableHeader card={item} data={extendData} refresh={this.refreshByHeader}> |
| | |
| | | margin-bottom: 0!important; |
| | | } |
| | | } |
| | | div:last-child { |
| | | .extend-card:last-child:not(:only-child) { |
| | | position: sticky; |
| | | bottom: 0; |
| | | z-index: 1; |
| | | .card-item-box { |
| | | margin-top: 0!important; |
| | | margin-bottom: 0!important; |
| | | } |
| | | } |
| | | >div:last-child { |
| | | .card-item-box { |
| | | border-bottom: none!important; |
| | | } |
| | |
| | | _config.wrap.wrapClass = `${_config.wrap.selStyle} ${_config.wrap.cardType || ''}` |
| | | |
| | | if (_config.wrap.zHeight || _config.wrap.minWidth) { |
| | | _config.wrap.zoomStyle = { |
| | | maxHeight: 'none', |
| | | '--mk-data-zoom-width': _config.wrap.minWidth ? _config.wrap.minWidth + 'px' : '100%' |
| | | } |
| | | |
| | | if (_config.wrap.zHeight) { |
| | | if (_config.wrap.zHeight <= 100) { |
| | | if (_config.wrap.zHeight < 0) { |
| | | _config.wrap.zHeight = `calc(100vh - ${-_config.wrap.zHeight}px)` |
| | | _config.wrap.zoomStyle.maxHeight = `calc(100vh - ${-_config.wrap.zHeight}px)` |
| | | _config.wrap.zoomStyle.minHeight = '100px' |
| | | } else { |
| | | _config.wrap.zHeight = _config.wrap.zHeight + 'vh' |
| | | _config.wrap.zoomStyle.maxHeight = _config.wrap.zHeight + 'vh' |
| | | } |
| | | } else { |
| | | _config.wrap.zoomStyle.maxHeight = _config.wrap.zHeight + 'px' |
| | | } |
| | | _config.wrap.wrapClass += ' fix-height' |
| | | } |
| | | _config.wrap.minWidth = _config.wrap.minWidth ? _config.wrap.minWidth + 'px' : '100%' |
| | | _config.wrap.zoomStyle = { |
| | | maxHeight: _config.wrap.zHeight || 'none', |
| | | '--mk-data-zoom-width': _config.wrap.minWidth |
| | | } |
| | | } else { |
| | | _config.wrap.zoomStyle = null |
| | |
| | | margin-bottom: 0!important; |
| | | } |
| | | } |
| | | div:last-child { |
| | | .extend-card:last-child:not(:only-child) { |
| | | position: sticky; |
| | | bottom: 0; |
| | | z-index: 1; |
| | | .card-item-box { |
| | | margin-top: 0!important; |
| | | margin-bottom: 0!important; |
| | | } |
| | | } |
| | | >div:last-child { |
| | | .sub-card-wrap { |
| | | .card-item-box { |
| | | border-bottom: none!important; |
| | | >div:last-child { |
| | | .card-item-box { |
| | | border-bottom: none!important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | content = '' |
| | | } |
| | | } else { |
| | | if (col.eval === 'false' && col.noValue === 'hide') { // 空值隐藏 |
| | | Object.keys(record).forEach(key => { |
| | | if (/^\$/.test(key)) return |
| | | if (record[key]) return |
| | | |
| | | content = content.replace(new RegExp('[^@]*@' + key + '@', 'ig'), '') |
| | | }) |
| | | } |
| | | |
| | | Object.keys(record).forEach(key => { |
| | | let reg = new RegExp('@' + key + '@', 'ig') |
| | | content = content.replace(reg, record[key]) |
| | |
| | | content = '' |
| | | } |
| | | } else { |
| | | if (col.eval === 'false' && col.noValue === 'hide') { // 空值隐藏 |
| | | Object.keys(record).forEach(key => { |
| | | if (/^\$/.test(key)) return |
| | | if (record[key]) return |
| | | |
| | | content = content.replace(new RegExp('[^@]*@' + key + '@', 'ig'), '') |
| | | }) |
| | | } |
| | | |
| | | Object.keys(record).forEach(key => { |
| | | let reg = new RegExp('@' + key + '@', 'ig') |
| | | content = content.replace(reg, record[key]) |
| | |
| | | content = '' |
| | | } |
| | | } else { |
| | | if (col.eval === 'false' && col.noValue === 'hide') { // 空值隐藏 |
| | | Object.keys(record).forEach(key => { |
| | | if (/^\$/.test(key)) return |
| | | if (record[key]) return |
| | | |
| | | content = content.replace(new RegExp('[^@]*@' + key + '@', 'ig'), '') |
| | | }) |
| | | } |
| | | |
| | | Object.keys(record).forEach(key => { |
| | | let reg = new RegExp('@' + key + '@', 'ig') |
| | | content = content.replace(reg, record[key]) |
New file |
| | |
| | | import React, { Component } from 'react' |
| | | // import { is, fromJS } from 'immutable' |
| | | import { notification, Spin } from 'antd' |
| | | // import { BankOutlined } from '@ant-design/icons' |
| | | |
| | | import Api from '@/api' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import './index.scss' |
| | | |
| | | export default class SysMessage extends Component { |
| | | state = { |
| | | loading: true |
| | | } |
| | | |
| | | getAppList = () => { |
| | | let param = { |
| | | func: 's_get_kei' |
| | | } |
| | | |
| | | Api.getSystemConfig(param).then(result => { |
| | | if (result.status) { |
| | | let applist = result.data.map(item => { |
| | | item.sublist = item.data_detail || [] |
| | | item.sublist = item.sublist.map(cell => { |
| | | cell.ID = cell.d_id |
| | | return cell |
| | | }) |
| | | |
| | | return item |
| | | }) |
| | | let selectApp = applist[0] || null |
| | | |
| | | this.setState({ applist, selectApp }) |
| | | } else { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 5 |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | reloadMenuView = (menuId) => { |
| | | if (menuId !== 'message_page_id') return |
| | | |
| | | this.getAppList() |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | |
| | | } |
| | | |
| | | componentDidMount () { |
| | | MKEmitter.addListener('reloadMenuView', this.reloadMenuView) |
| | | } |
| | | |
| | | /** |
| | | * @description 组件销毁,清除state更新 |
| | | */ |
| | | componentWillUnmount () { |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | MKEmitter.removeListener('reloadMenuView', this.reloadMenuView) |
| | | } |
| | | |
| | | render() { |
| | | const { loading, } = this.state |
| | | |
| | | return ( |
| | | <div className="mk-sys-message"> |
| | | {loading && <Spin />} |
| | | </div> |
| | | ) |
| | | } |
| | | } |
New file |
| | |
| | | .mk-sys-message { |
| | | min-height: calc(100vh - 94px); |
| | | height: 100%; |
| | | position: relative; |
| | | padding: 15px; |
| | | |
| | | .ant-spin { |
| | | position: absolute; |
| | | top: calc(50vh - 100px); |
| | | left: calc(50vw - 12px); |
| | | } |
| | | } |
| | |
| | | import { is, fromJS } from 'immutable' |
| | | import { DndProvider } from 'react-dnd' |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | | import { Button, Card, Collapse, notification, Spin, Tooltip, Col } from 'antd' |
| | | import { QuestionCircleOutlined, RedoOutlined } from '@ant-design/icons' |
| | | import { Button, Card, Collapse, notification, Spin, Col } from 'antd' |
| | | import { RedoOutlined } from '@ant-design/icons' |
| | | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | |
| | | import ColumnComponent from '@/templates/sharecomponent/columncomponent' |
| | | |
| | | import MenuForm from './menuform' |
| | | import SourceElement from '@/templates/zshare/dragsource' |
| | | import Source from './source' |
| | | import './index.scss' |
| | | |
| | | const { Panel } = Collapse |
| | | |
| | | // const Versions = asyncComponent(() => import('@/menu/versions')) |
| | | const UrlFieldComponent = asyncComponent(() => import('@/menu/urlfieldcomponent')) |
| | | // const ReplaceField = asyncComponent(() => import('@/menu/replaceField')) |
| | | const UpdateTable = asyncComponent(() => import('./updatetable')) |
| | | const Unattended = asyncComponent(() => import('@/templates/zshare/unattended')) |
| | | // const EditComponent = asyncComponent(() => import('@/templates/zshare/editcomponent')) |
| | | const SettingComponent = asyncComponent(() => import('@/templates/sharecomponent/settingcomponent')) |
| | | const TableComponent = asyncComponent(() => import('@/templates/sharecomponent/tablecomponent')) |
| | | const FieldsComponent = asyncComponent(() => import('@/templates/sharecomponent/fieldscomponent')) |
| | | const ChartGroupComponent = asyncComponent(() => import('@/templates/sharecomponent/chartgroupcomponent')) |
| | | const ChartComponent = asyncComponent(() => import('@/templates/sharecomponent/chartcomponent')) |
| | | const CardComponent = asyncComponent(() => import('@/templates/sharecomponent/cardcomponent')) |
| | |
| | | |
| | | if (!config) return null |
| | | |
| | | const confActions = config.action.filter(_action => !_action.origin && (['pop', 'popview'].includes(_action.OpenType) || (_action.OpenType === 'tab' && _action.tabTemplate === 'FormTab') || (_action.OpenType === 'funcbutton' && _action.execMode === 'pop'))) |
| | | |
| | | let configTabs = [] |
| | | config.tabgroups.forEach(group => { |
| | | configTabs.push(...group.sublist) |
| | |
| | | containerId="main-basedata" |
| | | updatetable={this.updateconfig} |
| | | /> |
| | | </Panel> |
| | | {/* 搜索条件添加 */} |
| | | <Panel header="搜索" key="1"> |
| | | <div className="search-element"> |
| | | {Source.searchItems.map((item, index) => (<SourceElement key={index} content={item}/>))} |
| | | </div> |
| | | <FieldsComponent config={config} type="search" /> |
| | | </Panel> |
| | | {/* 按钮添加 */} |
| | | <Panel header="按钮" key="2"> |
| | | <div className="search-element"> |
| | | {Source.actionItems.map((item, index) => (<SourceElement key={index} content={item}/>))} |
| | | </div> |
| | | <div className="config-btn"> |
| | | {confActions.length > 0 ? |
| | | <p className="config-btn-title"> |
| | | <Tooltip placement="topLeft" title="点击按钮,可完成或查看按钮配置信息。"> |
| | | <QuestionCircleOutlined className="mk-form-tip"/> |
| | | </Tooltip> |
| | | 按钮配置 |
| | | </p> : null |
| | | } |
| | | </div> |
| | | {confActions.map((item, index) => { |
| | | return ( |
| | | <div key={index}> |
| | | <Button |
| | | icon={item.icon} |
| | | style={{marginBottom: '10px'}} |
| | | className={'config-button mk-btn mk-' + item.class} |
| | | onClick={() => this.setSubConfig(item, 'button')} |
| | | >{item.label}</Button> |
| | | </div> |
| | | ) |
| | | })} |
| | | </Panel> |
| | | {/* 添加显示列 */} |
| | | <Panel header="显示列" key="3"> |
| | | <div className="search-element"> |
| | | {Source.columnItems.map((item, index) => (<SourceElement key={index} content={item}/>))} |
| | | </div> |
| | | <FieldsComponent config={config} type="columns"/> |
| | | </Panel> |
| | | {/* 添加标签 */} |
| | | <Panel header="标签页" key="4"> |
| | | <div className="search-element"> |
| | | {Source.tabItems.map((item, index) => (<SourceElement key={index} content={item}/>))} |
| | | </div> |
| | | {configTabs.length > 0 ? |
| | | <p className="config-btn-title"> |
| | | <Tooltip placement="topLeft" title="点击按钮,可完成或查看标签配置信息。"> |
| | | <QuestionCircleOutlined className="mk-form-tip"/> |
| | | </Tooltip> |
| | | 标签配置 |
| | | </p> : null |
| | | } |
| | | {configTabs.map((item, index) => { |
| | | return ( |
| | | <div key={index}> |
| | | <Button |
| | | className="config-button" |
| | | icon={item.icon} |
| | | style={{marginBottom: '10px'}} |
| | | onClick={() => this.setSubConfig(item, 'tab')} |
| | | >{item.label}</Button> |
| | | </div> |
| | | ) |
| | | })} |
| | | </Panel> |
| | | </Collapse> |
| | | </div> |
| | |
| | | |
| | | let pass = checkSQL(values.sql, 'customscript') |
| | | |
| | | if (!pass) return |
| | | if (!pass && !skip) return |
| | | |
| | | let _initCustomScript = '' // 初始化脚本 |
| | | let _prevCustomScript = '' // 默认sql前执行脚本 |
| | |
| | | |
| | | let pass = checkSQL(values.sql, 'customscript') |
| | | |
| | | if (!pass) return |
| | | if (!pass && !skip) return |
| | | |
| | | this.setState({ |
| | | loading: true |
| | |
| | | |
| | | let pass = checkSQL(values.sql, 'customscript') |
| | | |
| | | if (!pass) return |
| | | if (!pass && !skip) return |
| | | |
| | | let _scripts = fromJS(scripts).toJS() |
| | | |
| | |
| | | newcard.field = '' |
| | | newcard.Hide = 'false' |
| | | newcard.contrastType = 'static' |
| | | newcard.IsSort = 'true' |
| | | newcard.IsSort = 'false' |
| | | newcard.type = item.subType |
| | | newcard.Width = item.subType === 'number' ? 80 : 120 |
| | | if (item.subType === 'colspan') { |
| | |
| | | type: 'radio', |
| | | key: 'IsSort', |
| | | label: '排序', |
| | | initVal: card.IsSort || 'true', |
| | | initVal: card.IsSort || 'false', |
| | | required: true, |
| | | options: [{ |
| | | value: 'true', |
| | |
| | | label: item.label, |
| | | field: item.field, |
| | | Hide: 'false', |
| | | IsSort: 'true', |
| | | IsSort: 'false', |
| | | type: item.type === 'number' ? 'number' : 'text', |
| | | Width: item.type === 'number' ? 80 : 120 |
| | | } |
| | |
| | | _config.MenuID = menu.MenuID || '' |
| | | |
| | | // 配置默认值,兼容 |
| | | // _config.Template = 'TreePage' |
| | | _config.easyCode = _config.easyCode || '' |
| | | |
| | | if (_config.type === 'user') { |
| | |
| | | |
| | | let pass = checkSQL(values.sql, 'customscript') |
| | | |
| | | if (!pass) return |
| | | if (!pass && !skip) return |
| | | |
| | | let tail = ` |
| | | aaa: |
| | |
| | | |
| | | let pass = checkSQL(values.sql, 'customscript') |
| | | |
| | | if (!pass) return |
| | | if (!pass && !skip) return |
| | | |
| | | let tail = ` |
| | | aaa: |
| | |
| | | |
| | | // 系统模板 |
| | | export const sysTemps = [ |
| | | // { |
| | | // title: '基础表格', |
| | | // type: 'CommonTable', |
| | | // url: nortable, |
| | | // baseconfig: '', |
| | | // isSystem: true |
| | | // }, |
| | | { |
| | | title: '基础表格', |
| | | type: 'BaseTable', |
| | |
| | | baseconfig: '', |
| | | isSystem: true |
| | | }, |
| | | // { |
| | | // title: '主子表表格', |
| | | // type: 'CommonTable', |
| | | // url: mainsubtable, |
| | | // baseconfig: '', |
| | | // isSystem: true, |
| | | // isSubtable: true |
| | | // }, |
| | | { |
| | | title: '自定义', |
| | | type: 'CustomPage', |
| | |
| | | baseconfig: '', |
| | | isSystem: true |
| | | }, |
| | | // { |
| | | // title: '树形页面', |
| | | // type: 'TreePage', |
| | | // url: treepage, |
| | | // baseconfig: '', |
| | | // isSystem: true |
| | | // }, |
| | | { |
| | | title: '外部页面', |
| | | type: 'NewPage', |
| | |
| | | |
| | | if (config.interfaces) { |
| | | config.interfaces.forEach(item => { |
| | | if (item.status !== 'true') return |
| | | if (item.setting && item.setting.interType === 'outer' && item.setting.sysInterface !== 'true') { |
| | | inters = 'true' |
| | | } |
| | |
| | | duration: 5 |
| | | }) |
| | | return false |
| | | } else if (/,\./ig.test(sql)) { |
| | | let lines = [] |
| | | sql.split(/\n/).forEach((s, i) => { |
| | | if (/,\./ig.test(s)) { |
| | | lines.push(i + 1) |
| | | } |
| | | }) |
| | | |
| | | lines = lines.join('、') |
| | | lines = lines ? '(第' + lines + '行)' : '' |
| | | |
| | | notification.warning({ |
| | | top: 92, |
| | | message: label + `${lines},不可出现英文逗号,.`, |
| | | duration: 5 |
| | | }) |
| | | return false |
| | | } else if (/\.,/ig.test(sql)) { |
| | | let lines = [] |
| | | sql.split(/\n/).forEach((s, i) => { |
| | | if (/\.,/ig.test(s)) { |
| | | lines.push(i + 1) |
| | | } |
| | | }) |
| | | |
| | | lines = lines.join('、') |
| | | lines = lines ? '(第' + lines + '行)' : '' |
| | | |
| | | notification.warning({ |
| | | top: 92, |
| | | message: label + `${lines},不可出现英文逗号.,`, |
| | | duration: 5 |
| | | }) |
| | | return false |
| | | } else if (/‘|’/ig.test(sql)) { |
| | | let lines = [] |
| | | sql.split(/\n/).forEach((s, i) => { |
| | |
| | | bg_black_style_magenta: {name: '洋红色', color: '#eb2f96'}, |
| | | bg_black_style_grass_green: {name: '草绿色', color: '#aeb303'}, |
| | | bg_black_style_deep_red: {name: '深红色', color: '#c32539'}, |
| | | bg_black_style_deep_blue: {name: '深红色', color: '#1d3661'} |
| | | bg_black_style_deep_blue: {name: '深蓝色', color: '#1d3661'} |
| | | } |
| | | |
| | | class AppCheck extends Component { |
| | |
| | | bg_black_style_magenta: {name: '洋红色', color: '#eb2f96'}, |
| | | bg_black_style_grass_green: {name: '草绿色', color: '#aeb303'}, |
| | | bg_black_style_deep_red: {name: '深红色', color: '#c32539'}, |
| | | bg_black_style_deep_blue: {name: '深红色', color: '#1d3661'} |
| | | bg_black_style_deep_blue: {name: '深蓝色', color: '#1d3661'} |
| | | } |
| | | |
| | | class AppManage extends Component { |
| | |
| | | import React, {Component} from 'react' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Menu, Popover, Modal, notification } from 'antd' |
| | | import { EditOutlined, PlusOutlined, SettingOutlined, ApiOutlined, SoundOutlined } from '@ant-design/icons' |
| | | import { EditOutlined, PlusOutlined, SettingOutlined, ApiOutlined, SoundOutlined, DatabaseOutlined } from '@ant-design/icons' |
| | | import moment from 'moment' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | |
| | | {item.children.map(cell => { |
| | | return ( |
| | | <Menu.Item key={cell.MenuID}> |
| | | <span className={'editable-menu-item ' + (cell.up_action ? 'unupdate' : '') + (window.backend && window.GLOB.systemType !== 'production' && cell.PageParam.backend !== 'level1' ? ' unbackend' : '')} onDoubleClick={() => this.editmenu(cell)}>{cell.PageParam.interfaces === 'true' ? <ApiOutlined title="菜单中使用了外部接口" /> : null}{cell.PageParam.msg === 'true' ? <SoundOutlined title="菜单中发送了消息" /> : null}{cell.MenuName}</span> |
| | | <span className={'editable-menu-item ' + (cell.up_action ? 'unupdate' : '') + (window.backend && window.GLOB.systemType !== 'production' && cell.PageParam.backend !== 'level1' ? ' unbackend' : '')} onDoubleClick={() => this.editmenu(cell)}>{cell.PageParam.interfaces === 'true' ? <ApiOutlined title="菜单中使用了外部接口" /> : null}{cell.PageParam.msg === 'true' ? <SoundOutlined title="菜单中发送了消息" /> : null}{cell.MenuName}{cell.PageParam.pds === 'true' ? <DatabaseOutlined style={{marginLeft: '5px', color: 'inherit'}} title="菜单中使用了公共数据源" /> : null}</span> |
| | | </Menu.Item> |
| | | ) |
| | | })} |
| | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | |
| | | import mainsubtable from '@/assets/img/mainsubtable.jpg' |
| | | import treepage from '@/assets/img/treepage.jpg' |
| | | import calendar from '@/assets/img/calendar.jpg' |
| | | import customImg from '@/assets/img/custom.jpg' |
| | | |
| | | import './index.scss' |
| | |
| | | |
| | | const illust = { // 模板图片,用于已使用模板 |
| | | BaseTable: mainsubtable, |
| | | TreePage: treepage, |
| | | CalendarPage: calendar, |
| | | CustomPage: customImg |
| | | } |
| | | |
| | |
| | | }, (err) => { |
| | | this.handleResponse(err) |
| | | }) |
| | | } else if (/dostars/ig.test(url)) { |
| | | } else if (/dostars|exstars/ig.test(url)) { |
| | | if (n) { |
| | | n = JSON.parse(n) |
| | | |
| | |
| | | import React, {Component} from 'react' |
| | | import React, { Component } from 'react' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import Header from '@/components/header' |
| | |
| | | |
| | | const Tabview = asyncComponent(() => import('@/components/tabview')) |
| | | const Breadview = asyncComponent(() => import('@/components/breadview')) |
| | | const SysMessage = asyncComponent(() => import('@/components/header/sysmessage/index')) |
| | | |
| | | class Main extends Component { |
| | | state = { |
| | |
| | | if (!this.state.userId) return null |
| | | |
| | | return ( |
| | | <div className="mk-main-view"> |
| | | <Header key="header"/> |
| | | {navBar === 'shutter' ? <Sidemenu key="sidemenu"/> : null} |
| | | {navBar === 'shutter' || navBar === 'menu_board_navigation' ? |
| | | <Tabview key="tabview"/> : |
| | | <Breadview key="breadview"/>} |
| | | <> |
| | | <div className="mk-main-view"> |
| | | <Header key="header"/> |
| | | {navBar === 'shutter' ? <Sidemenu key="sidemenu"/> : null} |
| | | {navBar === 'shutter' || navBar === 'menu_board_navigation' ? |
| | | <Tabview key="tabview"/> : |
| | | <Breadview key="breadview"/>} |
| | | <ImgScale /> |
| | | </div> |
| | | {window.GLOB.systemType === 'production' ? <QueryLog /> : null} |
| | | <ImgScale /> |
| | | </div> |
| | | {window.GLOB.SysNotice ? <SysMessage /> : null} |
| | | </> |
| | | ) |
| | | } |
| | | } |
| | |
| | | EasyCode: trd.EasyCode, |
| | | value: trd.MenuID, |
| | | label: trd.MenuName, |
| | | type: 'CommonTable', |
| | | type: 'CustomPage', |
| | | disabled: false |
| | | } |
| | | |
| | | if (trd.PageParam) { |
| | | try { |
| | | trd.PageParam = JSON.parse(trd.PageParam) |
| | | trdItem.type = trd.PageParam.Template || 'CommonTable' |
| | | trdItem.type = trd.PageParam.Template || 'CustomPage' |
| | | } catch (e) { |
| | | |
| | | } |
| | |
| | | let msg = getOutMessage(config) |
| | | let urlFields = config.urlFields ? config.urlFields.join(',') : '' |
| | | let langSql = getLangTrans(config) |
| | | let pds = 'false' |
| | | if (config.interfaces) { |
| | | config.interfaces.forEach(item => { |
| | | if (item.status !== 'true') return |
| | | pds = 'true' |
| | | }) |
| | | } |
| | | |
| | | let param = { |
| | | func: 'sPC_TrdMenu_AddUpt', |
| | |
| | | EasyCode: config.easyCode || '', |
| | | Template: 'CustomPage', |
| | | MenuName: config.MenuName || '', |
| | | PageParam: JSON.stringify({Template: 'CustomPage', OpenType: config.OpenType || 'newtab', hidden: config.hidden || 'false', menuColor: config.menuColor || '', interfaces, msg, backend: 'level1', urlFields}), |
| | | PageParam: JSON.stringify({Template: 'CustomPage', OpenType: config.OpenType || 'newtab', hidden: config.hidden || 'false', menuColor: config.menuColor || '', interfaces, msg, pds, backend: 'level1', urlFields}), |
| | | open_edition: config.open_edition, |
| | | long_data: long_data, |
| | | debug_md5: key, |
| | |
| | | EasyCode: trd.EasyCode, |
| | | value: trd.MenuID, |
| | | label: trd.MenuName, |
| | | type: 'CommonTable', |
| | | type: 'CustomPage', |
| | | disabled: false |
| | | } |
| | | |
| | | if (trd.PageParam) { |
| | | try { |
| | | trd.PageParam = JSON.parse(trd.PageParam) |
| | | trdItem.type = trd.PageParam.Template || 'CommonTable' |
| | | trdItem.type = trd.PageParam.Template || 'CustomPage' |
| | | } catch (e) { |
| | | |
| | | } |
| | |
| | | roleParam.msg = msg |
| | | roleParam.backend = 'level1' |
| | | let langSql = getLangTrans(config) |
| | | |
| | | roleParam.pds = 'false' |
| | | if (config.interfaces) { |
| | | config.interfaces.forEach(item => { |
| | | if (item.status !== 'true') return |
| | | roleParam.pds = 'true' |
| | | }) |
| | | } |
| | | |
| | | let param = { |
| | | func: 'sPC_TrdMenu_AddUpt', |
| | |
| | | <PictureController/> |
| | | <Quotecomponent config={config} updateConfig={this.updateConfig}/> |
| | | <StyleCombControlButton menu={config} /> |
| | | <Button className="mk-border-green set-home" disabled={MenuId === appHomeId} onClick={this.setHomeView}><HomeOutlined /> 设为首页</Button> |
| | | <Button className="mk-border-purple" disabled={MenuId === appLoginId} onClick={this.setLoginView}><LoginOutlined /> 设为登录页</Button> |
| | | <Button className="mk-border-green set-home" disabled={MenuId === appHomeId} data-title="当前菜单为应用首页" onClick={this.setHomeView}><HomeOutlined /> 设为首页</Button> |
| | | <Button className="mk-border-purple" disabled={MenuId === appLoginId} data-title="当前菜单为应用登录页" onClick={this.setLoginView}><LoginOutlined /> 设为登录页</Button> |
| | | <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/> |
| | | <Transfer MenuID={MenuId} /> |
| | | {config ? <Versions MenuId={MenuId} Template="webPage" checklog={this.checklog} updateConfig={this.updateLogConfig}/> : null} |
| | |
| | | height: 20px; |
| | | } |
| | | } |
| | | |
| | | [data-title]:disabled { |
| | | position: relative; |
| | | &::after { |
| | | position: absolute; |
| | | z-index: 20; |
| | | top: -35px; |
| | | left: 50%; |
| | | pointer-events: none; |
| | | opacity: 0; |
| | | transform: translateX(-50%) translateY(-5px); |
| | | transition: opacity .3s, transform .3s; |
| | | padding: 8px; |
| | | background-color: #21242a; |
| | | border-radius: 4px; |
| | | box-shadow: 0 5px 15px rgba(#000, .2); |
| | | color: #fff; |
| | | font-size: 13px; |
| | | line-height: 16px; |
| | | white-space: nowrap; |
| | | content: attr(data-title); |
| | | } |
| | | &:hover { |
| | | &::after { |
| | | opacity: 1; |
| | | transform: translateX(-50%) translateY(0); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .mk-mob-view.userbind { |
| | |
| | | roleParam.backend = 'level1' |
| | | let langSql = getLangTrans(config) |
| | | |
| | | roleParam.pds = 'false' |
| | | if (config.interfaces) { |
| | | config.interfaces.forEach(item => { |
| | | if (item.status !== 'true') return |
| | | roleParam.pds = 'true' |
| | | }) |
| | | } |
| | | |
| | | let param = { |
| | | func: 'sPC_TrdMenu_AddUpt', |
| | | FstID: 'mk_app', |
| | |
| | | <PictureController/> |
| | | <Quotecomponent config={config} updateConfig={this.updateConfig}/> |
| | | <StyleCombControlButton menu={config} /> |
| | | <Button className="mk-border-green" disabled={MenuId === appHomeId} onClick={this.setHomeView}><HomeOutlined /> 设为首页</Button> |
| | | <Button className="mk-border-purple" disabled={MenuId === appLoginId} onClick={this.setLoginView}><LoginOutlined/> 设为登录页</Button> |
| | | <Button className="mk-border-green" disabled={MenuId === appHomeId} data-title="当前菜单为应用首页" onClick={this.setHomeView}><HomeOutlined /> 设为首页</Button> |
| | | <Button className="mk-border-purple" disabled={MenuId === appLoginId} data-title="当前菜单为应用登录页" onClick={this.setLoginView}><LoginOutlined/> 设为登录页</Button> |
| | | <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/> |
| | | <Transfer MenuID={MenuId} /> |
| | | {config ? <Versions MenuId={MenuId} Template="webPage" checklog={this.checklog} updateConfig={this.updateLogConfig}/> : null} |
| | |
| | | border: 1px solid rgba(0, 0, 0, 0.07); |
| | | background: rgba(0, 0, 0, 0); |
| | | } |
| | | |
| | | [data-title]:disabled { |
| | | position: relative; |
| | | &::after { |
| | | position: absolute; |
| | | z-index: 20; |
| | | top: -35px; |
| | | left: 50%; |
| | | pointer-events: none; |
| | | opacity: 0; |
| | | transform: translateX(-50%) translateY(-5px); |
| | | transition: opacity .3s, transform .3s; |
| | | padding: 8px; |
| | | background-color: #21242a; |
| | | border-radius: 4px; |
| | | box-shadow: 0 5px 15px rgba(#000, .2); |
| | | color: #fff; |
| | | font-size: 13px; |
| | | line-height: 16px; |
| | | white-space: nowrap; |
| | | content: attr(data-title); |
| | | } |
| | | &:hover { |
| | | &::after { |
| | | opacity: 1; |
| | | transform: translateX(-50%) translateY(0); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .mk-pc-view + .modal-form-board { |
| | | padding-top: 0px; |
| | |
| | | import { Spin, notification, Button, Table, Modal, Tree, Input, Empty } from 'antd' |
| | | import moment from 'moment' |
| | | import md5 from 'md5' |
| | | import { ApiOutlined, SoundOutlined } from '@ant-design/icons' |
| | | import { ApiOutlined, SoundOutlined, DatabaseOutlined } from '@ant-design/icons' |
| | | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | |
| | | let className = window.backend && record.backend !== 'level1' ? 'unbackend' : '' |
| | | if (record.extra || this.state.appKeys.includes(record.MenuID)) { |
| | | return <span className={className} style={{color: '#1890ff'}}>{text}</span> |
| | | } else if (record.interfaces === 'true' || record.msg === 'true') { |
| | | return <span className={className}>{record.interfaces === 'true' ? <ApiOutlined style={{color: 'orange', marginRight: '5px'}} title="菜单中使用了外部接口" /> : null}{record.msg === 'true' ? <SoundOutlined style={{color: 'orange', marginRight: '5px'}} title="菜单中发送了消息" /> : null}{text}</span> |
| | | } else if (record.interfaces === 'true' || record.msg === 'true' || record.pds === 'true') { |
| | | return <span className={className}>{record.interfaces === 'true' ? <ApiOutlined style={{color: 'orange', marginRight: '5px'}} title="菜单中使用了外部接口" /> : null}{record.msg === 'true' ? <SoundOutlined style={{color: 'orange', marginRight: '5px'}} title="菜单中发送了消息" /> : null}{text}{record.pds === 'true' ? <DatabaseOutlined style={{marginLeft: '5px'}} title="菜单中使用了公共数据源" /> : null}</span> |
| | | } |
| | | return <span className={className}>{text}</span> |
| | | } |
| | |
| | | item.nodes = pageParam |
| | | item.interfaces = pageParam.interfaces || 'false' |
| | | item.msg = pageParam.msg || 'false' |
| | | item.pds = pageParam.pds || 'false' |
| | | item.backend = pageParam.backend || '' |
| | | |
| | | if (pageParam.type) { |
| | |
| | | let _param = JSON.parse(window.decodeURIComponent(window.atob(this.props.match.params.param))) |
| | | |
| | | if (typeof(_param) === 'object') { |
| | | this.authLogin(_param.appid, _param.openid, _param.memberId, _param.key) |
| | | this.authLogin(_param.appid, _param.openid, _param.memberId, _param.key, _param.menuId || '') |
| | | } else { |
| | | this.props.history.replace('/login') |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | authLogin = (appid, openid, memberid, scanId) => { |
| | | authLogin = (appid, openid, memberid, scanId, menuId) => { |
| | | Api.getTouristMsg('mk', appid, openid, memberid, scanId).then(res => { |
| | | if (res.status) { |
| | | sessionStorage.setItem('UserID', res.UserID) |
| | |
| | | sessionStorage.setItem('organization', res.organization || '') |
| | | sessionStorage.setItem('mk_user_type', res.mk_user_type || '') |
| | | |
| | | this.getMessage() |
| | | this.getMessage(menuId) |
| | | } else { |
| | | notification.warning({ |
| | | top: 92, |
| | |
| | | }) |
| | | } |
| | | |
| | | getMessage = () => { |
| | | getMessage = (menuId) => { |
| | | let _param = { |
| | | func: 's_Get_style', |
| | | TypeCharOne: 'PC', |
| | |
| | | document.getElementsByTagName('head')[0].appendChild(link) |
| | | } |
| | | |
| | | if (menuId) { |
| | | sessionStorage.setItem('ThirdMenu', menuId) |
| | | } |
| | | |
| | | this.props.history.replace('/main') |
| | | } else { |
| | | notification.warning({ |
| | |
| | | EasyCode: trd.EasyCode, |
| | | value: trd.MenuID, |
| | | label: trd.MenuName, |
| | | type: 'CommonTable', |
| | | type: 'CustomPage', |
| | | disabled: false |
| | | } |
| | | |
| | | if (trd.PageParam) { |
| | | try { |
| | | trd.PageParam = JSON.parse(trd.PageParam) |
| | | trdItem.type = trd.PageParam.Template || 'CommonTable' |
| | | trdItem.type = trd.PageParam.Template || 'CustomPage' |
| | | } catch (e) { |
| | | |
| | | } |