| | |
| | | storeKey -- 电子档案本地授权码,使用本地许可密钥时有效 |
| | | probation -- 试用期(YYYY-MM-DD),在正式系统中,试用期内调用系统接口的脚本会记录下来 |
| | | transfer -- 是否使用转接口,使用转接口时请设置为 true, 使用转接口时,外部接口调用前不会做登录验证 |
| | | keepPassword -- 记住密码,默认开启,当值为 false 时禁用 |
| | | keepPwd -- 记住密码,默认开启,当值为 false 时禁用,当值为 invisible 时记住密码但密码不可查看 |
| | | execType -- 脚本传输方式,值为x时,启用AES加密 |
| | | updateStatus -- 是否更新开发状态,默认开启,当值为 false 时禁用 |
| | | forcedUpdate -- 传输号升级时,是否自动退出,格式为(YYYY-MM-DD),用于升级后刷新用户本地配置 |
| | |
| | | "storeKey": "", |
| | | "probation": "", |
| | | "transfer": "true", |
| | | "keepPassword": "true", |
| | | "keepPwd": "true", |
| | | "host": "http://bms-test.kresstools.cn", |
| | | "service": "oc/" |
| | | } |
| | |
| | | data: param |
| | | }).then(res => { |
| | | if (res.status && res.urlPath) { |
| | | res.urlPath = window.GLOB.baseurl + res.urlPath |
| | | if (!/Content\/images/.test(res.urlPath)) { |
| | | let key = CryptoJS.enc.Utf8.parse('D1185ED7B32568C9') |
| | | let wordArray = CryptoJS.enc.Base64.parse(res.urlPath) |
| | | let decryptedWordArray = CryptoJS.AES.decrypt({ ciphertext: wordArray }, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 }) |
| | | res.urlPath = CryptoJS.enc.Utf8.stringify(decryptedWordArray) |
| | | } |
| | | if (!/^http/.test(res.urlPath)) { |
| | | res.urlPath = window.GLOB.baseurl + res.urlPath |
| | | } |
| | | } |
| | | resolve(res) |
| | | }) |
| | |
| | | |
| | | state = { |
| | | remember: false, |
| | | lock: false, |
| | | username: '', |
| | | password: '', |
| | | oripassword: '', |
| | | delay: +sessionStorage.getItem('mkDelay') |
| | | } |
| | | |
| | |
| | | this.setState({ |
| | | remember: true, |
| | | username: _user.username, |
| | | password: _user.password ? '*********' : '', |
| | | oripassword: _user.password |
| | | password: _user.password, |
| | | lock: true |
| | | }) |
| | | } |
| | | } |
| | | |
| | | handleConfirm = () => { |
| | | const { oripassword } = this.state |
| | | // 表单提交时检查输入值是否正确 |
| | | return new Promise((resolve, reject) => { |
| | | this.props.form.validateFieldsAndScroll((err, values) => { |
| | | if (!err) { |
| | | if (oripassword && values.password === '*********') { |
| | | values.password = oripassword |
| | | } |
| | | |
| | | values.username = values.username.replace(/\t+|\v+|\s+/g, '') |
| | | values.password = values.password.replace(/\t+|\v+|\s+/g, '') |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | unLock = (e) => { |
| | | if (e.target.value) return |
| | | |
| | | this.setState({ lock: false }) |
| | | } |
| | | |
| | | componentDidMount () { |
| | | const { username, password } = this.state |
| | | |
| | |
| | | |
| | | render() { |
| | | const { getFieldDecorator } = this.props.form |
| | | const { remember, username, password, delay } = this.state |
| | | const { remember, username, password, delay, lock } = this.state |
| | | |
| | | return ( |
| | | <Form style={{margin: '0px 10px'}}> |
| | |
| | | message: '请输入密码', |
| | | } |
| | | ] |
| | | })(<Input.Password onPressEnter={(e) => {this.handleSubmit(e, 'username')}} placeholder="密码" prefix={<LockOutlined style={{ color: 'rgba(0,0,0,.25)' }} />} />)} |
| | | })(<Input.Password onPressEnter={(e) => {this.handleSubmit(e, 'username')}} placeholder="密码" visibilityToggle={!lock} onChange={this.unLock} prefix={<LockOutlined style={{ color: 'rgba(0,0,0,.25)' }} />} />)} |
| | | </Form.Item> |
| | | {window.GLOB.keepKey ? <Form.Item style={{marginBottom: '10px'}}> |
| | | {getFieldDecorator('remember', { |
| | |
| | | } |
| | | } |
| | | |
| | | config.keepPwd = config.keepPwd || config.keepPassword |
| | | |
| | | let GLOB = {} |
| | | GLOB.appId = config.appId || '' |
| | | GLOB.lineColor = config.lineColor || '' |
| | |
| | | GLOB.probation = false |
| | | GLOB.watermark = config.watermark + '' !== 'false' |
| | | GLOB.transfer = config.transfer + '' === 'true' |
| | | GLOB.keepKey = config.keepPassword + '' !== 'false' |
| | | GLOB.keepKey = config.keepPwd + '' !== 'false' |
| | | GLOB.vispwd = config.keepPwd + '' !== 'invisible' |
| | | GLOB.WXAppID = config.WXAppID || '' |
| | | GLOB.WXminiAppID = config.WXminiAppID || '' |
| | | GLOB.WXMerchID = config.WXMerchID || '' |
| | |
| | | }) |
| | | } |
| | | |
| | | cancel = () => { |
| | | this.verifyRef.closeDataSource(() => { |
| | | this.setState({ visible: false, loading: false }) |
| | | }) |
| | | } |
| | | |
| | | creatFunc = () => { |
| | | const { config } = this.props |
| | | const { mainSearch } = this.state |
| | |
| | | onCancel={() => {this.setState({ visible: false, loading: false }) }} |
| | | footer={[ |
| | | config.subtype !== 'dualdatacard' && record.interType === 'inner' ? <CreateFunc key="create" getMsg={this.creatFunc}/> : null, |
| | | <Button key="cancel" onClick={() => { this.setState({ visible: false, loading: false }) }}>取消</Button>, |
| | | <Button key="cancel" onClick={this.cancel}>取消</Button>, |
| | | <Button key="confirm" type="primary" loading={loading} onClick={this.verifySubmit}>确定</Button> |
| | | ]} |
| | | destroyOnClose |
| | |
| | | loading: false, |
| | | colLoading: false, |
| | | searchKey: '', |
| | | initsql: '', // sql验证时变量声明及赋值 |
| | | usefulfields: '', |
| | | defaultsql: '', // 默认Sql |
| | | defaultsql: '', |
| | | systemScripts: [], |
| | | median: {}, |
| | | visible: false, |
| | |
| | | pvisible: false, |
| | | reload: false, |
| | | script: null, |
| | | oriConfig: null, |
| | | scriptValue: '', |
| | | cols: null, |
| | | colColumns: [ |
| | |
| | | median: _setting, |
| | | searches: formatSearch(search), |
| | | searchKey: '', |
| | | debugId: _setting.debugId || '' |
| | | debugId: _setting.debugId || '', |
| | | oriConfig: fromJS({ |
| | | scripts, |
| | | columns: columns, |
| | | subColumns: subColumns, |
| | | setting: _setting |
| | | }).toJS() |
| | | }) |
| | | |
| | | this.getsysScript() |
| | |
| | | this.sqlverify(() => { resolve({setting, columns, subColumns, scripts, cols }) }, reject, 'submit') |
| | | } |
| | | }) |
| | | } |
| | | |
| | | closeDataSource = (callback) => { |
| | | const { setting, columns, subColumns, scripts, oriConfig } = this.state |
| | | |
| | | let line = scripts.map(item => item.sql).join('') |
| | | line += columns.map(item => item.field + item.datatype).join('') |
| | | line += subColumns.map(item => item.field + item.datatype).join('') |
| | | line += setting.interType + (setting.dataresource || '') + (setting.order || '') + (setting.primaryKey || '') |
| | | |
| | | let _line = oriConfig.scripts.map(item => item.sql).join('') |
| | | _line += oriConfig.columns.map(item => item.field + item.datatype).join('') |
| | | _line += oriConfig.subColumns.map(item => item.field + item.datatype).join('') |
| | | _line += oriConfig.setting.interType + (oriConfig.setting.dataresource || '') + (oriConfig.setting.order || '') + (oriConfig.setting.primaryKey || '') |
| | | |
| | | if (line !== _line) { |
| | | confirm({ |
| | | content: '数据源已修改,确定取消吗?', |
| | | onOk() { |
| | | callback() |
| | | }, |
| | | onCancel() {} |
| | | }) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | |
| | | sqlverify = (resolve, reject, type, testScripts) => { |
| | |
| | | setting={setting} |
| | | searches={searches} |
| | | defaultsql={defaultsql} |
| | | initsql={this.state.initsql} |
| | | customScripts={scripts} |
| | | systemScripts={this.state.systemScripts} |
| | | scriptsChange={this.scriptsChange} |
| | |
| | | /> |
| | | </Form.Item> |
| | | <Form.Item> |
| | | <Input.Password placeholder="密码" prefix={<LockOutlined style={{ color: 'rgba(0,0,0,.25)' }} />} /> |
| | | <Input.Password placeholder="密码" visibilityToggle={wrap.vispwd !== 'false'} prefix={<LockOutlined style={{ color: 'rgba(0,0,0,.25)' }} />} /> |
| | | </Form.Item> |
| | | {!activeWay.shortcut || activeWay.shortcut === 'remember' ? <Form.Item className="minline"> |
| | | <Checkbox>记住密码</Checkbox> |
| | |
| | | {value: 'none', label: '无'}, |
| | | {value: 'remember', label: '记住密码'}, |
| | | {value: 'autologon', label: '自动登录'}, |
| | | ], |
| | | controlFields: [ |
| | | {field: 'vispwd', values: ['remember', 'autologon']}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'vispwd', |
| | | label: '查看密码', |
| | | initval: wrap.vispwd || 'true', |
| | | tooltip: '密码是否可查看(密码框右侧图标是否显示)。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', label: '启用'}, |
| | | {value: 'false', label: '禁用'}, |
| | | ] |
| | | }, |
| | | { |
| | |
| | | verdisabled: false, |
| | | hasScan: false, |
| | | timeout: false, |
| | | vispwd: window.GLOB.vispwd, |
| | | wayLabels: {}, |
| | | dict: window.GLOB.dict, |
| | | users: [], |
| | |
| | | users = [] |
| | | } |
| | | |
| | | if (users[0]) { |
| | | if (users[0] && activeKey === 'uname_pwd') { |
| | | _user = users[0] |
| | | } |
| | | |
| | | this.setState({ |
| | | users: users, |
| | | username: activeKey === 'uname_pwd' && _user ? _user.username : '', |
| | | password: activeKey === 'uname_pwd' && _user ? _user.password : '', |
| | | username: _user ? _user.username : '', |
| | | password: _user ? _user.password : '', |
| | | smsId: smsId, |
| | | loginWays: _loginWays, |
| | | activeKey, |
| | |
| | | render() { |
| | | const { langList } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | | const { activeKey, verdisabled, delay, loginWays, remember, scanId, timeout, hasScan, users, wayLabels, dict, lang } = this.state |
| | | const { activeKey, verdisabled, delay, loginWays, remember, scanId, timeout, hasScan, users, wayLabels, dict, lang, vispwd } = this.state |
| | | |
| | | return ( |
| | | <Form className="login-form" id="login-form" onSubmit={this.handleSubmit}> |
| | |
| | | message: dict['password_required'] || '请输入密码', |
| | | } |
| | | ] |
| | | })(<Input.Password placeholder={dict['password'] || '密码'} prefix={<LockOutlined style={{ color: 'rgba(0,0,0,.25)' }} />} />)} |
| | | })(<Input.Password placeholder={dict['password'] || '密码'} visibilityToggle={vispwd} prefix={<LockOutlined style={{ color: 'rgba(0,0,0,.25)' }} />} />)} |
| | | </Form.Item> |
| | | {window.GLOB.keepKey ? <Form.Item className="minline"> |
| | | {getFieldDecorator('remember', { |