| | |
| | | if (!result) return |
| | | |
| | | if (result.status) { |
| | | let res = this.getMenulist(result) |
| | | const { menulist } = this.getMenulist(result) |
| | | |
| | | this.setState({ |
| | | menulist: res.menulist, |
| | | menulist, |
| | | systems: [] |
| | | }) |
| | | |
| | | this.props.modifyMenuTree(res.menulist) |
| | | this.props.modifyMainMenu(res.menulist[0] || null) |
| | | this.props.modifyMenuTree(menulist) |
| | | this.props.modifyMainMenu(menulist[0] || null) |
| | | } else { |
| | | notification.error({ |
| | | top: 92, |
| | |
| | | _param.pro_sys = window.GLOB.systemType === 'production' ? 'Y' : '' |
| | | |
| | | Api.getSystemConfig(_param).then(result => { |
| | | if (!result.status || !result.fst_menu) { |
| | | if (!result.status) { |
| | | notification.error({ |
| | | top: 92, |
| | | message: result.message || '未查询到菜单信息!', |
| | | message: result.message, |
| | | duration: 10 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | let res = this.getMenulist(result) |
| | | const { menulist, thdMenuList } = this.getMenulist(result) |
| | | |
| | | this.setState({ |
| | | menulist: res.menulist, |
| | | thdMenuList: res.thdMenuList, |
| | | menulist, |
| | | thdMenuList, |
| | | systems: window.GLOB.systemType === 'production' || options.sysType === 'SSO' ? (result.sys_list || []) : [] |
| | | }) |
| | | |
| | | let mainMenu = res.menulist[0] || null |
| | | let mainMenu = menulist[0] || '' |
| | | let _menu = null |
| | | |
| | | if (sessionStorage.getItem('ThirdMenu')) { // 是否为打开新页面 |
| | | let ThirdMenuId = sessionStorage.getItem('ThirdMenu') |
| | | _menu = res.thdMenuList.filter(item => item.MenuID === ThirdMenuId)[0] // 通过url中menuid筛选出选中的主菜单 |
| | | _menu = thdMenuList.filter(item => item.MenuID === ThirdMenuId)[0] // 通过url中menuid筛选出选中的主菜单 |
| | | |
| | | if (_menu) { |
| | | mainMenu = res.menulist.filter(item => item.MenuID === _menu.FstId)[0] |
| | | mainMenu = menulist.filter(item => item.MenuID === _menu.FstId)[0] |
| | | mainMenu = fromJS(mainMenu).toJS() |
| | | mainMenu.openId = _menu.ParentId |
| | | } |
| | |
| | | sessionStorage.removeItem('ThirdMenu') |
| | | } |
| | | |
| | | this.props.modifyMenuTree(res.menulist) |
| | | this.props.modifyMenuTree(menulist) |
| | | this.props.modifyMainMenu(mainMenu) |
| | | this.props.initMenuPermission(res.thdMenuList) |
| | | this.props.initMenuPermission(thdMenuList) |
| | | |
| | | resolve(_menu) |
| | | }) |
| | |
| | | getMenulist = (result) => { |
| | | let thdMenuList = [] |
| | | let iframes = ['Main/Index', 'bda/rdt', 'Home/rdt'] |
| | | let menulist = result.fst_menu.map(fst => { |
| | | let menulist = [] |
| | | result.fst_menu && result.fst_menu.forEach(fst => { |
| | | let fstItem = { |
| | | MenuID: fst.MenuID, |
| | | MenuName: fst.MenuName, |
| | |
| | | }) |
| | | } |
| | | |
| | | return fstItem |
| | | menulist.push(fstItem) |
| | | }) |
| | | |
| | | return { menulist, thdMenuList } |
| | |
| | | |
| | | render () { |
| | | const { mainMenu, collapse } = this.props |
| | | const { thdMenuList, searchkey, oriVersion, newVersion, debug } = this.state |
| | | const { thdMenuList, searchkey, oriVersion, newVersion, debug, menulist } = this.state |
| | | |
| | | const menu = ( |
| | | <Menu className="header-dropdown"> |
| | |
| | | <Switch size="small" style={{marginLeft: '7px'}} disabled={!!this.props.editLevel} checked={this.props.editState} onChange={this.changeEditState} /> |
| | | </Menu.Item>} |
| | | {!this.props.editState ? <Menu.Item key="password" onClick={this.changePassword}>{this.state.dict['main.password']}</Menu.Item> : null} |
| | | {this.state.systems.length > 0 ? <Menu.SubMenu title="切换系统"> |
| | | {this.state.systems.length ? <Menu.SubMenu style={{minWidth: '110px'}} title="切换系统"> |
| | | {this.state.systems.map((system, index) => ( |
| | | <Menu.Item style={{minWidth: '100px'}} key={'sub' + index} onClick={() => {this.changeSystem(system)}}> {system.AppName} </Menu.Item> |
| | | <Menu.Item style={{minWidth: '100px', lineHeight: '30px'}} key={'sub' + index} onClick={() => {this.changeSystem(system)}}> {system.AppName} </Menu.Item> |
| | | ))} |
| | | </Menu.SubMenu> : null} |
| | | <Menu.Item key="doc" onClick={this.gotoDoc}>{this.state.dict['main.doc']}</Menu.Item> |
| | |
| | | |
| | | return ( |
| | | <header className="header-container ant-menu-dark" id="main-header-container"> |
| | | <div className={collapse ? "collapse header-logo" : "header-logo"}><img src={this.state.logourl} alt=""/></div> |
| | | <div className={collapse ? "collapse header-collapse" : "header-collapse"} onClick={this.handleCollapse}> |
| | | <Icon type={collapse ? 'menu-unfold' : 'menu-fold'} /> |
| | | <div className={'header-logo ' + (collapse ? 'collapse' : '')}><img src={this.state.logourl} alt=""/></div> |
| | | <div className={'header-collapse ' + (collapse ? 'collapse' : '')}> |
| | | {menulist && menulist.length ? <Icon type={collapse ? 'menu-unfold' : 'menu-fold'} onClick={this.handleCollapse}/> : null} |
| | | </div> |
| | | {/* 正常菜单 */} |
| | | {this.props.editLevel !== 'level1' && this.state.menulist ? |
| | | {this.props.editLevel !== 'level1' && menulist ? |
| | | <ul className={'header-menu ' + this.props.editLevel}>{ |
| | | this.state.menulist.map(item => { |
| | | menulist.map(item => { |
| | | return ( |
| | | <li key={item.MenuID} onClick={() => {this.changeMenu(item)}} className={mainMenu && mainMenu.MenuID === item.MenuID ? 'active' : ''}> |
| | | <span>{item.MenuName}</span> |
| | |
| | | .header-collapse { |
| | | float: left; |
| | | width: 35px; |
| | | min-height: 48px; |
| | | line-height: 48px; |
| | | padding-left: 10px; |
| | | margin: 0 10px; |
| | | cursor: pointer; |
| | | transition: padding-left 0.15s; |
| | | i { |
| | | cursor: pointer; |
| | | position: relative; |
| | | top: 3px; |
| | | font-size: 20px; |
| | |
| | | } |
| | | |
| | | render () { |
| | | const { mainMenu } = this.props |
| | | const editShow = (this.props.editState && !this.props.editLevel) || false |
| | | |
| | | if (mainMenu === '') return (<span className="side-menu-hidden"></span>) |
| | | |
| | | return ( |
| | | <aside className={"side-menu ant-menu-dark" + (this.props.collapse ? ' side-menu-collapsed' : '') + (this.props.isiframe ? ' iframe' : '') + (this.props.editState ? ' edit' : '')}> |
| | | {!(this.props.editLevel === 'level2' || this.props.editLevel === 'level3') && |
| | |
| | | .content-box.collapsed { |
| | | max-width: calc(100% - 80px); |
| | | } |
| | | .side-menu-hidden + .content-box, .side-menu-hidden + .content-box.collapsed { |
| | | max-width: 100%; |
| | | >.content-header >.ant-tabs >.ant-tabs-bar { |
| | | display: none; |
| | | } |
| | | } |
| | | .ant-message { |
| | | top: 50px; |
| | | z-index: 1080; |
| | |
| | | res.innerHeight = fontSize * lineHeight * line |
| | | |
| | | if (res.eleType === 'text' && res.link && !res.style.color) { |
| | | res.style.color = 'rgba(24, 144, 255, 1)' |
| | | res.style.color = '#2440B3' |
| | | } |
| | | } else if (res.eleType === 'barcode') { |
| | | let fontSize = 14 |
| | |
| | | name: card.name, |
| | | subtype: card.subtype, |
| | | setting: { interType: 'system' }, |
| | | wrap: { name: card.name, width: 24, pagestyle: 'page', switch: 'false' }, |
| | | wrap: { name: card.name, width: 24, title: '', pagestyle: 'page', switch: 'false' }, |
| | | style: { marginLeft: '0px', marginRight: '0px', marginTop: '8px', marginBottom: '8px' }, |
| | | headerStyle: { fontSize: '16px', borderBottomWidth: '1px', borderBottomColor: '#e8e8e8' }, |
| | | columns: [], |
| | |
| | | name: card.name, |
| | | subtype: card.subtype, |
| | | setting: { interType: 'system' }, |
| | | wrap: { name: card.name, width: 24, addable: 'false', switch: 'false', datatype: 'dynamic' }, |
| | | wrap: { name: card.name, width: 24, title: '', addable: 'false', switch: 'false', datatype: 'dynamic' }, |
| | | style: { marginLeft: '0px', marginRight: '0px', marginTop: '8px', marginBottom: '8px' }, |
| | | headerStyle: { fontSize: '16px', borderBottomWidth: '1px', borderBottomColor: '#e8e8e8' }, |
| | | columns: [], |
| | | scripts: [], |
| | | subcards: subcards, |
| | |
| | | name: card.name, |
| | | subtype: card.subtype, |
| | | setting: { interType: 'system' }, |
| | | wrap: { name: card.name, width: 12 }, |
| | | wrap: { name: card.name, width: 12, title: '' }, |
| | | style: { marginLeft: '8px', marginRight: '8px', marginTop: '8px', marginBottom: '8px' }, |
| | | headerStyle: { fontSize: '16px' }, |
| | | headerStyle: { fontSize: '16px', borderBottomWidth: '1px', borderBottomColor: '#e8e8e8' }, |
| | | columns: [], |
| | | scripts: [], |
| | | subcards: subcards |
| | |
| | | </div> |
| | | <div className="ant-col ant-form-item-control-wrapper ant-col-xs-24 ant-col-sm-16"> |
| | | {card.type === 'text' ? |
| | | <Input style={{marginTop: '4px'}} value={card.initval} /> : null |
| | | <Input style={{marginTop: '4px'}} placeholder={card.labelShow === 'false' ? card.label : ''} value={card.initval} /> : null |
| | | } |
| | | {(card.type === 'multiselect' || card.type === 'select' || card.type === 'link') ? |
| | | <Select value={_defaultValue}></Select> : null |
| | |
| | | class NormalHeader extends Component { |
| | | static propTpyes = { |
| | | defaultshow: PropTypes.any, // 标题与搜索条件不存在时隐藏 |
| | | hideSearch: PropTypes.any, // 隐藏搜索条件 |
| | | config: PropTypes.object, // 配置信息 |
| | | updateComponent: PropTypes.func // 配置更新 |
| | | } |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { config, defaultshow } = this.props |
| | | const { config, defaultshow, hideSearch } = this.props |
| | | |
| | | let title = config.plot ? config.plot.title : config.wrap.title |
| | | let show = true |
| | |
| | | } trigger="hover"> |
| | | <span className="title">{title}</span> |
| | | </Popover> |
| | | {config.search ? <SearchComponent config={config} updatesearch={this.props.updateComponent}/> : null} |
| | | {hideSearch !== 'true' && config.search ? <SearchComponent config={config} updatesearch={this.props.updateComponent}/> : null} |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | const SettingComponent = asyncIconComponent(() => import('@/menu/datasource')) |
| | | const SearchComponent = asyncComponent(() => import('@/templates/sharecomponent/searchcomponent')) |
| | | const ActionComponent = asyncComponent(() => import('@/menu/components/share/actioncomponent')) |
| | | const NormalHeader = asyncComponent(() => import('@/menu/components/share/normalheader')) |
| | | const ColumnComponent = asyncComponent(() => import('./columns')) |
| | | const WrapComponent = asyncIconComponent(() => import('./wrapsetting')) |
| | | |
| | |
| | | setting: { interType: 'system' }, |
| | | wrap: { name: card.name, width: 24, bordered: 'true', tableType: 'checkbox' }, |
| | | style: { marginLeft: '8px', marginRight: '8px', marginTop: '8px', marginBottom: '8px' }, |
| | | headerStyle: { fontSize: '16px', borderBottomWidth: '1px', borderBottomColor: '#e8e8e8' }, |
| | | columns: [], |
| | | cols: [ |
| | | { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label1', field: '', Hide: 'false', type: 'text', Width: 120 }, |
| | |
| | | |
| | | return ( |
| | | <div className="menu-normal-table-edit-box" style={{...card.style, height: card.wrap.height}}> |
| | | <NormalHeader defaultshow="hidden" hideSearch="true" config={card} updateComponent={this.updateComponent}/> |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <Icon className="plus" title="添加列" onClick={this.addColumns} type="plus" /> |
| | |
| | | import zhCN from '@/locales/zh-CN/main.js' |
| | | import enUS from '@/locales/en-US/main.js' |
| | | import Utils from '@/utils/utils.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import asyncSpinComponent from '@/utils/asyncSpinComponent' |
| | | import MKEmitter from '@/utils/events.js' |
| | | |
| | | import MainSearch from '@/tabviews/zshare/topSearch' |
| | | import NotFount from '@/components/404' |
| | | import './index.scss' |
| | | |
| | | // 通用组件 |
| | | const MainSearch = asyncComponent(() => import('@/tabviews/zshare/topSearch')) |
| | | const CalendarComponent = asyncSpinComponent(() => import('@/tabviews/zshare/calendar')) |
| | | const SubTabTable = asyncSpinComponent(() => import('@/tabviews/subtabtable')) |
| | | |
| | |
| | | <div className="calendar-page" id={this.state.ContainerId}> |
| | | {loadingview && <Spin size="large" />} |
| | | {searchlist && searchlist.length > 0 ? |
| | | <MainSearch |
| | | BID={BID} |
| | | dict={this.state.dict} |
| | | searchlist={searchlist} |
| | | menuType={menuType} |
| | | refreshdata={this.refreshbysearch} |
| | | /> : null |
| | | <MainSearch BID={BID} searchlist={searchlist} menuType={menuType} refreshdata={this.refreshbysearch}/> : null |
| | | } |
| | | {config && config.calendar ? <CalendarComponent calendar={config.calendar} loading={loading} data={data} triggerDate={this.triggerDate} changeDate={this.changeDate}/> : null} |
| | | {debug && options.sysType !== 'cloud' && menuType !== 'HS' ? <Button |
| | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import asyncSpinComponent from '@/utils/asyncSpinComponent' |
| | | import MKEmitter from '@/utils/events.js' |
| | | |
| | | import MainSearch from '@/tabviews/zshare/topSearch' |
| | | import NotFount from '@/components/404' |
| | | import './index.scss' |
| | | |
| | | // 通用组件 |
| | | const MainSearch = asyncComponent(() => import('@/tabviews/zshare/topSearch')) |
| | | const MainAction = asyncSpinComponent(() => import('@/tabviews/zshare/actionList')) |
| | | const MainTable = asyncSpinComponent(() => import('@/tabviews/zshare/normalTable')) |
| | | const SettingComponent = asyncComponent(() => import('@/tabviews/zshare/settingcomponent')) |
| | |
| | | return ( |
| | | <div className="commontable" id={this.state.ContainerId}> |
| | | {loadingview && <Spin size="large" />} |
| | | {searchlist && searchlist.length > 0 ? |
| | | <MainSearch |
| | | BID={BID} |
| | | dict={this.state.dict} |
| | | searchlist={searchlist} |
| | | menuType={this.props.menuType} |
| | | refreshdata={this.refreshbysearch} |
| | | /> : null |
| | | {searchlist && searchlist.length ? |
| | | <MainSearch BID={BID} searchlist={searchlist} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null |
| | | } |
| | | {setting && setting.onload !== 'false' ? <Row className="chart-view" gutter={16}> |
| | | {/* 视图组 */} |
| | |
| | | import asyncComponent from './asyncButtonComponent' |
| | | import asyncElementComponent from '@/utils/asyncComponent' |
| | | |
| | | import LostPng from '@/assets/img/lost.png' |
| | | import './index.scss' |
| | | |
| | | const NormalButton = asyncComponent(() => import('@/tabviews/zshare/actionList/normalbutton')) |
| | |
| | | url = data[card.linkurl] |
| | | } |
| | | |
| | | if (url === 'sso') { |
| | | if (!url) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '链接地址不存在!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | if (/^sso$/ig.test(url)) { |
| | | if (!data.LinkUrl1) { |
| | | url = '' |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '链接地址不存在!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } else { |
| | | url = data.LinkUrl1 + 'index.html#/ssologin/' + window.btoa(window.encodeURIComponent(JSON.stringify({ |
| | | UserID: sessionStorage.getItem('UserID'), |
| | |
| | | if (card.joint === 'true') { |
| | | url = url + `${con}id=${Id}&appkey=${window.GLOB.appkey}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID') || ''}` |
| | | } |
| | | } |
| | | |
| | | if (!url) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '链接地址不存在!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | window.open(url) |
| | |
| | | } else if (card.eleType === 'picture') { |
| | | let _imagestyle = {} |
| | | let _style = card.style ? {...card.style} : {} |
| | | let url = '' |
| | | |
| | | if (card.url) { |
| | | _imagestyle = {backgroundImage: `url('${card.url}')`} |
| | | if (card.datatype === 'static') { |
| | | url = card.url |
| | | } else { |
| | | _imagestyle = {backgroundImage: `url('')`} |
| | | url = data[card.field] |
| | | } |
| | | |
| | | if (url) { |
| | | _imagestyle = {backgroundImage: `url('${url}')`} |
| | | } else { |
| | | _imagestyle = {backgroundImage: `url(${LostPng})`, backgroundSize: 'contain'} |
| | | } |
| | | |
| | | if (card.radius === 'true') { |
| | | _imagestyle.borderRadius = '50%' |
| | | if (_style.borderRadius) { |
| | | _imagestyle.borderRadius = _style.borderRadius |
| | | } |
| | | |
| | | if (card.lenWidRadio === '16:9') { |
| | |
| | | .ant-slider { |
| | | margin: 0px; |
| | | } |
| | | .ant-mk-picture { |
| | | background-size: cover; |
| | | background-position: center center; |
| | | background-repeat: no-repeat; |
| | | } |
| | | } |
| | | .card-cell-list::after { |
| | | content: ' '; |
| | |
| | | render() { |
| | | const { config, loading, data, pageIndex, total, card, activeKey, BID, BData, selectedData, selectKeys } = this.state |
| | | |
| | | let _total = config.setting.pageSize * pageIndex |
| | | let _total = 0 |
| | | let switchable = false |
| | | if (config.wrap.pagestyle === 'switch' && config.pageable && config.setting.laypage && total > config.setting.pageSize && data) { |
| | | _total = config.setting.pageSize * pageIndex |
| | | switchable = true |
| | | } |
| | | |
| | |
| | | {switchable ? <div className={'prev-page ' + (total <= _total ? 'disabled' : '')} onClick={this.nextPage}><div><div><img src={nextImg} alt=""/></div></div></div> : null} |
| | | {data && data.length === 0 ? <Empty description={false}/> : null} |
| | | </div> |
| | | {config.wrap.pagestyle !== 'switch' && config.setting.laypage && data ? <Pagination total={total} showTotal={t => `共 ${t} 条`} pageSize={config.setting.pageSize} onChange={this.changePageIndex} current={pageIndex}/> : null} |
| | | {config.wrap.pagestyle !== 'switch' && config.setting.laypage && data ? <Pagination size="small" total={total} showTotal={t => `共 ${t} 条`} pageSize={config.setting.pageSize} onChange={this.changePageIndex} current={pageIndex}/> : null} |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | static propTpyes = { |
| | | BID: PropTypes.any, // 父级Id |
| | | config: PropTypes.object, // 组件配置信息 |
| | | mainSearch: PropTypes.any, // 外层搜索条件 |
| | | menuType: PropTypes.any, // 菜单类型 |
| | | refreshdata: PropTypes.func // 刷新数据 |
| | | } |
| | |
| | | message: this.state.dict['form.required.input'] + item.label + '!' |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" />)} |
| | | })(<Input placeholder={item.labelShow === 'false' ? item.label : ''} autoComplete="off" />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | |
| | | import UtilsDM from '@/utils/utils-datamanage.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import MKEmitter from '@/utils/events.js' |
| | | |
| | | import MainSearch from '@/tabviews/zshare/topSearch' |
| | | import './index.scss' |
| | | |
| | | // 通用组件 |
| | | const MainSearch = asyncComponent(() => import('@/tabviews/zshare/topSearch')) |
| | | const MainAction = asyncComponent(() => import('@/tabviews/zshare/actionList')) |
| | | const MainTable = asyncComponent(() => import('@/tabviews/custom/components/share/normalTable')) |
| | | |
| | |
| | | |
| | | return ( |
| | | <div className="custom-normal-table"> |
| | | {searchlist && searchlist.length > 0 ? |
| | | <MainSearch |
| | | BID={BID} |
| | | dict={this.state.dict} |
| | | searchlist={searchlist} |
| | | menuType={this.props.menuType} |
| | | refreshdata={this.refreshbysearch} |
| | | /> : null |
| | | {searchlist && searchlist.length ? |
| | | <MainSearch BID={BID} searchlist={searchlist} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null |
| | | } |
| | | <MainAction |
| | | BID={BID} |
| | |
| | | } |
| | | .main-table-box { |
| | | position: relative; |
| | | min-height: 50px; |
| | | min-height: 150px; |
| | | .main-pickup { |
| | | position: absolute; |
| | | right: 5px; |
| | |
| | | if (!component.format || (component.subtype === 'propcard' && component.wrap.datatype === 'static')) return component // 没有动态数据 数据格式 array 或 object |
| | | if (component.setting.interType !== 'system') { // 不使用系统函数时 |
| | | component.setting.sync = 'false' |
| | | component.setting.laypage = component.setting.laypage === 'true' |
| | | return component |
| | | } |
| | | |
| | |
| | | |
| | | let param = { // 系统存储过程 |
| | | func: 'sPC_TableData_InUpDe', |
| | | exec_type: 'y', // 后台解码 |
| | | BID: '' |
| | | } |
| | | |
| | | if (btn.sql && btn.sqlType === 'insert') { // 系统函数添加时,生成uuid |
| | | param.ID = Utils.getguid() |
| | | param.LText = Utils.getSysDefaultSql(btn, setting, formdata, param, data, []) // 数据源 |
| | | |
| | | let { LText, LText1, LText2 } = Utils.sPCInUpDeFormatOptions(param.LText) |
| | | |
| | | param.LText2 = LText2 |
| | | param.LText1 = LText1 |
| | | param.LText = LText |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | |
| | | _primaryId = param.ID |
| | | } else if (btn.sql && btn.sqlType === 'insertOrUpdate') { // 系统函数添加或修改时 |
| | | param.ID = primaryId || Utils.getguid() |
| | | param.LText = Utils.getSysDefaultSql(btn, setting, formdata, param, data, []) // 数据源 |
| | | |
| | | let { LText, LText1, LText2 } = Utils.sPCInUpDeFormatOptions(param.LText) |
| | | |
| | | param.LText2 = LText2 |
| | | param.LText1 = LText1 |
| | | param.LText = LText |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | |
| | | _primaryId = param.ID |
| | | } else if (btn.sql) { |
| | | param.ID = primaryId |
| | | param.LText = Utils.getSysDefaultSql(btn, setting, formdata, param, data, []) // 数据源 |
| | | |
| | | let { LText, LText1, LText2 } = Utils.sPCInUpDeFormatOptions(param.LText) |
| | | |
| | | param.LText2 = LText2 |
| | | param.LText1 = LText1 |
| | | param.LText = LText |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | } |
| | | |
| | | if (this.props.menuType === 'HS' && param.timestamp) { // 云端验证 |
| | |
| | | import UtilsDM from '@/utils/utils-datamanage.js' |
| | | import UtilsUpdate from '@/utils/utils-update.js' |
| | | import { modifyTabview } from '@/store/action' |
| | | |
| | | import SubSearch from '@/tabviews/zshare/topSearch' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import asyncSpinComponent from '@/utils/asyncSpinComponent' |
| | | import NotFount from '@/components/404' |
| | |
| | | import './index.scss' |
| | | |
| | | const { TabPane } = Tabs |
| | | const SubSearch = asyncComponent(() => import('@/tabviews/zshare/topSearch')) |
| | | const SubAction = asyncComponent(() => import('@/tabviews/zshare/actionList')) |
| | | const SubTable = asyncSpinComponent(() => import('@/tabviews/zshare/normalTable')) |
| | | const CardComponent = asyncSpinComponent(() => import('@/tabviews/zshare/cardcomponent')) |
| | |
| | | return ( |
| | | <div className="subtable" id={'subtable' + this.props.MenuID}> |
| | | {loadingview && <Spin />} |
| | | {searchlist && searchlist.length > 0 ? |
| | | <SubSearch |
| | | BID={this.props.BID} |
| | | dict={this.state.dict} |
| | | searchlist={searchlist} |
| | | menuType={this.props.menuType} |
| | | refreshdata={this.refreshbysearch} |
| | | /> : null |
| | | {searchlist && searchlist.length ? |
| | | <SubSearch BID={this.props.BID} searchlist={searchlist} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null |
| | | } |
| | | {config ? <Row className="chart-view" gutter={16}> |
| | | {/* 视图组 */} |
| | |
| | | import Utils from '@/utils/utils.js' |
| | | import UtilsDM from '@/utils/utils-datamanage.js' |
| | | import UtilsUpdate from '@/utils/utils-update.js' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import asyncSpinComponent from '@/utils/asyncSpinComponent' |
| | | import SubSearch from '@/tabviews/zshare/topSearch' |
| | | import NotFount from '@/components/404' |
| | | import MKEmitter from '@/utils/events.js' |
| | | |
| | | import './index.scss' |
| | | |
| | | const { TabPane } = Tabs |
| | | const SubSearch = asyncComponent(() => import('@/tabviews/zshare/topSearch')) |
| | | const SubAction = asyncComponent(() => import('@/tabviews/zshare/actionList')) |
| | | const SubTable = asyncSpinComponent(() => import('@/tabviews/zshare/normalTable')) |
| | | const CardComponent = asyncSpinComponent(() => import('@/tabviews/zshare/cardcomponent')) |
| | |
| | | return ( |
| | | <div className="subtabtable" id={'subtabtable' + this.props.MenuID}> |
| | | {loadingview && <Spin />} |
| | | {searchlist && searchlist.length > 0 ? |
| | | <SubSearch |
| | | BID={this.props.BID} |
| | | dict={this.state.dict} |
| | | searchlist={searchlist} |
| | | menuType={this.props.menuType} |
| | | refreshdata={this.refreshbysearch} |
| | | /> : null |
| | | {searchlist && searchlist.length ? |
| | | <SubSearch BID={this.props.BID} searchlist={searchlist} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null |
| | | } |
| | | {config ? <Row className="chart-view" gutter={16}> |
| | | {/* 视图组 */} |
| | |
| | | } else if (btn.sql) { |
| | | param.ID = primaryId |
| | | param.LText = Utils.getSysDefaultSql(btn, setting, '', param, data[0], columns) // 数据源 |
| | | |
| | | let { LText, LText1, LText2 } = Utils.sPCInUpDeFormatOptions(param.LText) |
| | | |
| | | param.LText2 = LText2 |
| | | param.LText1 = LText1 |
| | | param.LText = LText |
| | | |
| | | |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | } |
| | | } else if (btn.OpenType === 'pop') { // 表单 |
| | | if (btn.innerFunc) { |
| | |
| | | } |
| | | param.ID = primaryId || Utils.getguid() |
| | | param.LText = Utils.getSysDefaultSql(btn, setting, formdata, param, data[0], columns) // 数据源 |
| | | |
| | | let { LText, LText1, LText2 } = Utils.sPCInUpDeFormatOptions(param.LText) |
| | | |
| | | param.LText2 = LText2 |
| | | param.LText1 = LText1 |
| | | param.LText = LText |
| | | |
| | | |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | } else if (btn.sql) { |
| | | param.ID = primaryId |
| | | param.LText = Utils.getSysDefaultSql(btn, setting, formdata, param, data[0], columns) // 数据源 |
| | | |
| | | let { LText, LText1, LText2 } = Utils.sPCInUpDeFormatOptions(param.LText) |
| | | |
| | | param.LText2 = LText2 |
| | | param.LText1 = LText1 |
| | | param.LText = LText |
| | | |
| | | |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | } |
| | | } |
| | | |
| | |
| | | param.ID = primaryId |
| | | param.LText = Utils.getSysDefaultSql(btn, setting, '', param, cell, columns) // 数据源 |
| | | |
| | | let { LText, LText1, LText2 } = Utils.sPCInUpDeFormatOptions(param.LText) |
| | | |
| | | param.LText2 = LText2 |
| | | param.LText1 = LText1 |
| | | param.LText = LText |
| | | |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | } |
| | | } else if (btn.OpenType === 'pop') { // 表单 |
| | | if (btn.innerFunc) { |
| | |
| | | param.ID = _formPrimaryId || Utils.getguid() |
| | | param.LText = Utils.getSysDefaultSql(btn, setting, formdata, param, cell, columns) // 数据源 |
| | | |
| | | let { LText, LText1, LText2 } = Utils.sPCInUpDeFormatOptions(param.LText) |
| | | |
| | | param.LText2 = LText2 |
| | | param.LText1 = LText1 |
| | | param.LText = LText |
| | | |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | } else if (btn.sql) { |
| | | if (index !== 0) { |
| | | formdata = formdata.map(_data => { |
| | |
| | | param.ID = primaryId |
| | | param.LText = Utils.getSysDefaultSql(btn, setting, formdata, param, cell, columns) // 数据源 |
| | | |
| | | let { LText, LText1, LText2 } = Utils.sPCInUpDeFormatOptions(param.LText) |
| | | |
| | | param.LText2 = LText2 |
| | | param.LText1 = LText1 |
| | | param.LText = LText |
| | | |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | } |
| | | } |
| | | |
| | |
| | | param.BID = this.props.BID |
| | | } |
| | | |
| | | let { LText, LText1, LText2 } = Utils.sPCInUpDeFormatOptions(script) |
| | | |
| | | param.LText2 = LText2 |
| | | param.LText1 = LText1 |
| | | param.LText = LText |
| | | |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | |
| | | if (this.props.menuType === 'HS') { // 函数 sPC_TableData_InUpDe 云端验证 |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | |
| | | param.LText = param.LText.replace(/@\$|\$@/ig, '') |
| | | } |
| | | |
| | | let { LText, LText1, LText2 } = Utils.sPCInUpDeFormatOptions(param.LText) |
| | | |
| | | param.LText2 = LText2 |
| | | param.LText1 = LText1 |
| | | param.LText = LText |
| | | |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | } |
| | | } else if (btn.OpenType === 'pop') { // 表单 |
| | | if (btn.innerFunc) { |
| | |
| | | param.LText = param.LText.replace(/@\$|\$@/ig, '') |
| | | } |
| | | |
| | | let { LText, LText1, LText2 } = Utils.sPCInUpDeFormatOptions(param.LText) |
| | | |
| | | param.LText2 = LText2 |
| | | param.LText1 = LText1 |
| | | param.LText = LText |
| | | |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | } else if (btn.sql) { |
| | | param.ID = primaryId |
| | | param.LText = Utils.getSysDefaultSql(btn, setting, formdata, param, data[0], columns, this.props.Tab) // 数据源 |
| | |
| | | param.LText = param.LText.replace(/@\$|\$@/ig, '') |
| | | } |
| | | |
| | | let { LText, LText1, LText2 } = Utils.sPCInUpDeFormatOptions(param.LText) |
| | | |
| | | param.LText2 = LText2 |
| | | param.LText1 = LText1 |
| | | param.LText = LText |
| | | |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | } |
| | | } |
| | | |
| | |
| | | param.LText = param.LText.replace(/@\$|\$@/ig, '') |
| | | } |
| | | |
| | | let { LText, LText1, LText2 } = Utils.sPCInUpDeFormatOptions(param.LText) |
| | | |
| | | param.LText2 = LText2 |
| | | param.LText1 = LText1 |
| | | param.LText = LText |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | } |
| | | } else if (btn.OpenType === 'pop') { // 表单 |
| | | if (index !== 0) { |
| | |
| | | param.LText = param.LText.replace(/@\$|\$@/ig, '') |
| | | } |
| | | |
| | | let { LText, LText1, LText2 } = Utils.sPCInUpDeFormatOptions(param.LText) |
| | | |
| | | param.LText2 = LText2 |
| | | param.LText1 = LText1 |
| | | param.LText = LText |
| | | |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | } else if (btn.sql) { |
| | | param.ID = primaryId |
| | | param.LText = Utils.getSysDefaultSql(btn, setting, formdata, param, cell, columns, this.props.Tab) // 数据源 |
| | |
| | | param.LText = param.LText.replace(/@\$|\$@/ig, '') |
| | | } |
| | | |
| | | let { LText, LText1, LText2 } = Utils.sPCInUpDeFormatOptions(param.LText) |
| | | |
| | | param.LText2 = LText2 |
| | | param.LText1 = LText1 |
| | | param.LText = LText |
| | | |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | } |
| | | } |
| | | |
| | |
| | | import options from '@/store/options.js' |
| | | import DateGroup from '@/tabviews/zshare/dategroup' |
| | | import Utils from '@/utils/utils.js' |
| | | import zhCN from '@/locales/zh-CN/main.js' |
| | | import enUS from '@/locales/en-US/main.js' |
| | | import './index.scss' |
| | | |
| | | const {MonthPicker, WeekPicker, RangePicker} = DatePicker |
| | |
| | | BID: PropTypes.any, // 父级Id,用于查询下拉选择项 |
| | | menuType: PropTypes.any, // 菜单权限,是否为HS |
| | | searchlist: PropTypes.array, // 搜索条件列表 |
| | | dict: PropTypes.object // 字典项 |
| | | } |
| | | |
| | | state = { |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | match: null, // 搜索条件匹配规则 |
| | | style: null, // 搜索条件类型 |
| | | label: null, // 提示文字 |
| | |
| | | if (fieldMap.has(item.field)) { |
| | | item.field = item.field + '@tail@' |
| | | } |
| | | fieldMap.set(item.field, true) |
| | | fieldMap.set(item.field, item) |
| | | |
| | | match[item.field] = item.match |
| | | label[item.field] = item.label |
| | |
| | | item.options.unshift({ |
| | | key: Utils.getuuid(), |
| | | Value: '', |
| | | Text: this.props.dict['main.all'] |
| | | Text: this.state.dict['main.all'] |
| | | }) |
| | | } |
| | | |
| | |
| | | let _groups = [] |
| | | _list = _list.map(item => { |
| | | if (item.type === 'link') { |
| | | let supItem = _list.filter(form => form.field === item.linkField)[0] |
| | | let supItem = fieldMap.get(item.linkField) |
| | | |
| | | if (!supItem) { |
| | | notification.warning({ |
| | |
| | | item.supInitVal = '' |
| | | } else { |
| | | item.supInitVal = supItem.initval |
| | | item.options = item.oriOptions.filter(option => option.ParentID === supItem.initval) |
| | | item.options = item.oriOptions.filter(option => option.ParentID === supItem.initval || option.Value === '') |
| | | } |
| | | } else if (item.type === 'group' && item.Hide !== 'true') { |
| | | _groups.push(fromJS(item).toJS()) |
| | |
| | | searchlist: _searchlist.map(item => { |
| | | if (item.type === 'link') { |
| | | if (item.supInitVal) { |
| | | item.options = item.oriOptions.filter(option => option.ParentID === item.supInitVal) |
| | | item.options = item.oriOptions.filter(option => option.ParentID === item.supInitVal || option.Value === '') |
| | | } else { |
| | | item.options = item.oriOptions |
| | | } |
| | |
| | | searchlist: _searchlist.map(item => { |
| | | if (item.type === 'link') { |
| | | if (item.supInitVal) { |
| | | item.options = item.oriOptions.filter(option => option.ParentID === item.supInitVal) |
| | | item.options = item.oriOptions.filter(option => option.ParentID === item.supInitVal || option.Value === '') |
| | | } else { |
| | | item.options = item.oriOptions |
| | | } |
| | |
| | | supfields.forEach(supfield => { |
| | | formlist = formlist.map(item => { |
| | | if (item.type === 'link' && item.linkField === supfield.field) { |
| | | item.options = item.oriOptions.filter(option => option.ParentID === supfield.initval) |
| | | item.options = item.oriOptions.filter(option => option.ParentID === supfield.initval || option.Value === '') |
| | | item.initval = item.options[0] ? item.options[0].Value : '' |
| | | |
| | | if (this.props.form.getFieldValue(item.field) !== undefined) { |
| | |
| | | let fieldsvalue = {} |
| | | formlist = formlist.map(item => { |
| | | if (item.type === 'link' && item.linkField === _field.field) { |
| | | item.options = item.oriOptions.filter(option => option.ParentID === value) |
| | | item.options = item.oriOptions.filter(option => option.ParentID === value || option.Value === '') |
| | | item.initval = item.options[0] ? item.options[0].Value : '' |
| | | |
| | | if (this.props.form.getFieldValue(item.field) !== undefined) { |
| | |
| | | |
| | | getFields() { |
| | | const { getFieldDecorator } = this.props.form |
| | | const { dict } = this.state |
| | | const fields = [] |
| | | |
| | | this.state.searchlist.forEach((item, index) => { |
| | |
| | | rules: [ |
| | | { |
| | | required: item.required === 'true', |
| | | message: this.props.dict['form.required.input'] + item.label + '!' |
| | | message: dict['form.required.input'] + item.label + '!' |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" />)} |
| | |
| | | rules: [ |
| | | { |
| | | required: item.required === 'true', |
| | | message: this.props.dict['form.required.select'] + item.label + '!' |
| | | message: dict['form.required.select'] + item.label + '!' |
| | | } |
| | | ] |
| | | })( |
| | |
| | | rules: [ |
| | | { |
| | | required: item.required === 'true', |
| | | message: this.props.dict['form.required.select'] + item.label + '!' |
| | | message: dict['form.required.select'] + item.label + '!' |
| | | } |
| | | ] |
| | | })( |
| | |
| | | rules: [ |
| | | { |
| | | required: item.required === 'true', |
| | | message: this.props.dict['form.required.select'] + item.label + '!' |
| | | message: dict['form.required.select'] + item.label + '!' |
| | | } |
| | | ] |
| | | })( |
| | |
| | | rules: [ |
| | | { |
| | | required: item.required === 'true', |
| | | message: this.props.dict['form.required.select'] + item.label + '!' |
| | | message: dict['form.required.select'] + item.label + '!' |
| | | } |
| | | ] |
| | | })( |
| | |
| | | rules: [ |
| | | { |
| | | required: item.required === 'true', |
| | | message: this.props.dict['form.required.select'] + item.label + '!' |
| | | message: dict['form.required.select'] + item.label + '!' |
| | | } |
| | | ] |
| | | })( |
| | |
| | | rules: [ |
| | | { |
| | | required: item.required === 'true', |
| | | message: this.props.dict['form.required.select'] + item.label + '!' |
| | | message: dict['form.required.select'] + item.label + '!' |
| | | } |
| | | ] |
| | | })( |
| | |
| | | <Col span={6} style={{ whiteSpace: 'nowrap' }} key="actions"> |
| | | <Form.Item label={' '} colon={false} style={{ minHeight: '40px' }}> |
| | | <Button type="primary" htmlType="submit"> |
| | | {this.props.dict['main.search']} |
| | | {dict['main.search']} |
| | | </Button> |
| | | <Button style={{ marginLeft: 8 }} onClick={this.handleReset}> |
| | | {this.props.dict['main.reset']} |
| | | {dict['main.reset']} |
| | | </Button> |
| | | </Form.Item> |
| | | </Col> |
| | |
| | | let param = { |
| | | func: 'sPC_Get_TableData', |
| | | obj_name: 'data', |
| | | exec_type: 'y', |
| | | arr_field: arrFields, |
| | | default_sql: setting.execute ? 'true' : 'false' |
| | | } |
| | |
| | | _customScript = `${_customScript} |
| | | aaa: |
| | | if @ErrorCode!='' |
| | | insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,@UserID@ |
| | | insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,@UserID@ |
| | | ` |
| | | } |
| | | } |
| | |
| | | _customScript && console.info(`${LText ? '' : '/*不执行默认sql*/\n'}${_customScript}`) |
| | | LText && console.info(LText) |
| | | } |
| | | |
| | | |
| | | param.custom_script = Utils.formatOptions(_customScript) |
| | | param.LText = Utils.formatOptions(LText) |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.DateCount = Utils.formatOptions(DateCount) |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | | if (menuType === 'HS') { // 云端数据验证 |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | |
| | | let param = { |
| | | func: 'sPC_Get_TableData', |
| | | obj_name: 'data', |
| | | exec_type: 'y', |
| | | arr_field: statFields.map(col => col.field).join(','), |
| | | default_sql: setting.execute ? 'true' : 'false' |
| | | } |
| | |
| | | |
| | | param.custom_script = Utils.formatOptions(_customScript) |
| | | param.LText = Utils.formatOptions(LText) |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.DateCount = '' |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | | if (menuType === 'HS') { // 云端数据验证 |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | | } |
| | |
| | | {key: 'sys.', reg: /(^|\s)sys\./ig}, |
| | | {key: 'kill', reg: /(^|\s)kill\s/ig} |
| | | ] |
| | | |
| | | |
| | | if (type === 'customscript') { |
| | | chars = chars.filter(char => !['insert', 'delete', 'update', 'set', 'if', 'exec'].includes(char.key)) |
| | | } |
| | | |
| | | let error = '' |
| | | |
| | | sql = sql.replace(/sys\.fn_sqlvarbasetostr\(HashBytes\('MD5'/ig, '') // 跳过MD5加密 |
| | | |
| | | chars.forEach(char => { |
| | | if (!error && char.reg.test(sql)) { |
| | | error = char.key |