| | |
| | | import { Form, Tabs, Popconfirm, notification, Modal, Typography, Spin, message, Button, Input } from 'antd' |
| | | import { StopOutlined, CheckCircleOutlined, TableOutlined, EditOutlined, SwapOutlined, DeleteOutlined, CopyOutlined, BorderOutlined, SnippetsOutlined } from '@ant-design/icons' |
| | | import moment from 'moment' |
| | | import md5 from 'md5' |
| | | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | |
| | | |
| | | let r = SettingUtils.getDebugSql(setting, _scripts, _columns, searches, config.subtype, config.hasExtend) |
| | | |
| | | let _debugId = md5(r.sql) |
| | | |
| | | if (r.custompage && setting.laypage === 'true' && _columns.findIndex(col => col.field === 'mk_total') === -1) { |
| | | if (config.subtype !== 'basetable') { |
| | | Modal.warning({ |
| | |
| | | } |
| | | } |
| | | |
| | | if (debugId === _debugId) { |
| | | if (debugId === r.debugId) { |
| | | resolve() |
| | | return |
| | | } |
| | |
| | | |
| | | Api.sDebug(r.sql).then(result => { |
| | | if (result.status || result.ErrCode === '-2') { |
| | | this.setState({debugId: _debugId}, () => { |
| | | this.setState({debugId: r.debugId}, () => { |
| | | resolve() |
| | | }) |
| | | } else { |
| | |
| | | |
| | | copyColumns = () => { |
| | | const { config } = this.props |
| | | const { columns, setting } = this.state |
| | | const { columns, subColumns, setting } = this.state |
| | | |
| | | let _columns = columns |
| | | let m = [] |
| | | let n = [] |
| | | let s = [] |
| | | |
| | | columns.forEach(col => { |
| | | if (subColumns && subColumns.length) { |
| | | _columns = [...columns, ...subColumns] |
| | | } |
| | | |
| | | _columns.forEach(col => { |
| | | m.unshift(`${col.field} ${col.datatype}`) |
| | | n.unshift(col.field) |
| | | if (/decimal|int/ig.test(col.datatype)) { |
| | |
| | | }) |
| | | |
| | | if (window.debugger) { |
| | | console.info('select ' + s.join(', ')) |
| | | window.mkInfo('select ' + s.join(', ')) |
| | | } |
| | | |
| | | let extend = '' |
| | |
| | | cols.forEach(col => { |
| | | if (col.type === 'extend') { |
| | | let datatype = 'Nvarchar(50)' |
| | | columns.forEach(c => { |
| | | _columns.forEach(c => { |
| | | if (c.field === col.field) { |
| | | datatype = c.datatype |
| | | } |
| | |
| | | addProcess = () => { |
| | | const { config } = this.props |
| | | const { columns } = this.state |
| | | |
| | | if (config.subtype === 'dualdatacard') return |
| | | |
| | | let fields = [] |
| | | let cols = [] |