| | |
| | | appId: '201912040924165801464FF1788654BC5AC73', |
| | | appkey: '20191106103859640976D6E924E464D029CF0', |
| | | mainSystemApi: 'http://cloud.mk9h.cn/webapi/dostars', |
| | | systemType: 'test', |
| | | systemType: '', |
| | | platTitle: '', |
| | | platName: '', |
| | | favicon: '', |
| | |
| | | appId -- 云端生成的应用ID |
| | | appkey -- 云端生成的应用密钥 |
| | | mainSystemApi -- sso系统的接口路径,注:业务系统需要填写,且值为通用接口的完整路径 |
| | | systemType -- 业务系统使用此参数,判断系统为测试或正式(test、official),正式系统开发权限只有系统升级 |
| | | systemType -- 业务系统使用此参数,判断系统为测试或正式(official),正式系统开发权限只有系统升级 |
| | | platTitle -- 系统标题栏标题 |
| | | platName -- 系统名称 |
| | | favicon -- 系统标题栏图标 |
| | |
| | | return |
| | | } |
| | | if (value.PageParam.OpenType === 'menu') { |
| | | console.log(value) |
| | | this.props.modifyMainMenu(value) |
| | | } else { |
| | | window.open('#/' + value.PageParam.linkUrl + '/') |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | // import moment from 'moment' |
| | | import moment from 'moment' |
| | | import { Button, Modal, notification, message } from 'antd' |
| | | import MutilForm from '@/tabviews/zshare/mutilform' |
| | | import Utils from '@/utils/utils.js' |
| | | import { refCodes } from '../config' |
| | | // import options from '@/store/options.js' |
| | | // import Api from '@/api' |
| | | import Api from '@/api' |
| | | import './index.scss' |
| | | |
| | | const { confirm } = Modal |
| | |
| | | * @description 触发按钮操作 |
| | | */ |
| | | actionTrigger = (item) => { |
| | | const { setting, BID } = this.props |
| | | const { setting, BID, datalist } = this.props |
| | | |
| | | if (!BID) { |
| | | notification.warning({ |
| | |
| | | }) |
| | | return |
| | | } |
| | | } |
| | | |
| | | if ((!datalist || datalist.length === 0) && item.sqlType !== 'revert') { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '数据丢失或错误,请恢复默认设置!', |
| | | duration: 10 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | if (item.OpenType === 'prompt') { |
| | |
| | | {uuid: 'other_system2', public: 'd', private: 'damson', keyType: 'other'} |
| | | ] |
| | | } |
| | | console.log(datalist) |
| | | |
| | | let _number = Math.floor(Math.random() * 10) |
| | | console.log(_number) |
| | | let keyString = window.btoa(window.encodeURIComponent(JSON.stringify(datalist))) |
| | | console.log(keyString) |
| | | let regular = refCodes[_number] |
| | | console.log(regular) |
| | | keyString = keyString.replace(new RegExp(regular.char,'g'), regular.md5str) |
| | | console.log(keyString) |
| | | // window.btoa(window.encodeURIComponent(JSON.stringify(val))) |
| | | |
| | | // for (let i = 0; i < a.length; i++) { |
| | | // if (a[i] !== b[i]) { |
| | | // console.log(i) |
| | | // console.log(src.substring(i- 10, i+ 10)) |
| | | // } |
| | | // } |
| | | // let param = { refCodes |
| | | // func: 'sPC_TableData_InUpDe', |
| | | // BID: this.props.BID |
| | | // } |
| | | // Api.genericInterface(param).then((res) => { |
| | | // if (res.status) { |
| | | // this.execSuccess(btn, res) |
| | | // } else { |
| | | // this.execError(res, btn) |
| | | // } |
| | | // _resolve() |
| | | // }) |
| | | keyString = keyString.replace(new RegExp(regular.char, 'g'), regular.md5str) |
| | | keyString = window.btoa(keyString) |
| | | keyString = _number + keyString |
| | | |
| | | let param = { |
| | | func: 's_app_secret_param_adduptdel', |
| | | BID: this.props.BID, |
| | | LText: keyString, |
| | | timestamp: moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | } |
| | | |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | Api.getLocalConfig(param).then((res) => { |
| | | if (res.status) { |
| | | this.execSuccess(btn, res) |
| | | } else { |
| | | this.execError(res, btn) |
| | | } |
| | | _resolve() |
| | | }) |
| | | } |
| | | |
| | | |
| | |
| | | import zhCN from '@/locales/zh-CN/main.js' |
| | | import enUS from '@/locales/en-US/main.js' |
| | | import options from '@/store/options.js' |
| | | import { buttonConfig, tabConfig } from './config' |
| | | import { buttonConfig, tabConfig, refCodes } from './config' |
| | | |
| | | import SubTable from '@/tabviews/zshare/normalTable' |
| | | import SubAction from './actionList' |
| | |
| | | let result = await Api.getLocalConfig(param) |
| | | |
| | | if (result.status) { |
| | | // let _data = result.secret_param |
| | | let str = result.secret_param |
| | | |
| | | let _data = [ |
| | | {uuid: 'sso_system', public: 'a', private: 'apple', keyType: 'sso'}, |
| | | {uuid: 'local_system', public: 'b', private: 'banana', keyType: 'local'}, |
| | | {uuid: 'other_system1', public: 'c', private: 'cherry', keyType: 'other'}, |
| | | {uuid: 'other_system2', public: 'd', private: 'damson', keyType: 'other'} |
| | | ] |
| | | _data = _data.map((item, index) => { |
| | | item.key = index |
| | | return item |
| | | }) |
| | | // Math.floor(Math.random()*10) |
| | | try { |
| | | |
| | | if (str) { |
| | | str = str.substring(1) |
| | | str = window.atob(str) |
| | | refCodes.forEach(item => { |
| | | str = str.replace(new RegExp(item.md5str, 'g'), item.char) |
| | | }) |
| | | str = JSON.parse(window.decodeURIComponent(window.atob(str))) |
| | | } |
| | | } catch { |
| | | str = '' |
| | | } |
| | | |
| | | if (!str) { |
| | | this.setState({ |
| | | loading: false |
| | | loading: false, |
| | | pickup: false, |
| | | data: [] |
| | | }) |
| | | notification.error({ |
| | | top: 92, |
| | | message: '密钥组数据格式错误,请恢复默认设置后,重新添加!', |
| | | message: '密钥组数据丢失或格式错误,请恢复默认设置,重新添加!', |
| | | duration: 15 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | let _data = str.map((item, index) => { |
| | | item.key = index |
| | | return item |
| | | }) |
| | | |
| | | this.setState({ |
| | | data: _data, |
| | | pickup: false, |
| | |
| | | type: 'FormTab', |
| | | enabled: false, |
| | | setting: { |
| | | // tableName: '', |
| | | // primaryKey: '', |
| | | // dataresource: '', |
| | | datatype: 'query', |
| | | // interType: 'inner', |
| | | // sysInterface: 'false', |
| | | // innerFunc: '', |
| | | // interface: '', |
| | | // outerFunc: '', |
| | | cols: '2', |
| | | width: 100 |
| | | }, |