| | |
| | | }) |
| | | } |
| | | } else if (item.OpenType === 'popview' && this.props.type !== 'subtab') { |
| | | this.props.triggerPopview(item, data) |
| | | // 弹窗标签设置为不选则行时,不传递数据 |
| | | this.props.triggerPopview(item, item.Ot === 'notRequired' ? [] : data) |
| | | } else if (item.OpenType === 'popview' && this.props.type === 'subtab') { |
| | | notification.warning({ |
| | | top: 92, |
| | |
| | | let _list = [] |
| | | return new Promise(resolve => { |
| | | let params = [] |
| | | let param = { |
| | | BID: this.props.BID |
| | | let param = {} |
| | | |
| | | if (this.props.BID) { |
| | | param.BID = this.props.BID |
| | | } |
| | | |
| | | if (btn.Ot === 'notRequired') { |
| | |
| | | |
| | | // 使用处理后的数据调用外部接口 |
| | | let keys = Object.keys(res) // 提交外部接口前,添加BID |
| | | if (keys.filter(key => key.toLowerCase() === 'bid').length === 0) { |
| | | if (this.props.BID && keys.filter(key => key.toLowerCase() === 'bid').length === 0) { |
| | | res.BID = this.props.BID |
| | | } |
| | | |
| | |
| | | let _this = this |
| | | |
| | | let param = { |
| | | BID: this.props.BID, |
| | | func: 'webapi_ChangeUser' |
| | | } |
| | | |
| | | if (this.props.BID) { |
| | | param.BID = this.props.BID |
| | | } |
| | | |
| | | if (window.GLOB.mainSystemApi) { |
| | |
| | | } |
| | | |
| | | let param = { // 系统存储过程 |
| | | func: 'sPC_TableData_InUpDe', |
| | | BID: this.props.BID |
| | | func: 'sPC_TableData_InUpDe' |
| | | } |
| | | |
| | | if (this.props.BID) { |
| | | param.BID = this.props.BID |
| | | } |
| | | |
| | | let primaryId = '' |
| | |
| | | |
| | | let _params = data.map((cell, index) => { |
| | | let param = { |
| | | func: 'sPC_TableData_InUpDe', |
| | | BID: this.props.BID |
| | | func: 'sPC_TableData_InUpDe' |
| | | } |
| | | |
| | | if (this.props.BID) { |
| | | param.BID = this.props.BID |
| | | } |
| | | |
| | | let primaryId = setting.primaryKey ? cell[setting.primaryKey] : '' |
| | | |
| | | if (btn.OpenType === 'prompt' || btn.OpenType === 'exec') { // 是否弹框或直接执行 |
| | |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | } |
| | | } else if (btn.OpenType === 'pop') { // 表单 |
| | | if (index !== 0) { |
| | | formdata = formdata.map(_data => { |
| | | if (_data.readin && cell.hasOwnProperty(_data.key)) { |
| | | _data.value = cell[_data.key] |
| | | } |
| | | return _data |
| | | }) |
| | | } |
| | | |
| | | if (btn.innerFunc) { |
| | | param.func = btn.innerFunc |
| | | |
| | | formdata.forEach(_data => { |
| | | if (index !== 0 && _data.readin && cell.hasOwnProperty(_data.key)) { |
| | | param[_data.key] = cell[_data.key] |
| | | } else { |
| | | param[_data.key] = _data.value |
| | | } |
| | | param[_data.key] = _data.value |
| | | }) |
| | | |
| | | if (setting.primaryKey) { |
| | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | } else if (btn.sql) { |
| | | if (index !== 0) { |
| | | formdata = formdata.map(_data => { |
| | | if (_data.readin && cell.hasOwnProperty(_data.key)) { |
| | | _data.value = cell[_data.key] |
| | | } |
| | | return _data |
| | | }) |
| | | } |
| | | |
| | | param.ID = primaryId |
| | | param.LText = Utils.formatOptions(Utils.getSysDefaultSql(btn, setting, formdata, param, cell, logcolumns, this.props.Tab)) // 数据源 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | |
| | | let _params = [] // 请求参数数组 |
| | | |
| | | if (btn.Ot === 'notRequired' || btn.Ot === 'requiredSgl' || btn.Ot === 'requiredOnce') { |
| | | let param = { |
| | | BID: this.props.BID |
| | | let param = {} |
| | | |
| | | if (this.props.BID) { |
| | | param.BID = this.props.BID |
| | | } |
| | | |
| | | if (btn.OpenType === 'pop' && formdata) { // 表单 |
| | |
| | | } else if (btn.Ot === 'required') { |
| | | // 选择多行,循环调用 |
| | | _params = data.map((cell, index) => { |
| | | let _cell = { |
| | | BID: this.props.BID, |
| | | let _cell = {} |
| | | |
| | | if (this.props.BID) { |
| | | _cell.BID = this.props.BID |
| | | } |
| | | |
| | | let _formparam = {} |
| | |
| | | |
| | | // 使用处理后的数据调用外部接口 |
| | | let keys = Object.keys(res) // 提交外部接口前,添加BID |
| | | if (keys.filter(key => key.toLowerCase() === 'bid').length === 0) { |
| | | if (this.props.BID && keys.filter(key => key.toLowerCase() === 'bid').length === 0) { |
| | | res.BID = this.props.BID |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | let param = { |
| | | BID: this.props.BID, |
| | | ID: primaryId |
| | | } |
| | | |
| | | if (this.props.BID) { |
| | | param.BID = this.props.BID |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(result.sql) |
| | |
| | | |
| | | // 使用处理后的数据调用外部接口 |
| | | let keys = Object.keys(res) // 提交外部接口前,添加BID |
| | | if (keys.filter(key => key.toLowerCase() === 'bid').length === 0) { |
| | | if (this.props.BID && keys.filter(key => key.toLowerCase() === 'bid').length === 0) { |
| | | res.BID = this.props.BID |
| | | } |
| | | resolve(res) |