| | |
| | | "iconv-lite": "~0.4.13" |
| | | } |
| | | }, |
| | | "encryptlong": { |
| | | "version": "3.1.4", |
| | | "resolved": "https://registry.npmjs.org/encryptlong/-/encryptlong-3.1.4.tgz", |
| | | "integrity": "sha512-nx+om7MXaSBSBPBNKKPrOWMot/C0L0Ru8dy9WTyjO5k8Wo+1hsnK0d8uX1UjctkgcgEWhkKhVScniYDjXvnKgw==" |
| | | }, |
| | | "end-of-stream": { |
| | | "version": "1.4.1", |
| | | "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", |
| | |
| | | } |
| | | } |
| | | }, |
| | | "jsencrypt": { |
| | | "version": "3.3.2", |
| | | "resolved": "https://registry.npmjs.org/jsencrypt/-/jsencrypt-3.3.2.tgz", |
| | | "integrity": "sha512-arQR1R1ESGdAxY7ZheWr12wCaF2yF47v5qpB76TtV64H1pyGudk9Hvw8Y9tb/FiTIaaTRUyaSnm5T/Y53Ghm/A==" |
| | | }, |
| | | "jsesc": { |
| | | "version": "2.5.2", |
| | | "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", |
| | |
| | | } |
| | | } |
| | | }, |
| | | "node-rsa": { |
| | | "version": "1.1.1", |
| | | "resolved": "https://registry.npmjs.org/node-rsa/-/node-rsa-1.1.1.tgz", |
| | | "integrity": "sha512-Jd4cvbJMryN21r5HgxQOpMEqv+ooke/korixNNK3mGqfGJmy0M77WDDzo/05969+OkMy3XW1UuZsSmW9KQm7Fw==", |
| | | "requires": { |
| | | "asn1": "^0.2.4" |
| | | } |
| | | }, |
| | | "node-sass": { |
| | | "version": "4.12.0", |
| | | "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.12.0.tgz", |
| | |
| | | "dragact": "^0.2.12", |
| | | "echarts": "^5.2.1", |
| | | "echarts-for-react": "^2.0.15-beta.1", |
| | | "encryptlong": "^3.1.4", |
| | | "eslint": "^6.1.0", |
| | | "eslint-config-react-app": "^5.0.1", |
| | | "eslint-loader": "2.2.1", |
| | |
| | | "jest-watch-typeahead": "0.3.1", |
| | | "js-table2excel": "^1.0.3", |
| | | "jsbarcode": "^3.11.3", |
| | | "jsencrypt": "^3.3.2", |
| | | "jspdf": "^2.5.1", |
| | | "jssha": "^3.2.0", |
| | | "jszip": "^3.10.0", |
| | | "md5": "^2.2.1", |
| | | "mini-css-extract-plugin": "0.5.0", |
| | | "moment": "^2.24.0", |
| | | "node-rsa": "^1.1.1", |
| | | "node-sass": "^4.12.0", |
| | | "optimize-css-assets-webpack-plugin": "5.0.3", |
| | | "pnp-webpack-plugin": "1.5.0", |
| | |
| | | param.sign = md5(values) |
| | | param.t = new Date().getTime(); |
| | | |
| | | ['arr_field', 'LText_field', 'custom_script', 'LText1', 'LText', 'LText2', 'DateCount'].forEach(key => { |
| | | ['arr_field', 'custom_script', 'LText', 'DateCount'].forEach(key => { |
| | | if (param[key]) { |
| | | let val = param[key] |
| | | delete param[key] |
| | |
| | | }) |
| | | return Promise.reject() |
| | | } |
| | | } else if (config.subtype === 'editable') { |
| | | let _arr = [] |
| | | columns.forEach(col => { |
| | | let key = col.field.toLowerCase() |
| | | if (['jskey', 'data_type', 'bid'].includes(key)) { |
| | | _arr.push(col.field) |
| | | } |
| | | }) |
| | | |
| | | if (_arr.length > 0) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '字段集中不可使用' + _arr.join('、') + '!注:此字段为提交时的系统字段。', |
| | | duration: 5 |
| | | }) |
| | | return Promise.reject() |
| | | } |
| | | } |
| | | |
| | | return new Promise((resolve, reject) => { |
| | |
| | | _sql = _sql.replace(item.id, item.value) |
| | | }) |
| | | |
| | | _sql = _sql.replace(/,\n\s*/g, ',') |
| | | |
| | | this.setState({display: false, defaultVal: _sql}, () => { |
| | | this.setState({display: true}) |
| | | }) |
| | |
| | | param.menuname = setting.$name |
| | | } |
| | | |
| | | param.custom_script = Utils.formatOptions(_customScript) |
| | | param.LText = Utils.formatOptions(LText) |
| | | param.DateCount = Utils.formatOptions(DateCount) |
| | | param.custom_script = Utils.formatOptions(_customScript, param.exec_type) |
| | | param.LText = Utils.formatOptions(LText, param.exec_type) |
| | | param.DateCount = Utils.formatOptions(DateCount, param.exec_type) |
| | | |
| | | if (setting.sub_field) { |
| | | param.sub_name = setting.subdata |
| | |
| | | |
| | | /** |
| | | * @description 生成sPC_Get_structured_data请求参数 |
| | | * 1、把大接口sPC_Get_structured_data的ltext拆成三份,第一段:@LText1,第二段@LText,第三段@LText2 |
| | | */ |
| | | export function getStructuredParams (params, config, BID) { |
| | | let LText_field = [] |
| | |
| | | import React from 'react' |
| | | import moment from 'moment' |
| | | import md5 from 'md5' |
| | | // import NodeRSA from 'node-rsa' |
| | | |
| | | const formatKeys = [ |
| | | { key: 'select', value: ' msltk ' }, |
| | |
| | | * @description sql加密 |
| | | * @return {String} value |
| | | */ |
| | | static formatOptions (value) { |
| | | static formatOptions (value, exec_type = '') { |
| | | if (!value) return '' |
| | | |
| | | let salt = 'minKe' // 盐值 |
| | | |
| | | value = value.replace(/\n/ig, ' \n ') |
| | | // 替换关键字 |
| | |
| | | if (window.GLOB.externalDatabase !== null) { |
| | | value = value.replace(/@db@/ig, window.GLOB.externalDatabase) |
| | | } |
| | | |
| | | if (exec_type === 'x') { |
| | | // let publicKey = `-----BEGIN PUBLIC KEY----- |
| | | // MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwGxFURiCrk5a2xfWuM3W |
| | | // 2lkS3ioZhUFXpkK1inMivItsA/J8MTaBB3EAVxC29xdVCU+xOzs512PuD2b1sjzX |
| | | // jwO6kx433NtB2okqGiP4RkzhEJHwdyc9dPUKdjirDznUWI9R7WayAf5Z4COhMsj2 |
| | | // IbkyJgkb6Ivn0UgU0GSWc92HqJJmnb3Ti2gk6A2+oybz2RE3+xB/yOaNu3xav4yi |
| | | // xxo6harVLNBiaU+D7aDed1W3kE20gLOnEAvcLMjpe3n/QvF5RtELsm3T+vH3TIT2 |
| | | // GI9+8cT20NZ2d7i41+j/AQZiPJNS3MVmc3aIhuyCOsNPLmvbZZi1KPSJIqkCwdEg |
| | | // mQIDAQAB |
| | | // -----END PUBLIC KEY-----` |
| | | |
| | | // let pubKey = new NodeRSA(publicKey, 'pkcs8-public') |
| | | |
| | | // value = window.encodeURIComponent(value) |
| | | // value = pubKey.encrypt(value, 'base64') |
| | | |
| | | // const priKey = new NodeRSA(privateKey, 'pkcs8-private') |
| | | // const res = priKey.decrypt(value, 'utf8') |
| | | } else { |
| | | // encode编码(中文字符超出base64加密范围) |
| | | value = window.btoa(window.encodeURIComponent(value)) |
| | | // 插入字符 |
| | | let salt = 'minKe' // 盐值 |
| | | let index = Math.floor(value.length / 2) |
| | | value = value.slice(0, index) + salt + value.slice(index) |
| | | // base64加密 |
| | | value = window.btoa(value) |
| | | } |
| | | |
| | | return value |
| | | } |
| | |
| | | |
| | | let param = { |
| | | func: 'sPC_Get_structured_data', |
| | | LText: LText.join(' union all '), |
| | | LText_field: LText_field.join(' union all '), |
| | | BID: BID || '', |
| | | username: userName, |
| | | fullName: fullName |
| | |
| | | param.menuname = MenuName |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText_field = Utils.formatOptions(param.LText_field) |
| | | param.exec_type = 'y' |
| | | param.LText = Utils.formatOptions(LText.join(' union all ')) |
| | | param.custom_script = Utils.formatOptions(LText_field.join(' union all ')) |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | | return param |
| | | } |