| | |
| | | import axios from 'axios' |
| | | import qs from 'qs' |
| | | import {notification } from 'antd' |
| | | import { notification } from 'antd' |
| | | import md5 from 'md5' |
| | | import Utils from '@/utils/utils.js' |
| | | import options from '@/store/options.js' |
| | |
| | | getCloudConfig (param) { |
| | | param.lang = localStorage.getItem('lang') || '' |
| | | param.appkey = window.GLOB.appkey || '' |
| | | param.SessionUid = localStorage.getItem('SessionUid') || '' |
| | | |
| | | if (sessionStorage.getItem('CloudUserID') && options.cloudServiceApi) { // 存在云端登录信息,且存在云端地址 |
| | | param.rduri = options.cloudServiceApi |
| | | param.userid = sessionStorage.getItem('CloudUserID') |
| | | param.SessionUid = sessionStorage.getItem('CloudSessionUid') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } else if (window.GLOB.mainSystemApi) { |
| | | param.rduri = window.GLOB.mainSystemApi |
| | | param.userid = sessionStorage.getItem('UserID') |
| | | param.SessionUid = sessionStorage.getItem('SessionUid') || '' |
| | | param.LoginUID = sessionStorage.getItem('LoginUID') || '' |
| | | } else { |
| | | param.userid = sessionStorage.getItem('UserID') |
| | | param.SessionUid = sessionStorage.getItem('SessionUid') || '' |
| | | param.LoginUID = sessionStorage.getItem('LoginUID') || '' |
| | | } |
| | | |
| | |
| | | getSystemConfig (param) { |
| | | param.userid = sessionStorage.getItem('UserID') |
| | | param.lang = localStorage.getItem('lang') || '' |
| | | param.SessionUid = sessionStorage.getItem('SessionUid') || '' |
| | | param.SessionUid = localStorage.getItem('SessionUid') || '' |
| | | param.LoginUID = sessionStorage.getItem('LoginUID') || '' |
| | | param.appkey = window.GLOB.appkey || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true' && options.cloudServiceApi) { // 编辑状态,且存在云端地址 |
| | | param.rduri = options.cloudServiceApi |
| | | param.userid = sessionStorage.getItem('CloudUserID') |
| | | param.SessionUid = sessionStorage.getItem('CloudSessionUid') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } else if (window.GLOB.mainSystemApi) { |
| | | param.rduri = window.GLOB.mainSystemApi |
| | |
| | | getLocalConfig (param) { |
| | | param.userid = sessionStorage.getItem('UserID') |
| | | param.lang = localStorage.getItem('lang') || '' |
| | | param.SessionUid = sessionStorage.getItem('SessionUid') || '' |
| | | param.SessionUid = localStorage.getItem('SessionUid') || '' |
| | | param.LoginUID = sessionStorage.getItem('LoginUID') || '' |
| | | param.appkey = window.GLOB.appkey || '' |
| | | |
| | |
| | | getSystemCacheConfig (param, SSO = true) { |
| | | param.userid = sessionStorage.getItem('UserID') || '' |
| | | param.lang = localStorage.getItem('lang') || '' |
| | | param.SessionUid = sessionStorage.getItem('SessionUid') || '' |
| | | param.SessionUid = localStorage.getItem('SessionUid') || '' |
| | | param.LoginUID = sessionStorage.getItem('LoginUID') || '' |
| | | param.appkey = window.GLOB.appkey || '' |
| | | |
| | |
| | | if (options.cloudServiceApi) { // 存在云端地址时,使用云端系统参数 |
| | | param.rduri = options.cloudServiceApi |
| | | param.userid = sessionStorage.getItem('CloudUserID') || '' |
| | | param.SessionUid = sessionStorage.getItem('CloudSessionUid') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } |
| | | } else if (window.GLOB.mainSystemApi && SSO) { |
| | |
| | | genericInterface (param) { |
| | | param.userid = sessionStorage.getItem('UserID') |
| | | param.lang = localStorage.getItem('lang') || '' |
| | | param.SessionUid = sessionStorage.getItem('SessionUid') || '' |
| | | param.SessionUid = localStorage.getItem('SessionUid') || '' |
| | | param.LoginUID = sessionStorage.getItem('LoginUID') || '' |
| | | param.appkey = window.GLOB.appkey || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { // HS下菜单 |
| | | param.userid = sessionStorage.getItem('CloudUserID') |
| | | param.SessionUid = sessionStorage.getItem('CloudSessionUid') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } |
| | | |
| | |
| | | getExcelOut (param, name) { |
| | | param.userid = sessionStorage.getItem('UserID') |
| | | param.lang = localStorage.getItem('lang') || '' |
| | | param.SessionUid = sessionStorage.getItem('SessionUid') || '' |
| | | param.SessionUid = localStorage.getItem('SessionUid') || '' |
| | | param.LoginUID = sessionStorage.getItem('LoginUID') || '' |
| | | param.appkey = window.GLOB.appkey || '' |
| | | |
| | |
| | | appkey: window.GLOB.appkey || '', |
| | | Base64Img: base64 |
| | | } |
| | | param.SessionUid = localStorage.getItem('SessionUid') || '' |
| | | |
| | | if (service === 'sso' && window.GLOB.mainSystemApi) { |
| | | param.rduri = window.GLOB.mainSystemApi |
| | | param.userid = sessionStorage.getItem('UserID') |
| | | param.SessionUid = sessionStorage.getItem('SessionUid') || '' |
| | | param.LoginUID = sessionStorage.getItem('LoginUID') || '' |
| | | } else if (service === 'cloud' && options.cloudServiceApi) { |
| | | param.rduri = options.cloudServiceApi |
| | | param.userid = sessionStorage.getItem('CloudUserID') |
| | | param.SessionUid = sessionStorage.getItem('CloudSessionUid') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } else { |
| | | param.userid = sessionStorage.getItem('UserID') |
| | | param.SessionUid = sessionStorage.getItem('SessionUid') || '' |
| | | param.LoginUID = sessionStorage.getItem('LoginUID') || '' |
| | | } |
| | | |
| | |
| | | commonInterface (param) { |
| | | param.userid = sessionStorage.getItem('UserID') |
| | | param.lang = localStorage.getItem('lang') || '' |
| | | param.SessionUid = sessionStorage.getItem('SessionUid') || '' |
| | | param.SessionUid = localStorage.getItem('SessionUid') || '' |
| | | param.LoginUID = sessionStorage.getItem('LoginUID') || '' |
| | | param.BID = param.BID || '' |
| | | param.debug = param.debug || '' |
| | |
| | | submitInterface (param) { |
| | | param.userid = sessionStorage.getItem('UserID') |
| | | param.lang = localStorage.getItem('lang') || '' |
| | | param.SessionUid = sessionStorage.getItem('SessionUid') || '' |
| | | param.SessionUid = localStorage.getItem('SessionUid') || '' |
| | | param.LoginUID = sessionStorage.getItem('LoginUID') || '' |
| | | |
| | | return axios({ |
| | |
| | | Api.getusermsg(param.username, param.password, true).then(res => { |
| | | if (res.status) { |
| | | sessionStorage.setItem('CloudUserID', res.UserID) |
| | | sessionStorage.setItem('CloudSessionUid', Utils.getuuid()) |
| | | sessionStorage.setItem('CloudLoginUID', res.LoginUID) |
| | | sessionStorage.setItem('CloudUserName', res.UserName) |
| | | sessionStorage.setItem('CloudFullName', res.FullName) |
| | |
| | | } |
| | | |
| | | changeSystem = (system) => { |
| | | let _param = window.btoa('ud=' + sessionStorage.getItem('UserID') + '&sd=' + sessionStorage.getItem('SessionUid') + '&ld=' + sessionStorage.getItem('LoginUID') + '&un=' + sessionStorage.getItem('User_Name')) |
| | | let _param = window.btoa('ud=' + sessionStorage.getItem('UserID') + '&ld=' + sessionStorage.getItem('LoginUID') + '&un=' + sessionStorage.getItem('User_Name')) |
| | | window.location.href = system.LinkUrl1 + '#/ssologin/' + _param |
| | | } |
| | | |
| | |
| | | |
| | | let SubMenuId = sessionStorage.getItem('SubMenu') // 是否为打开新页面 |
| | | let ThirdMenuId = sessionStorage.getItem('ThirdMenu') // 是否为打开新页面 |
| | | let msg = sessionStorage.getItem('UserID') + '&sd=' + sessionStorage.getItem('SessionUid') + '&ld=' + sessionStorage.getItem('LoginUID') + '&un=' + sessionStorage.getItem('User_Name') |
| | | let msg = sessionStorage.getItem('UserID') + '&ld=' + sessionStorage.getItem('LoginUID') + '&un=' + sessionStorage.getItem('User_Name') |
| | | let submenuId = '' // 展开二级菜单ID |
| | | let tabId = '' // 打开的tab页id |
| | | |
| | |
| | | options.cloudServiceApi = options.cdomain + '/webapi/dostars' |
| | | } |
| | | |
| | | if (!localStorage.getItem('SessionUid')) { |
| | | localStorage.setItem('SessionUid', (() => { |
| | | let uuid = [] |
| | | let _options = '0123456789abcdefghigklmnopqrstuv' |
| | | for (let i = 0; i < 32; i++) { |
| | | uuid.push(_options.substr(Math.floor(Math.random() * 0x20), 1)) |
| | | } |
| | | return uuid.join('') |
| | | })()) |
| | | } |
| | | |
| | | const render = Component => { |
| | | ReactDOM.render( |
| | | <Provider store={store}> |
| | |
| | | type: 'login', |
| | | subtype: 'mob-login-1', |
| | | box: { uuid: Utils.getuuid(), eleType: 'box', style: {color: '#ffffff', backgroundImage: 'linear-gradient(#378DBE, #46C29E, #48A9D6)'}}, |
| | | logo: { uuid: Utils.getuuid(), eleType: 'img', content: mklogo, style: {} }, |
| | | logo: { uuid: Utils.getuuid(), eleType: 'img', content: mklogo, style: {marginTop: '17vh', marginBottom: '15px'} }, |
| | | title: { uuid: Utils.getuuid(), eleType: 'text', content: '明科商业智能开放平台', style: {fontSize: '20px', fontWeight: 'bold', color: '#ffffff', textAlign: 'center', marginTop: '15px', marginBottom: '30px'}}, |
| | | login: { uuid: Utils.getuuid(), eleType: 'button', content: '登录', style: {fontSize: '18px', color: '#ffffff', textAlign: 'center', lineHeight: 2.4, borderRadius: '25px'}}, |
| | | login: { uuid: Utils.getuuid(), eleType: 'button', content: '登录', style: {fontSize: '18px', color: '#ffffff', textAlign: 'center', lineHeight: 2.4, borderRadius: '25px', marginBottom: '15vh'}}, |
| | | copyright: { uuid: Utils.getuuid(), eleType: 'textarea', content: 'Copyright©2017 所有相关版权归 北京明科普华信息技术有限公司', style: {fontSize: '12px', color: '#ffffff', textAlign: 'center'} } |
| | | } |
| | | } |
| | |
| | | ...fromJS(card.login.style).toJS(), |
| | | componentId: card.uuid, |
| | | uuid: card.login.uuid, |
| | | items: ['font', 'background', 'border'] |
| | | items: ['font', 'background', 'border', 'margin'] |
| | | } |
| | | this.props.triggerEdit(element) |
| | | } |
| | |
| | | let percent = parseInt(titleStyle.marginBottom) |
| | | titleStyle.marginBottom = `calc(${(percent / 100) * 615}px)` |
| | | } |
| | | |
| | | let loginStyle = fromJS(card.login.style).toJS() |
| | | if (loginStyle.marginTop && /vh$/ig.test(loginStyle.marginTop)) { |
| | | let percent = parseInt(loginStyle.marginTop) |
| | | loginStyle.marginTop = `calc(${(percent / 100) * 615}px)` |
| | | } |
| | | if (loginStyle.marginBottom && /vh$/ig.test(loginStyle.marginBottom)) { |
| | | let percent = parseInt(loginStyle.marginBottom) |
| | | loginStyle.marginBottom = `calc(${(percent / 100) * 615}px)` |
| | | } |
| | | |
| | | return ( |
| | | <div className="mob-login-1" onClick={this.editBox} style={card.box.style}> |
| | | <div className="mob-login-body"> |
| | | {card.logo ? <div className={'logo ' + (editId === card.logo.uuid ? 'editing' : '')} style={logoStyle} onClick={this.editLogo}> |
| | | <ContentUpdate element={card.logo} updateContent={(ele) => this.updateContent({...card, logo: ele})}/> |
| | | <img src={card.logo.content} alt=""/> |
| | | </div> : null} |
| | | {card.title ? <div className={'plat-name ' + (editId === card.title.uuid ? 'editing' : '')} style={titleStyle} onClick={this.editTitle}> |
| | | <ContentUpdate element={card.title} updateContent={(ele) => this.updateContent({...card, title: ele})}/> |
| | | {card.title.content} |
| | | </div> : null} |
| | | <InputItem |
| | | placeholder="UserName" |
| | | prefixListCls="mk-login-item am-list" |
| | | {...getFieldProps('userName', { |
| | | initialValue: 'admin', |
| | | })} |
| | | disabled={true} |
| | | > |
| | | <Icon type="check-circle-o" /> |
| | | </InputItem> |
| | | <InputItem |
| | | placeholder="Password" |
| | | prefixListCls="mk-login-item am-list" |
| | | {...getFieldProps('password', { |
| | | initialValue: '123456', |
| | | })} |
| | | type={'password'} |
| | | disabled={true} |
| | | > |
| | | <Icon type="check-circle" /> |
| | | </InputItem> |
| | | <div className="other-setting"> |
| | | <CheckboxItem checked={rember} onChange={this.onChange}> |
| | | <span onClick={this.onChange}>记住密码</span> |
| | | </CheckboxItem> |
| | | {/* <Picker data={langs} value={lang} cols={1} onChange={this.onChangeLang} className="forss"> |
| | | <List.Item>{lang}</List.Item> |
| | | </Picker> */} |
| | | <List.Item className="lang">中文简体</List.Item> |
| | | <div className="clear-both"></div> |
| | | </div> |
| | | <Button |
| | | type="primary" |
| | | className={'login ' + (editId === card.login.uuid ? 'editing' : '')} |
| | | onDoubleClick={() => this.props.doubleClickCard(card.login)} |
| | | style={card.login.style} |
| | | onClick={this.editLogin} |
| | | > |
| | | <ContentUpdate element={card.login} deletable={false} updateContent={(ele) => this.updateContent({...card, login: ele})}/> |
| | | {card.login.content} |
| | | </Button> |
| | | {card.logo ? <div className={'logo ' + (editId === card.logo.uuid ? 'editing' : '')} style={logoStyle} onClick={this.editLogo}> |
| | | <ContentUpdate element={card.logo} updateContent={(ele) => this.updateContent({...card, logo: ele})}/> |
| | | <img src={card.logo.content} alt=""/> |
| | | </div> : null} |
| | | {card.title ? <div className={'plat-name ' + (editId === card.title.uuid ? 'editing' : '')} style={titleStyle} onClick={this.editTitle}> |
| | | <ContentUpdate element={card.title} updateContent={(ele) => this.updateContent({...card, title: ele})}/> |
| | | {card.title.content} |
| | | </div> : null} |
| | | <InputItem |
| | | placeholder="UserName" |
| | | prefixListCls="mk-login-item am-list" |
| | | {...getFieldProps('userName', { |
| | | initialValue: 'admin', |
| | | })} |
| | | disabled={true} |
| | | > |
| | | <Icon type="check-circle-o" /> |
| | | </InputItem> |
| | | <InputItem |
| | | placeholder="Password" |
| | | prefixListCls="mk-login-item am-list" |
| | | {...getFieldProps('password', { |
| | | initialValue: '123456', |
| | | })} |
| | | type={'password'} |
| | | disabled={true} |
| | | > |
| | | <Icon type="check-circle" /> |
| | | </InputItem> |
| | | <div className="other-setting"> |
| | | <CheckboxItem checked={rember} onChange={this.onChange}> |
| | | <span onClick={this.onChange}>记住密码</span> |
| | | </CheckboxItem> |
| | | {/* <Picker data={langs} value={lang} cols={1} onChange={this.onChangeLang} className="forss"> |
| | | <List.Item>{lang}</List.Item> |
| | | </Picker> */} |
| | | <List.Item className="lang">中文简体</List.Item> |
| | | <div className="clear-both"></div> |
| | | </div> |
| | | <Button |
| | | type="primary" |
| | | className={'login ' + (editId === card.login.uuid ? 'editing' : '')} |
| | | onDoubleClick={() => this.props.doubleClickCard(card.login)} |
| | | style={loginStyle} |
| | | onClick={this.editLogin} |
| | | > |
| | | <ContentUpdate element={card.login} deletable={false} updateContent={(ele) => this.updateContent({...card, login: ele})}/> |
| | | {card.login.content} |
| | | </Button> |
| | | {card.copyright ? <div className={'company-msg ' + (editId === card.copyright.uuid ? 'editing' : '')} style={card.copyright.style} onClick={this.editMsg}> |
| | | <ContentUpdate element={card.copyright} updateContent={(ele) => this.updateContent({...card, copyright: ele})}/> |
| | | {card.copyright.content} |
| | |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | background-position: center center; |
| | | |
| | | .mob-login-body { |
| | | min-height: calc((80 / 100) * 615px); |
| | | border-top: 1px solid transparent; |
| | | margin-bottom: 20px; |
| | | } |
| | | border-top: 1px solid transparent; |
| | | |
| | | .logo { |
| | | position: relative; |
| | |
| | | max-width: 280px; |
| | | min-height: 10px; |
| | | margin: 0 auto; |
| | | margin-bottom: 15px; |
| | | text-align: center; |
| | | line-height: 1.5; |
| | | border: 1px dotted transparent; |
| | | margin-top: calc((17 / 100) * 615px); |
| | | img { |
| | | max-width: 100%; |
| | | } |
| | |
| | | {path: '/ssologin/:param', name: 'ssologin', auth: true}, |
| | | {path: '/main', name: 'main', component: Main, auth: true}, |
| | | {path: '/mobmanage', name: 'mobmanage', component: MobManage, auth: true}, |
| | | {path: '/mobdesign/:appId/:appType', name: 'mobdesign', component: MobDesign, auth: true}, |
| | | {path: '/mobdesign/:appId/:appType/:appCode/:appName', name: 'mobdesign', component: MobDesign, auth: true}, |
| | | {path: '/main/:param', name: 'pmain', component: Main, auth: true} |
| | | ] |
| | | |
| | |
| | | p[_cell[0]] = _cell[1] |
| | | }) |
| | | sessionStorage.setItem('UserID', p.ud) |
| | | sessionStorage.setItem('SessionUid', p.sd) |
| | | sessionStorage.setItem('LoginUID', p.ld) |
| | | sessionStorage.setItem('User_Name', p.un) |
| | | sessionStorage.setItem('MainMenu', p.mm) |
| | |
| | | p[_cell[0]] = _cell[1] |
| | | }) |
| | | sessionStorage.setItem('UserID', p.ud) |
| | | sessionStorage.setItem('SessionUid', p.sd) |
| | | sessionStorage.setItem('LoginUID', p.ld) |
| | | sessionStorage.setItem('User_Name', p.un) |
| | | |
| | |
| | | import { Button, notification, Modal } from 'antd' |
| | | |
| | | import Api from '@/api' |
| | | 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' |
| | |
| | | if (res.status) { |
| | | sessionStorage.setItem('avatar', res.icon || '') |
| | | sessionStorage.setItem('UserID', res.UserID) |
| | | sessionStorage.setItem('SessionUid', Utils.getuuid()) |
| | | sessionStorage.setItem('LoginUID', res.LoginUID) |
| | | sessionStorage.setItem('User_Name', res.UserName) |
| | | sessionStorage.setItem('Full_Name', res.FullName) |
| | |
| | | }) |
| | | } |
| | | |
| | | let result = Utils.getExcelInSql(btn, data, this.state.dict) |
| | | let result = Utils.getExcelInSql(btn, data, this.state.dict, (this.props.BID || '')) |
| | | |
| | | if (result.errors) { |
| | | notification.warning({ |
| | |
| | | } |
| | | |
| | | if (btn.pageTemplate === 'print') { |
| | | let cloudmsg = '&cuid=' + (sessionStorage.getItem('CloudUserID') || '') + '&csid=' + (sessionStorage.getItem('CloudSessionUid') || '') + '&clid=' + (sessionStorage.getItem('CloudLoginUID') || '') + '&cun=' + (sessionStorage.getItem('CloudUserName') || '') |
| | | let msg = '&uid=' + sessionStorage.getItem('UserID') + '&sid=' + sessionStorage.getItem('SessionUid') + '&lid=' + sessionStorage.getItem('LoginUID') + '&un=' + sessionStorage.getItem('User_Name') |
| | | let cloudmsg = '&cuid=' + (sessionStorage.getItem('CloudUserID') || '') + '&clid=' + (sessionStorage.getItem('CloudLoginUID') || '') + '&cun=' + (sessionStorage.getItem('CloudUserName') || '') |
| | | let msg = '&uid=' + sessionStorage.getItem('UserID') + '&lid=' + sessionStorage.getItem('LoginUID') + '&un=' + sessionStorage.getItem('User_Name') |
| | | let src = '#/print/' + window.btoa('ID=' + Id + msg + cloudmsg) |
| | | window.open(src) |
| | | } else if (btn.pageTemplate === 'pay') { |
| | | let _p = `ID=${Id}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID')}&logo=${window.GLOB.doclogo}&name=${sessionStorage.getItem('Full_Name')}&suid=${sessionStorage.getItem('SessionUid')}&icp=${window.GLOB.ICP}©Right=${window.GLOB.copyRight}` |
| | | let _p = `ID=${Id}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID')}&logo=${window.GLOB.doclogo}&name=${sessionStorage.getItem('Full_Name')}&icp=${window.GLOB.ICP}©Right=${window.GLOB.copyRight}` |
| | | let url = '#/pay/' + window.btoa(window.encodeURIComponent(_p)) |
| | | |
| | | this.props.updateStatus('start') |
| | |
| | | </Col> |
| | | {usefulfields ? <Col span={24} className="sqlfield"> |
| | | <Form.Item label={'可用字段'}> |
| | | {usefulfields} |
| | | {usefulfields}, jskey |
| | | </Form.Item> |
| | | </Col> : null} |
| | | <Col span={8} style={{whiteSpace: 'nowrap'}}> |
| | |
| | | * @return {String} btn 按钮 |
| | | * @return {String} data excel数据 |
| | | */ |
| | | static getExcelInSql (item, data, dict) { |
| | | static getExcelInSql (item, data, dict, BID) { |
| | | let btn = item.verify |
| | | let keys = ['delete', 'drop', 'insert', 'truncate', 'update'] |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | |
| | | _lineIndex = _lineIndex.substring(_lineIndex.length - 6) |
| | | |
| | | vals.push(`'${upId + _lineIndex}'`) |
| | | vals.push(`'${BID}'`) |
| | | |
| | | if (lindex < 40) { |
| | | convals.push(`'${upId + _lineIndex}' as jskey`) |
| | | convals.push(`'${BID}' as BID`) |
| | | conLtext.push(`Select ${convals.join(',')}`) |
| | | } |
| | | |
| | |
| | | |
| | | _sql = ` |
| | | /* 系统生成 */ |
| | | declare @${item.sheet} table (${declarefields.join(',')},jskey nvarchar(50) ) |
| | | declare @${item.sheet} table (${declarefields.join(',')},jskey nvarchar(50),BID nvarchar(50) ) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@tbid Nvarchar(512) |
| | | |
| | | Select @ErrorCode='', @retmsg='', @UserName='${userName}', @FullName='${fullName}' |
| | | ${_initCustomScript} |
| | | ` |
| | | _sqlInsert = `Insert into @${item.sheet} (${fields},jskey)` |
| | | _sqlInsert = `Insert into @${item.sheet} (${fields},jskey,BID)` |
| | | _sqlBottom = ` |
| | | /* 默认sql */ |
| | | delete tmp_excel_in where upid=@upid@ |
| | |
| | | let _formFieldValue = {} |
| | | let _actionType = null |
| | | let appkey = window.GLOB.appkey || '' |
| | | let sessionUid = sessionStorage.getItem('SessionUid') || '' |
| | | let sessionUid = localStorage.getItem('SessionUid') || '' |
| | | |
| | | if (verify.default !== 'false') { // 判断是否使用默认sql |
| | | _actionType = btn.sqlType |
| | |
| | | let res = await Api.getusermsg(param.username, param.password) |
| | | if (res.status) { |
| | | sessionStorage.setItem('UserID', res.UserID) |
| | | sessionStorage.setItem('SessionUid', Utils.getuuid()) |
| | | sessionStorage.setItem('LoginUID', res.LoginUID) |
| | | sessionStorage.setItem('User_Name', res.UserName) |
| | | sessionStorage.setItem('Full_Name', res.FullName) |
| | | sessionStorage.setItem('avatar', res.icon || '') |
| | | |
| | | |
| | | localStorage.setItem('lang', param.lang || 'zh-CN') |
| | | |
| | | let _url = window.location.href.split('#')[0] |
| | |
| | | import React, { Component } from 'react' |
| | | import { connect } from 'react-redux' |
| | | import { DndProvider } from 'react-dnd' |
| | | import { fromJS } from 'immutable' |
| | | import { is, fromJS } from 'immutable' |
| | | import moment from 'moment' |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | | import { Icon, Tabs, notification, Modal } from 'antd' |
| | | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | | import zhCN from '@/locales/zh-CN/mob.js' |
| | | import enUS from '@/locales/en-US/mob.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | |
| | | dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | appId: this.props.match.params.appId, |
| | | appType: this.props.match.params.appType, |
| | | appConfig: null, |
| | | appCode: this.props.match.params.appCode, |
| | | appName: this.props.match.params.appName, |
| | | oriConfig: null, |
| | | parentId: '', |
| | | openEdition: '', |
| | | saveIng: false, |
| | | config: null, |
| | | pageIndex: 0, |
| | |
| | | } |
| | | |
| | | jumpToManage = () => { |
| | | this.props.history.replace('/mobmanage') |
| | | // this.props.history.push('/mobdesign/sdafadjfidsf/dsfsdf') |
| | | const { oriConfig, config } = this.state |
| | | const _this = this |
| | | |
| | | if (!is(fromJS(oriConfig), fromJS(config))) { |
| | | confirm({ |
| | | title: '配置已修改,放弃保存吗?', |
| | | content: '', |
| | | okText: _this.state.dict['mob.confirm'], |
| | | cancelText: _this.state.dict['mob.cancel'], |
| | | onOk() { |
| | | _this.props.history.replace('/mobmanage') |
| | | }, |
| | | onCancel() {} |
| | | }) |
| | | } else { |
| | | _this.props.history.replace('/mobmanage') |
| | | } |
| | | } |
| | | |
| | | triggerSave = () => { |
| | | // const { config } = this.state |
| | | const { config, openEdition, parentId } = this.state |
| | | |
| | | this.setState({ |
| | | saveIng: true |
| | | }) |
| | | |
| | | let param = { |
| | | func: 'sPC_TrdMenu_AddUpt', |
| | | ParentID: config.entrance ? '' : parentId, |
| | | MenuID: config.uuid, |
| | | MenuNo: config.MenuNo, |
| | | EasyCode: '', |
| | | Template: '', |
| | | MenuName: '', |
| | | PageParam: '', |
| | | LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))), |
| | | // LText: _vals.func.map(item => `select '${menu.MenuID}' as MenuID,'${item.func}' as ProcName,'${item.label}' as MenuName`), |
| | | // LTexttb: _tables.map(item => `select '${menu.MenuID}' as MenuID,'${item}' as tbName`), |
| | | TypeCharOne: 'mob' |
| | | } |
| | | |
| | | let _LText = '' |
| | | // _LText = _LText.join(' union all ') |
| | | let _LTexttb = '' |
| | | // _LTexttb = _LTexttb.join(' union all ') |
| | | |
| | | param.LText = Utils.formatOptions(_LText) |
| | | param.LTexttb = Utils.formatOptions(_LTexttb) |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | |
| | | if (openEdition) { // 版本管理 |
| | | param.open_edition = openEdition |
| | | } |
| | | |
| | | Api.getSystemConfig(param).then(response => { |
| | | if (response.status) { |
| | | this.setState({ |
| | | oriConfig: fromJS(config).toJS(), |
| | | openEdition: response.open_edition || '', |
| | | saveIng: false |
| | | }) |
| | | } else { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: response.message, |
| | | duration: 5 |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | } |
| | | |
| | | getAppParam = (id) => { |
| | | Api.getSystemConfig({ |
| | | func: 'sPC_Get_LongParam', |
| | | MenuID: id |
| | | MenuID: id, |
| | | TypeCharOne: 'mob' |
| | | }).then(result => { |
| | | if (result.status) { |
| | | let appConfig = null |
| | | let config = null |
| | | |
| | | if (result.LongParam) { |
| | | try { |
| | | appConfig = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) |
| | | config = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | appConfig = null |
| | | config = null |
| | | } |
| | | } |
| | | |
| | | if (!appConfig) { |
| | | appConfig = { |
| | | if (!config) { |
| | | config = { |
| | | version: 1.0, |
| | | entrance: true, |
| | | label: '', |
| | | uuid: this.props.match.params.appId, |
| | | pageIndex: 0, |
| | | MenuNo: this.props.match.params.appCode, |
| | | sourcelist: [], |
| | | components: [] |
| | | } |
| | | } |
| | | |
| | | this.setState({ |
| | | appConfig: appConfig, |
| | | config: fromJS(appConfig).toJS() |
| | | oriConfig: config, |
| | | config: fromJS(config).toJS(), |
| | | openEdition: result.open_edition || '', |
| | | }) |
| | | } else { |
| | | notification.warning({ |
| | |
| | | } |
| | | |
| | | jumpMenu = (card) => { |
| | | this.props.history.replace('/mobdesign/' + card.uuid + '/' + card.type) |
| | | let _type = 'mob' |
| | | if (card.type === 'pc') { |
| | | _type = 'pc' |
| | | } |
| | | this.props.history.replace(`/mobdesign/${card.uuid}/${_type}/${card.keiNo}/${card.name}`) |
| | | } |
| | | |
| | | render () { |
| | |
| | | if (!sessionStorage.getItem('UserID') && _params.userid) { |
| | | sessionStorage.setItem('UserID', _params.userid) |
| | | } |
| | | if (!sessionStorage.getItem('SessionUid') && _params.suid) { |
| | | sessionStorage.setItem('SessionUid', _params.suid) |
| | | } |
| | | |
| | | this.setState({ |
| | | orderId: _params.ID, |