| | |
| | | formlist: [], |
| | | setting: null, |
| | | view: 'normal', |
| | | systemScripts: [], |
| | | systemScripts: [{ |
| | | name: '默认sql', |
| | | value: '' |
| | | }], |
| | | scriptsColumns: [ |
| | | { |
| | | title: 'SQL', |
| | |
| | | |
| | | Api.getSystemConfig(_sParam).then(res => { |
| | | if (res.status) { |
| | | let _scripts = [] |
| | | |
| | | _scripts.push({ |
| | | name: '默认sql', |
| | | value: '' |
| | | }) |
| | | |
| | | res.data.forEach(item => { |
| | | let _scripts = res.data.map(item => { |
| | | let _item = { |
| | | name: item.funcname, |
| | | value: Utils.formatOptions(item.longparam, true) |
| | | } |
| | | _scripts.push(_item) |
| | | |
| | | return _item |
| | | }) |
| | | |
| | | this.setState({ |
| | | systemScripts: _scripts |
| | | systemScripts: [...this.state.systemScripts, ..._scripts] |
| | | }) |
| | | } else { |
| | | notification.warning({ |