| | |
| | | /** |
| | | * @description 手机号验证码登录 |
| | | */ |
| | | getphoneusermsg (phoneNo, checkcode, isCloud = false) { |
| | | getphoneusermsg (phoneNo, checkcode, isCloud = false, ipAddress, city) { |
| | | let param = { |
| | | // func: 'webapi_login', |
| | | mob: phoneNo, |
| | |
| | | Password: '', |
| | | check_code: checkcode, |
| | | way_no: 'sms_vcode', |
| | | systemType: options.sysType |
| | | systemType: options.sysType, |
| | | login_city: city, |
| | | login_id_address: ipAddress |
| | | } |
| | | |
| | | param.appkey = window.GLOB.appkey || '' |
| | |
| | | /** |
| | | * @description 登录系统, 获取用户信息 |
| | | */ |
| | | getusermsg (username, password, isCloud = false) { |
| | | getusermsg (username, password, isCloud = false, ipAddress, city) { |
| | | let param = { |
| | | // func: 'webapi_login', |
| | | UserName: username, |
| | | systemType: options.sysType, |
| | | Type: 'S' |
| | | Type: 'S', |
| | | login_city: city, |
| | | login_id_address: ipAddress |
| | | } |
| | | |
| | | // Type: 'S' 时 |
| | |
| | | param.userid = sessionStorage.getItem('CloudUserID') || param.userid || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || param.LoginUID || '' |
| | | } |
| | | let url = '/webapi/dostars' |
| | | if (param.rduri) { |
| | | url = param.rduri |
| | | delete param.rduri |
| | | } |
| | | |
| | | // 待优化,增加是否支持跨域请求 |
| | | // let url = '/webapi/dostars' |
| | | // if (param.rduri) { |
| | | // url = param.rduri |
| | | // delete param.rduri |
| | | // } |
| | | |
| | | param = this.encryptParam(param) |
| | | |
| | | return axios({ |
| | | url: `${url}${param.func ? '/' + param.func : ''}`, |
| | | url: `/webapi/dostars${param.func ? '/' + param.func : ''}`, |
| | | method: 'post', |
| | | data: param |
| | | }) |
| | |
| | | let GLOB = {} |
| | | GLOB.appId = config.appId || '' |
| | | GLOB.lineColor = config.lineColor || '' |
| | | GLOB.filter = config.filter || '' |
| | | |
| | | if (config.externalDatabase !== false && config.externalDatabase !== 'false' && config.externalDatabase !== undefined) { |
| | | GLOB.externalDatabase = config.externalDatabase ? `[${config.externalDatabase}]..` : '' |
| | |
| | | |
| | | document.title = GLOB.platTitle || '' |
| | | |
| | | if (GLOB.filter === 'true') { |
| | | if (config.filter === 'true') { |
| | | let html = document.getElementsByTagName('html')[0] |
| | | |
| | | if (html) { |
| | |
| | | min: 0, |
| | | label: '内容', |
| | | initVal: card.value || '', |
| | | tooltip: '文本类型,会替换内容中的@username@和@fullName@。', |
| | | tooltip: '文本类型,会替换内容中的@username@、@fullName@、@login_city@。', |
| | | required: true |
| | | }, |
| | | { |
| | |
| | | </Col> |
| | | <Col span={24} className="sqlfield"> |
| | | <Form.Item label={'可用字段'}> |
| | | id, bid, loginuid, sessionuid, userid, username, fullname, appkey, time_id, orderBy, pageSize, pageIndex{usefulFields ? ', ' + usefulFields : ''} |
| | | id, bid, loginuid, sessionuid, userid, username, fullname, login_city, appkey, time_id, orderBy, pageSize, pageIndex{usefulFields ? ', ' + usefulFields : ''} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={10} style={{width: '43%'}}> |
| | |
| | | _customScript = _customScript.replace(/@\$|\$@/ig, '') |
| | | |
| | | if (_customScript) { |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | ${_customScript} |
| | | ` |
| | | } |
| | |
| | | |
| | | if (_customScript) { |
| | | _regoptions.push({ |
| | | var: new RegExp('@orderBy', 'ig'), |
| | | reg: new RegExp('@login_city@', 'ig'), |
| | | }, { |
| | | reg: new RegExp('@orderBy@', 'ig'), |
| | | }) |
| | | _regoptions.push({ |
| | | var: new RegExp('@UserName', 'ig'), |
| | | }, { |
| | | reg: new RegExp('@UserName@', 'ig'), |
| | | }) |
| | | _regoptions.push({ |
| | | var: new RegExp('@FullName', 'ig'), |
| | | }, { |
| | | reg: new RegExp('@FullName@', 'ig'), |
| | | }) |
| | | if (setting.laypage !== 'false') { |
| | | _regoptions.push({ |
| | | var: new RegExp('@pageSize', 'ig'), |
| | | reg: new RegExp('@pageSize@', 'ig'), |
| | | }, { |
| | | var: new RegExp('@pageIndex', 'ig'), |
| | | reg: new RegExp('@pageIndex@', 'ig'), |
| | | }) |
| | | } |
| | | _regoptions.forEach(item => { |
| | | _customScript = _customScript.replace(item.reg, '0') |
| | | originscript = originscript.replace(item.reg, '0') |
| | | originscript = originscript.replace(item.var, '0') |
| | | }) |
| | | |
| | | if (setting.varMark) { |
| | |
| | | </Col> |
| | | <Col span={24} className="sqlfield"> |
| | | <Form.Item label={'可用字段'}> |
| | | bid, loginuid, sessionuid, userid, username, fullname, appkey, time_id |
| | | bid, loginuid, sessionuid, userid, username, fullname, login_city, appkey, time_id |
| | | </Form.Item> |
| | | </Col> |
| | | {type === 'back' ? <Col span={8} style={{whiteSpace: 'nowrap'}}> |
| | |
| | | }) |
| | | |
| | | if (_customScript) { |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | ${_customScript} |
| | | ` |
| | | } |
| | | |
| | | _customScript = _customScript.replace(/@\$|\$@/ig, '') |
| | | _customScript = _customScript.replace(/@userName@|@fullName@/ig, `''`) |
| | | _customScript = _customScript.replace(/@userName@|@fullName@|@login_city@/ig, `''`) |
| | | // 外联数据库替换 |
| | | if (window.GLOB.externalDatabase !== null) { |
| | | _customScript = _customScript.replace(/@db@/ig, window.GLOB.externalDatabase) |
| | |
| | | let regoptions = [] |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | |
| | | } |
| | | }) |
| | | regoptions.push({ |
| | | reg: new RegExp('@login_city@', 'ig'), |
| | | value: city |
| | | }, { |
| | | reg: new RegExp('@userName@', 'ig'), |
| | | value: userName |
| | | }, { |
| | |
| | | param.custom_script = param.custom_script.replace(item.reg, item.value) |
| | | }) |
| | | |
| | | param.custom_script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50) |
| | | Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}' |
| | | param.custom_script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) |
| | | Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @login_city='${city}' |
| | | ${param.custom_script} |
| | | ` |
| | | |
| | |
| | | |
| | | if (card.datatype === 'static') { |
| | | val = card.value || '' |
| | | if (/@username@|@fullName@/ig.test(val)) { |
| | | if (/@username@|@fullName@|@login_city@/ig.test(val)) { |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | val = val.replace(/@username@/ig, userName).replace(/@fullName@/ig, fullName) |
| | | let city = sessionStorage.getItem('city') || '' |
| | | val = val.replace(/@username@/ig, userName).replace(/@fullName@/ig, fullName).replace(/@login_city@/ig, city) |
| | | } |
| | | } else if (data.hasOwnProperty(card.field)) { |
| | | val = data[card.field] |
| | |
| | | let diffUser = false |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | |
| | | let _script = item.script |
| | | |
| | | if (index === 0) { |
| | | _script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50) |
| | | select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}' |
| | | _script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) |
| | | select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @login_city='${city}' |
| | | ${_script} |
| | | ` |
| | | } |
| | |
| | | let diffUser = false |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | |
| | | let _script = item.script |
| | | |
| | | if (index === 0) { |
| | | _script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50) |
| | | select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}' |
| | | _script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) |
| | | select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @login_city='${city}' |
| | | ${_script} |
| | | ` |
| | | } |
| | |
| | | inherit.cacheTime = config.cacheTime |
| | | } |
| | | |
| | | let regs = [] |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | | fullName = sessionStorage.getItem('CloudFullName') || '' |
| | | } |
| | | |
| | | let regs = [ |
| | | { reg: /@userName@/ig, value: userName }, |
| | | { reg: /@fullName@/ig, value: fullName }, |
| | | { reg: /@login_city@/ig, value: city } |
| | | ] |
| | | |
| | | if (window.GLOB.externalDatabase !== null) { |
| | | regs.push({ |
| | | reg: /@db@/ig, |
| | |
| | | let diffUser = false |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | |
| | | let _script = item.script |
| | | |
| | | if (index === 0) { |
| | | _script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50) |
| | | select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}' |
| | | _script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) |
| | | select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @login_city='${city}' |
| | | ${_script} |
| | | ` |
| | | } |
| | |
| | | let allSearch = Utils.getAllSearchOptions(search) |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | |
| | | }) |
| | | |
| | | regoptions.push({ |
| | | reg: new RegExp('@login_city@', 'ig'), |
| | | value: city |
| | | }, { |
| | | reg: new RegExp('@userName@', 'ig'), |
| | | value: userName |
| | | }, { |
| | |
| | | } |
| | | |
| | | let _sql = `Declare @${btn.sheet} table (${columns.map(item => item.Column + ' ' + item.type).join(',')},jskey nvarchar(50) ) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@ErrorCode nvarchar(50), @retmsg nvarchar(4000),@tbid Nvarchar(512) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50),@ErrorCode nvarchar(50), @retmsg nvarchar(4000),@tbid Nvarchar(512) |
| | | Select @ErrorCode='', @retmsg='' |
| | | ` |
| | | |
| | |
| | | } |
| | | |
| | | if (_customScript) { |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | ${_customScript} |
| | | ` |
| | | } |
| | |
| | | } |
| | | |
| | | _regoptions.push({ |
| | | reg: new RegExp('@login_city@', 'ig'), |
| | | value: `''` |
| | | }, { |
| | | reg: new RegExp('@userName@', 'ig'), |
| | | value: `''` |
| | | }, { |
| | |
| | | </Col> |
| | | {usefulFields ? <Col span={24} className="sqlfield"> |
| | | <Form.Item label={'可用字段'}> |
| | | id, bid, loginuid, sessionuid, userid, username, fullname, appkey, time_id{usefulFields ? ', ' + usefulFields : ''} |
| | | id, bid, loginuid, sessionuid, userid, username, fullname, login_city, appkey, time_id{usefulFields ? ', ' + usefulFields : ''} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {!usefulFields ? <Col span={24} className="sqlfield"> |
| | | <Form.Item label={'可用字段'}> |
| | | id, bid, loginuid, sessionuid, userid, username, fullname, appkey, time_id |
| | | id, bid, loginuid, sessionuid, userid, username, fullname, login_city, appkey, time_id |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {!usefulFields ? <Col span={8} style={{whiteSpace: 'nowrap'}}> |
| | |
| | | }) |
| | | |
| | | if (_customScript) { |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | ${_customScript} |
| | | ` |
| | | } |
| | |
| | | }) |
| | | |
| | | _regoptions.push({ |
| | | reg: new RegExp('@login_city@', 'ig'), |
| | | value: `''` |
| | | }, { |
| | | reg: new RegExp('@userName@', 'ig'), |
| | | value: `''` |
| | | }, { |
| | |
| | | }) |
| | | |
| | | if (_customScript) { |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | ${_customScript} |
| | | ` |
| | | } |
| | | |
| | | _customScript = _customScript.replace(/@\$|\$@/ig, '') |
| | | _customScript = _customScript.replace(/@userName@|@fullName@/ig, `''`) |
| | | _customScript = _customScript.replace(/@userName@|@fullName@|@login_city@/ig, `''`) |
| | | // 外联数据库替换 |
| | | if (window.GLOB.externalDatabase !== null) { |
| | | _customScript = _customScript.replace(/@db@/ig, window.GLOB.externalDatabase) |
| | |
| | | }) |
| | | |
| | | if (_customScript) { |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | ${_customScript} |
| | | ` |
| | | } |
| | |
| | | </Col> |
| | | <Col span={24} className="sqlfield"> |
| | | <Form.Item label={'可用字段'}> |
| | | id, bid, loginuid, sessionuid, userid, username, fullname, appkey, time_id, orderBy{setting.laypage === 'true' ? ', pageSize, pageIndex': ''}{usefulFields ? ', ' + usefulFields : ''} |
| | | id, bid, loginuid, sessionuid, userid, username, fullname, login_city, appkey, time_id, orderBy{setting.laypage === 'true' ? ', pageSize, pageIndex': ''}{usefulFields ? ', ' + usefulFields : ''} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={10} className="quick-add"> |
| | |
| | | resolve(_fields) |
| | | } |
| | | }).then(_fields => { |
| | | let _usefulfields = ['BID', 'ID', 'LoginUID', 'SessionUid', 'UserID', 'Appkey', 'UserName', 'FullName', 'BillCode', 'BVoucher', 'FIBVoucherDate', 'FiYear', 'ModularDetailCode'] |
| | | let _declare = ['@UserName nvarchar(50)', '@FullName nvarchar(50)', '@ErrorCode nvarchar(50)', '@retmsg nvarchar(4000)', '@BillCode nvarchar(50)', '@BVoucher nvarchar(50)', '@FIBVoucherDate nvarchar(50)', '@FiYear nvarchar(50)', '@ModularDetailCode nvarchar(50)'] |
| | | let _select = ['@UserName=\'\'', '@FullName=\'\'', '@ErrorCode=\'\'', '@retmsg=\'\'', '@BillCode=\'\'', '@BVoucher=\'\'', '@FIBVoucherDate=\'\'', '@FiYear=\'\'', '@ModularDetailCode=\'\''] |
| | | let _usefulfields = ['BID', 'ID', 'LoginUID', 'SessionUid', 'UserID', 'Appkey', 'UserName', 'FullName', 'login_city', 'BillCode', 'BVoucher', 'FIBVoucherDate', 'FiYear', 'ModularDetailCode'] |
| | | let _declare = ['@UserName nvarchar(50)', '@FullName nvarchar(50)', '@login_city nvarchar(50)', '@ErrorCode nvarchar(50)', '@retmsg nvarchar(4000)', '@BillCode nvarchar(50)', '@BVoucher nvarchar(50)', '@FIBVoucherDate nvarchar(50)', '@FiYear nvarchar(50)', '@ModularDetailCode nvarchar(50)'] |
| | | let _select = ['@UserName=\'\'', '@FullName=\'\'', '@login_city=\'\'', '@ErrorCode=\'\'', '@retmsg=\'\'', '@BillCode=\'\'', '@BVoucher=\'\'', '@FIBVoucherDate=\'\'', '@FiYear=\'\'', '@ModularDetailCode=\'\''] |
| | | let fieldArr = _usefulfields.map(_f => _f.toLowerCase()) |
| | | let hasBid = false |
| | | |
| | |
| | | |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | |
| | | let _customScript = '' |
| | | |
| | | if (setting.customScript) { |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50) |
| | | Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) |
| | | Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @login_city='${city}' |
| | | ${setting.customScript} |
| | | ` |
| | | } |
| | |
| | | let regoptions = null |
| | | if (setting.queryType === 'statistics' || _customScript) { |
| | | let allSearch = Utils.getAllSearchOptions(search) |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | | fullName = sessionStorage.getItem('CloudFullName') || '' |
| | | } |
| | | |
| | | regoptions = allSearch.map(item => { |
| | | return { |
| | | reg: new RegExp('@' + item.key + '@', 'ig'), |
| | |
| | | } |
| | | }) |
| | | regoptions.push({ |
| | | reg: new RegExp('@login_city@', 'ig'), |
| | | value: `'${city}'` |
| | | }, { |
| | | reg: new RegExp('@userName@', 'ig'), |
| | | value: `'${userName}'` |
| | | }, { |
| | |
| | | |
| | | let _dataresource = setting.dataresource |
| | | let _customScript = '' |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | | fullName = sessionStorage.getItem('CloudFullName') || '' |
| | | } |
| | | |
| | | if (setting.customScript) { |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000) select @ErrorCode='',@retmsg ='' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) |
| | | Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @login_city='${city}' |
| | | ${setting.customScript} |
| | | ` |
| | | } |
| | |
| | | let regoptions = null |
| | | if (setting.queryType === 'statistics' || _customScript) { |
| | | let allSearch = Utils.getAllSearchOptions(search) |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | | fullName = sessionStorage.getItem('CloudFullName') || '' |
| | | } |
| | | |
| | | regoptions = allSearch.map(item => { |
| | | return { |
| | |
| | | } |
| | | }) |
| | | regoptions.push({ |
| | | reg: new RegExp('@login_city@', 'ig'), |
| | | value: `'${city}'` |
| | | }, { |
| | | reg: new RegExp('@userName@', 'ig'), |
| | | value: `'${userName}'` |
| | | }, { |
| | |
| | | let sql = '' |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | |
| | | |
| | | if (sql) { |
| | | sql = `/*前置脚本*/ |
| | | declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50) |
| | | Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}' |
| | | declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) |
| | | Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @login_city='${city}' |
| | | ${sql} |
| | | aaa: |
| | | if @ErrorCode!='' |
| | |
| | | } |
| | | }) |
| | | regoptions.push({ |
| | | reg: new RegExp('@login_city@', 'ig'), |
| | | value: `'${city}'` |
| | | }, { |
| | | reg: new RegExp('@userName@', 'ig'), |
| | | value: `'${userName}'` |
| | | }, { |
| | |
| | | |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | | fullName = sessionStorage.getItem('CloudFullName') || '' |
| | | } |
| | | |
| | | let _prevCustomScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50) |
| | | Select @ErrorCode='',@retmsg='',@UserName='${userName}', @FullName='${fullName}' |
| | | let _prevCustomScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50) |
| | | Select @ErrorCode='',@retmsg='',@UserName='${userName}', @FullName='${fullName}', @login_city='${city}' |
| | | ${errSql} |
| | | ` |
| | | let _backCustomScript = ` |
| | |
| | | let keys = ['delete', 'drop', 'insert', 'truncate', 'update'] |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | |
| | | _sql = ` |
| | | /* 系统生成 */ |
| | | declare @${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) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@tbid Nvarchar(512) |
| | | |
| | | Select @ErrorCode='', @retmsg='', @UserName='${userName}', @FullName='${fullName}' |
| | | Select @ErrorCode='', @retmsg='', @UserName='${userName}', @FullName='${fullName}', @login_city='${city}' |
| | | ${_initCustomScript} |
| | | ` |
| | | _sqlInsert = `Insert into @${sheet} (${fields},jskey,BID)` |
| | |
| | | _sql = ` |
| | | /* 系统生成 */ |
| | | declare @${sheet} table (jskey nvarchar(50)) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@tbid Nvarchar(512) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@tbid Nvarchar(512) |
| | | |
| | | Select @ErrorCode='', @retmsg='', @UserName='${userName}', @FullName='${fullName}' |
| | | Select @ErrorCode='', @retmsg='', @UserName='${userName}', @FullName='${fullName}', @login_city='${city}' |
| | | ` |
| | | } |
| | | |
| | |
| | | _declarefields = ',' + _declarefields |
| | | } |
| | | _sql = `/* 系统生成 */ |
| | | Declare @tbid nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@BillCode nvarchar(50),@BVoucher nvarchar(50),@FIBVoucherDate nvarchar(50), @FiYear nvarchar(50), @UserName nvarchar(50),@FullName nvarchar(50),@ModularDetailCode nvarchar(50)${_declarefields} |
| | | Declare @tbid nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@BillCode nvarchar(50),@BVoucher nvarchar(50),@FIBVoucherDate nvarchar(50), @FiYear nvarchar(50), @UserName nvarchar(50),@FullName nvarchar(50),@login_city nvarchar(50),@ModularDetailCode nvarchar(50)${_declarefields} |
| | | ` |
| | | |
| | | // 表单变量赋值 |
| | |
| | | |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | |
| | | // 初始化凭证及用户信息字段 |
| | | _sql += ` |
| | | /* 凭证及用户信息初始化赋值 */ |
| | | select @BVoucher='',@FIBVoucherDate='',@FiYear='',@ErrorCode='',@retmsg='',@UserName='${userName}', @FullName='${fullName}', @BillCode='', @ModularDetailCode='' |
| | | select @BVoucher='',@FIBVoucherDate='',@FiYear='',@ErrorCode='',@retmsg='',@UserName='${userName}', @FullName='${fullName}', @login_city='${city}', @BillCode='', @ModularDetailCode='' |
| | | ` |
| | | |
| | | if (retmsg) { |
| | |
| | | syncApp: false, |
| | | loginWays: null, |
| | | touristLogin: false, |
| | | syncing: false |
| | | syncing: false, |
| | | ipAddress: '', |
| | | city: '' |
| | | } |
| | | |
| | | changelang (item) { |
| | |
| | | * @param {Object} param 用户名密码等信息 |
| | | */ |
| | | async loginsubmit (param) { |
| | | const { ipAddress, city } = this.state |
| | | if (options.sysType === 'local' && !window.GLOB.mainSystemApi) { // 业务系统必须设置单点地址 |
| | | Modal.warning({ |
| | | title: '未设置单点服务器地址,请联系管理员!' |
| | |
| | | } |
| | | |
| | | // 登录提交 |
| | | let res = await Api.getusermsg(param.username, param.password) |
| | | let res = await Api.getusermsg(param.username, param.password, false, ipAddress, city) |
| | | if (res.status) { |
| | | sessionStorage.setItem('UserID', res.UserID) |
| | | sessionStorage.setItem('LoginUID', res.LoginUID) |
| | |
| | | } |
| | | |
| | | async phoneloginsubmit (param) { |
| | | const { ipAddress, city } = this.state |
| | | if (options.sysType === 'local' && !window.GLOB.mainSystemApi) { // 业务系统必须设置单点地址 |
| | | Modal.warning({ |
| | | title: '未设置单点服务器地址,请联系管理员!' |
| | |
| | | } |
| | | |
| | | // 登录提交 |
| | | let res = await Api.getphoneusermsg(param.phone, param.vercode) |
| | | let res = await Api.getphoneusermsg(param.phone, param.vercode, false, ipAddress, city) |
| | | if (res.status) { |
| | | sessionStorage.setItem('UserID', res.UserID) |
| | | sessionStorage.setItem('LoginUID', res.LoginUID) |
| | |
| | | } |
| | | |
| | | componentDidMount () { |
| | | // 获取ip及城市信息 |
| | | Api.directRequest('http://epc.mk9h.cn/webapi/iploc', 'get', null, 'true').then(res => { |
| | | if (!res || !res.location) return |
| | | sessionStorage.setItem('city', res.location) |
| | | this.setState({ |
| | | ipAddress: res.ip || '', |
| | | city: res.location |
| | | }) |
| | | }) |
| | | const timeStamp = new Date().getTime() |
| | | const _authUrl = window.location.href.split('#')[0] + 'AuthCode' |
| | | |