Merge branch 'master' into positec
| | |
| | | _dataresource = setting.dataresource || '' |
| | | } |
| | | |
| | | if (/\s/.test(_dataresource)) { |
| | | _dataresource = '(' + _dataresource + ') tb' |
| | | } |
| | | |
| | | // if (window.GLOB.funcs && window.GLOB.funcs.length > 0) { |
| | | // window.GLOB.funcs.forEach(item => { |
| | | // let reg = new RegExp('\\$ex@' + item.func_code + '@ex\\$', 'ig') |
| | |
| | | }) |
| | | } |
| | | |
| | | let custompage = false |
| | | |
| | | if (/order\s+by\s+sort_id\s*$/i.test(_dataresource)) { |
| | | custompage = true |
| | | } else if (/@pageSize@|@orderBy@|@mk_total/i.test(_dataresource + _customScript)) { |
| | | custompage = true |
| | | } |
| | | |
| | | if (/\s/.test(_dataresource)) { |
| | | _dataresource = '(' + _dataresource + ') tb' |
| | | } |
| | | |
| | | // 正则替换 |
| | | let custompage = /@pageSize@|@orderBy@|@mk_total/i.test(_dataresource + _customScript) |
| | | let _regoptions = getSearchRegs(searches) |
| | | |
| | | let _search = joinMainSearchkey(searches) |
| | |
| | | _search = '' |
| | | } |
| | | |
| | | let custompage = false |
| | | |
| | | if (/order\s+by\s+sort_id\s*$/i.test(_dataresource)) { |
| | | custompage = true |
| | | } else if (/@pageSize@|@orderBy@|@mk_total/i.test(_dataresource + _customScript)) { |
| | | custompage = true |
| | | } |
| | | |
| | | if (/\s/.test(_dataresource)) { |
| | | _dataresource = '(' + _dataresource + ') tb' |
| | | } |
| | | |
| | | item.setting.dataresource = _dataresource |
| | | item.setting.customScript = _customScript |
| | | |
| | | let custompage = /@pageSize@|@orderBy@|@mk_total/i.test(_dataresource + _customScript) |
| | | |
| | | if (_dataresource) { |
| | | if (custompage) { |
New file |
| | |
| | | import React, { Component } from 'react' |
| | | import { Modal, Button, Input, message } from 'antd' |
| | | import { CopyOutlined } from '@ant-design/icons' |
| | | |
| | | import './index.scss' |
| | | |
| | | const { TextArea } = Input |
| | | |
| | | class LowerText extends Component { |
| | | state = { |
| | | visible: false, |
| | | content: '' |
| | | } |
| | | |
| | | trigger = () => { |
| | | this.setState({ |
| | | visible: true, |
| | | content: '' |
| | | }) |
| | | } |
| | | |
| | | changeValue = (e) => { |
| | | this.setState({content: e.target.value.toLowerCase()}) |
| | | } |
| | | |
| | | copy = () => { |
| | | const { content } = this.state |
| | | |
| | | if (navigator.clipboard) { |
| | | navigator.clipboard.writeText(content) |
| | | } else { |
| | | let oInput = document.createElement('input') |
| | | oInput.value = content |
| | | document.body.appendChild(oInput) |
| | | oInput.select() |
| | | document.execCommand('Copy') |
| | | document.body.removeChild(oInput) |
| | | } |
| | | |
| | | message.success('复制成功。') |
| | | } |
| | | |
| | | render() { |
| | | const { visible, content } = this.state |
| | | |
| | | return ( |
| | | <> |
| | | <Button className="mk-border-yellow" onClick={this.trigger}>文本转小写</Button> |
| | | <Modal |
| | | title="文本转小写" |
| | | wrapClassName="lower-text-modal" |
| | | visible={visible} |
| | | width={850} |
| | | maskClosable={false} |
| | | centered={true} |
| | | onCancel={() => { this.setState({ visible: false })}} |
| | | footer={[ |
| | | <Button key="cancel" onClick={() => { this.setState({ visible: false })}}>关闭</Button> |
| | | ]} |
| | | destroyOnClose |
| | | > |
| | | <TextArea defaultValue="" autoFocus rows={7} onChange={this.changeValue}/> |
| | | <CopyOutlined onClick={this.copy}/> |
| | | <div className="lower-value">{content}</div> |
| | | </Modal> |
| | | </> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | export default LowerText |
New file |
| | |
| | | .lower-text-modal { |
| | | .ant-modal-body { |
| | | min-height: 150px; |
| | | |
| | | .anticon-copy { |
| | | float: right; |
| | | color: #52c41a; |
| | | position: relative; |
| | | top: 20px; |
| | | font-size: 16px; |
| | | } |
| | | .lower-value { |
| | | border: 1px solid #91d5ff; |
| | | height: 200px; |
| | | margin-top: 40px; |
| | | padding: 5px; |
| | | overflow-y: auto; |
| | | } |
| | | .lower-value::-webkit-scrollbar { |
| | | width: 8px; |
| | | } |
| | | .lower-value::-webkit-scrollbar-thumb { |
| | | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13); |
| | | background: rgba(0, 0, 0, 0.13); |
| | | border-radius: 5px; |
| | | } |
| | | .lower-value::-webkit-scrollbar-track { |
| | | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05); |
| | | border: 1px solid rgba(0, 0, 0, 0.07); |
| | | background: rgba(0, 0, 0, 0); |
| | | border-radius: 3px; |
| | | } |
| | | } |
| | | } |
| | |
| | | if (!component.setting.execute) { |
| | | component.setting.dataresource = '' |
| | | } |
| | | if (/\s/.test(component.setting.dataresource)) { |
| | | component.setting.dataresource = '(' + component.setting.dataresource + ') tb' |
| | | } |
| | | |
| | | if (sessionStorage.getItem('dataM') === 'true') { // 数据权限 |
| | | component.setting.dataresource = component.setting.dataresource.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'') |
| | |
| | | |
| | | component.setting.customScript = _customScript // 整理后自定义脚本 |
| | | component.setting.tailScript = _tailScript // 后置自定义脚本 |
| | | component.setting.custompage = false |
| | | |
| | | component.setting.custompage = /@pageSize@|@orderBy@|@mk_total/i.test(component.setting.dataresource + component.setting.customScript) |
| | | if (/order\s+by\s+sort_id\s*$/i.test(component.setting.dataresource)) { |
| | | component.setting.custompage = true |
| | | } else if (/@pageSize@|@orderBy@|@mk_total/i.test(component.setting.dataresource + component.setting.customScript)) { |
| | | component.setting.custompage = true |
| | | } |
| | | |
| | | if (/\s/.test(component.setting.dataresource)) { |
| | | component.setting.dataresource = '(' + component.setting.dataresource + ') tb' |
| | | } |
| | | |
| | | if (!component.setting.execute || component.setting.custompage) { |
| | | component.forbidLine = true |
| | |
| | | if (!item.setting.execute) { |
| | | item.setting.dataresource = '' |
| | | } |
| | | if (/\s/.test(item.setting.dataresource)) { |
| | | item.setting.dataresource = '(' + item.setting.dataresource + ') tb' |
| | | } |
| | | |
| | | if (sessionStorage.getItem('dataM') === 'true') { // 数据权限 |
| | | item.setting.dataresource = item.setting.dataresource.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'') |
| | |
| | | |
| | | item.setting.customScript = _customScript // 整理后自定义脚本 |
| | | item.setting.tailScript = _tailScript // 后置自定义脚本 |
| | | item.setting.custompage = false |
| | | |
| | | item.setting.custompage = /@pageSize@|@orderBy@|@mk_total/i.test(item.setting.dataresource + item.setting.customScript) |
| | | if (/order\s+by\s+sort_id\s*$/i.test(item.setting.dataresource)) { |
| | | item.setting.custompage = true |
| | | } else if (/@pageSize@|@orderBy@|@mk_total/i.test(item.setting.dataresource + item.setting.customScript)) { |
| | | item.setting.custompage = true |
| | | } |
| | | |
| | | if (/\s/.test(item.setting.dataresource)) { |
| | | item.setting.dataresource = '(' + item.setting.dataresource + ') tb' |
| | | } |
| | | |
| | | return item |
| | | } |
| | |
| | | if (!item.setting.execute) { |
| | | item.setting.dataresource = '' |
| | | } |
| | | if (/\s/.test(item.setting.dataresource)) { |
| | | item.setting.dataresource = '(' + item.setting.dataresource + ') tb' |
| | | } |
| | | |
| | | if (sessionStorage.getItem('dataM') === 'true') { // 数据权限 |
| | | item.setting.dataresource = item.setting.dataresource.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'') |
| | |
| | | item.setting.customScript = _customScript // 整理后自定义脚本 |
| | | item.setting.tailScript = _tailScript // 后置自定义脚本 |
| | | |
| | | item.setting.custompage = /@pageSize@|@orderBy@|@mk_total/i.test(item.setting.dataresource + item.setting.customScript) |
| | | item.setting.custompage = false |
| | | |
| | | if (item.setting.$tree) { |
| | | if (/order\s+by\s+sort_id\s*$/i.test(item.setting.dataresource)) { |
| | | item.setting.custompage = true |
| | | } else if (item.setting.$tree || /@pageSize@|@orderBy@|@mk_total/i.test(item.setting.dataresource + item.setting.customScript)) { |
| | | item.setting.custompage = true |
| | | } |
| | | |
| | | if (/\s/.test(item.setting.dataresource)) { |
| | | item.setting.dataresource = '(' + item.setting.dataresource + ') tb' |
| | | } |
| | | |
| | | if (!item.setting.execute || item.setting.custompage) { |
| | |
| | | if (!inter.setting.execute) { |
| | | inter.setting.dataresource = '' |
| | | } |
| | | if (/\s/.test(inter.setting.dataresource)) { |
| | | inter.setting.dataresource = '(' + inter.setting.dataresource + ') tb' |
| | | } |
| | | |
| | | if (sessionStorage.getItem('dataM') === 'true') { // 数据权限 |
| | | inter.setting.dataresource = inter.setting.dataresource.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'') |
| | |
| | | |
| | | inter.setting.customScript = _customScript // 整理后自定义脚本 |
| | | inter.setting.tailScript = _tailScript // 后置自定义脚本 |
| | | inter.setting.custompage = false |
| | | |
| | | inter.setting.custompage = /@pageSize@|@orderBy@|@mk_total/i.test(inter.setting.dataresource + inter.setting.customScript) |
| | | if (/order\s+by\s+sort_id\s*$/i.test(inter.setting.dataresource)) { |
| | | inter.setting.custompage = true |
| | | } else if (/@pageSize@|@orderBy@|@mk_total/i.test(inter.setting.dataresource + inter.setting.customScript)) { |
| | | inter.setting.custompage = true |
| | | } |
| | | |
| | | if (/\s/.test(inter.setting.dataresource)) { |
| | | inter.setting.dataresource = '(' + inter.setting.dataresource + ') tb' |
| | | } |
| | | |
| | | return inter |
| | | }) |
| | |
| | | if (!item.setting.execute) { |
| | | item.setting.dataresource = '' |
| | | } |
| | | if (/\s/.test(item.setting.dataresource)) { |
| | | item.setting.dataresource = '(' + item.setting.dataresource + ') tb' |
| | | } |
| | | |
| | | if (sessionStorage.getItem('dataM') === 'true') { // 数据权限 |
| | | item.setting.dataresource = item.setting.dataresource.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'') |
| | |
| | | |
| | | item.setting.customScript = _customScript // 整理后自定义脚本 |
| | | item.setting.tailScript = _tailScript // 后置自定义脚本 |
| | | item.setting.custompage = false |
| | | |
| | | item.setting.custompage = /@pageSize@|@orderBy@|@mk_total/i.test(item.setting.dataresource + item.setting.customScript) |
| | | |
| | | if (item.setting.$tree) { |
| | | if (/order\s+by\s+sort_id\s*$/i.test(item.setting.dataresource)) { |
| | | item.setting.custompage = true |
| | | } else if (item.setting.$tree || /@pageSize@|@orderBy@|@mk_total/i.test(item.setting.dataresource + item.setting.customScript)) { |
| | | item.setting.custompage = true |
| | | } |
| | | |
| | | if (/\s/.test(item.setting.dataresource)) { |
| | | item.setting.dataresource = '(' + item.setting.dataresource + ') tb' |
| | | } |
| | | |
| | | if (!item.setting.execute || item.setting.custompage) { |
| | |
| | | _setting.dataresource = '' |
| | | } |
| | | |
| | | if (/\s/.test(_setting.dataresource)) { |
| | | _setting.dataresource = '(' + _setting.dataresource + ') tb' |
| | | } |
| | | |
| | | let _customScript = '' |
| | | let _tailScript = '' |
| | | btn.verify.scripts && btn.verify.scripts.forEach(script => { |
| | |
| | | _setting.tailScript = _tailScript // 后置自定义脚本 |
| | | |
| | | _setting.laypage = pagination |
| | | _setting.custompage = /@pageSize@|@orderBy@|@mk_total/i.test(_setting.dataresource + _setting.customScript) |
| | | _setting.custompage = false |
| | | |
| | | if (/order\s+by\s+sort_id\s*$/i.test(_setting.dataresource)) { |
| | | _setting.custompage = true |
| | | } else if (/@pageSize@|@orderBy@|@mk_total/i.test(_setting.dataresource + _setting.customScript)) { |
| | | _setting.custompage = true |
| | | } |
| | | |
| | | if (/\s/.test(_setting.dataresource)) { |
| | | _setting.dataresource = '(' + _setting.dataresource + ') tb' |
| | | } |
| | | |
| | | _setting.queryType = btn.verify.queryType |
| | | _setting.$name = btn.logLabel |
| | |
| | | _dataresource = '' |
| | | } |
| | | |
| | | let custompage = false |
| | | |
| | | if (/order\s+by\s+sort_id\s*$/i.test(_dataresource)) { |
| | | custompage = true |
| | | } else if (/@pageSize@|@orderBy@|@mk_total/i.test(_dataresource + _customScript + _tailScript)) { |
| | | custompage = true |
| | | } |
| | | |
| | | let isDataM = sessionStorage.getItem('dataM') === 'true' |
| | | let custompage = /@pageSize@|@orderBy@|@mk_total/i.test(_dataresource + _customScript + _tailScript) |
| | | let regoptions = [ |
| | | { reg: /@orderBy@/ig, value: btn.verify.setting.order }, |
| | | { reg: /@pageSize@/ig, value: '9999' }, |
| | |
| | | editingKey: '', |
| | | visible: false, |
| | | columns: [{ |
| | | title: '名称', |
| | | title: window.GLOB.dict['name'] || '名称', |
| | | dataIndex: 'label', |
| | | width: '25%' |
| | | }, { |
| | | title: '快捷键', |
| | | title: window.GLOB.dict['shortcut'] || '快捷键', |
| | | dataIndex: 'shortcut', |
| | | inputType: 'cascader', |
| | | editable: true, |
| | |
| | | return text[0] + '+' + shortkeycode[text[1]] |
| | | } |
| | | }, { |
| | | title: '打印机', |
| | | title: window.GLOB.dict['printer'] || '打印机', |
| | | dataIndex: 'printer', |
| | | inputType: 'select', |
| | | editable: true, |
| | | options: [], |
| | | width: '25%' |
| | | }, { |
| | | title: '操作', |
| | | title: window.GLOB.dict['operation'] || '操作', |
| | | dataIndex: 'operation', |
| | | width: '140px', |
| | | render: (text, record) => { |
| | |
| | | width: '26.1%' |
| | | }, |
| | | { |
| | | title: '打印机', |
| | | title: window.GLOB.dict['printer'] || '打印机', |
| | | dataIndex: 'printer', |
| | | inputType: 'select', |
| | | editable: true, |
| | | options: [], |
| | | }, |
| | | { |
| | | title: '操作', |
| | | title: window.GLOB.dict['operation'] || '操作', |
| | | dataIndex: 'operation', |
| | | width: '153px', |
| | | render: (text, record) => { |
| | |
| | | components: null, // 组件集合 |
| | | revertLoading: false, // 恢复默认设置 |
| | | confirmLoading: false, // 自定义设置模态框加载中 |
| | | dict: window.GLOB.dict, |
| | | lang: sessionStorage.getItem('lang') |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { components, visible } = this.state |
| | | const { components, visible, dict, lang } = this.state |
| | | |
| | | if (window.GLOB.mkHS || window.GLOB.sysType !== 'local') return null |
| | | |
| | | return ( |
| | | <div className="tool-wrap"> |
| | | <Tooltip placement="left" title="自定义设置"> |
| | | <Tooltip placement="left" title={dict['custom_settings'] || '自定义设置'}> |
| | | <Button icon="setting" shape="circle" onClick={this.trigger}/> |
| | | </Tooltip> |
| | | <Modal |
| | | wrapClassName="custom-setting-modal" |
| | | title="自定义设置" |
| | | title={dict['custom_settings'] || '自定义设置'} |
| | | maskClosable={false} |
| | | width={950} |
| | | visible={visible} |
| | | onCancel={() => { this.setState({ visible: false }) }} |
| | | footer={[ |
| | | <Button key="revert" type="danger" loading={this.state.revertLoading} onClick={this.settingRevert}>恢复默认设置</Button>, |
| | | <Button key="cancel" onClick={() => { this.setState({ visible: false }) }}>取消</Button>, |
| | | <Button key="confirm" type="primary" loading={this.state.confirmLoading} onClick={this.settingSubmit}>提交</Button> |
| | | <Button key="revert" type="danger" loading={this.state.revertLoading} onClick={this.settingRevert}>{dict['restore_default'] || '恢复默认设置'}</Button>, |
| | | <Button key="cancel" onClick={() => { this.setState({ visible: false }) }}>{dict['cancel'] || '取消'}</Button>, |
| | | <Button key="confirm" type="primary" loading={this.state.confirmLoading} onClick={this.settingSubmit}>{dict['submit'] || '提交'}</Button> |
| | | ]} |
| | | destroyOnClose |
| | | > |
| | | <div className="tip">注:行级按钮快捷键设置无效。</div> |
| | | {lang !== 'en-US' ? <div className="tip">注:行级按钮快捷键设置无效。</div> : null} |
| | | {components && components.length > 0 ? components.map(item => ( |
| | | <div key={item.uuid}> |
| | | <p className="component-title">{item.title}</p> |
| | |
| | | _dataresource = '' |
| | | } |
| | | |
| | | let custompage = false |
| | | |
| | | if (/order\s+by\s+sort_id\s*$/i.test(_dataresource)) { |
| | | custompage = true |
| | | } else if (/@pageSize@|@orderBy@|@mk_total/i.test(_dataresource + _customScript)) { |
| | | custompage = true |
| | | } |
| | | |
| | | if (/\s/.test(_dataresource)) { |
| | | _dataresource = '(' + _dataresource + ') tb' |
| | | } |
| | | |
| | | let custompage = /@pageSize@|@orderBy@|@mk_total/i.test(_dataresource + _customScript) |
| | | |
| | | // 正则替换 |
| | | regoptions.push({ |
| | |
| | | if (setting.defaultSql === 'false') { |
| | | _dataresource = '' |
| | | } |
| | | |
| | | let custompage = false |
| | | |
| | | if (/order\s+by\s+sort_id\s*$/i.test(_dataresource)) { |
| | | custompage = true |
| | | } else if (/@pageSize@|@orderBy@|@mk_total/i.test(_dataresource + _customScript)) { |
| | | custompage = true |
| | | } |
| | | |
| | | if (/\s/.test(_dataresource)) { |
| | | _dataresource = '(' + _dataresource + ') tb' |
| | | } |
| | | |
| | | let custompage = /@pageSize@|@orderBy@|@mk_total/i.test(_dataresource + _customScript) |
| | | |
| | | // 正则替换 |
| | | let regoptions = [{ |
| | |
| | | } else if (item.type === 'group') { |
| | | traversal(item.components) |
| | | } else { |
| | | if (item.wrap && item.wrap.title) { |
| | | sql.push(item.wrap.title) |
| | | } |
| | | |
| | | if (item.setting && (!item.wrap || !item.wrap.datatype || item.wrap.datatype === 'dynamic')) { |
| | | if (item.setting.interType === 'system') { |
| | | filterSql(item.setting.dataresource) |
| | |
| | | text = text.filter(Boolean) |
| | | menu = menu.filter(Boolean) |
| | | |
| | | sql = sql.map(n => n.replace(/(:|:)$/g, '')) |
| | | |
| | | sql = Array.from(new Set(sql)) |
| | | btn = Array.from(new Set(btn)) |
| | | ops = Array.from(new Set(ops)) |
| | |
| | | export function setLangTrans (config, btnDict, titDict, lisDict, menuDict, regs, tail) { |
| | | let filterElement = (card) => { |
| | | if (card.datatype === 'static' && card.eleType === 'text' && !/@.+@/g.test(card.value)) { |
| | | if (card.value && titDict[card.value]) { |
| | | card.value = titDict[card.value] |
| | | if (card.value) { |
| | | card.value = replaceTitle(card.value) |
| | | } |
| | | } |
| | | if (card.prefix && titDict[card.prefix]) { |
| | | card.prefix = titDict[card.prefix] |
| | | if (card.prefix) { |
| | | card.prefix = replaceTitle(card.prefix) |
| | | } |
| | | if (card.postfix && titDict[card.postfix]) { |
| | | card.postfix = titDict[card.postfix] |
| | | if (card.postfix) { |
| | | card.postfix = replaceTitle(card.postfix) |
| | | } |
| | | } |
| | | |
| | | let replaceTitle = (val) => { |
| | | if (/(:|:)$/g.test(val)) { |
| | | let _val = val.replace(/(:|:)$/g, '') |
| | | if (titDict[_val]) { |
| | | val = titDict[_val] + val.substr(-1) |
| | | } else if (titDict[val]) { |
| | | val = titDict[val] |
| | | } |
| | | } else if (titDict[val]) { |
| | | val = titDict[val] |
| | | } |
| | | |
| | | return val |
| | | } |
| | | |
| | | let getuuid = () => { |
| | |
| | | } |
| | | |
| | | let filterForm = (n) => { |
| | | if (n.label && titDict[n.label]) { |
| | | n.label = titDict[n.label] |
| | | if (n.label) { |
| | | n.label = replaceTitle(n.label) |
| | | } |
| | | if (n.resourceType === '1') { |
| | | n.dataSource = filterSql(n.dataSource) |
| | |
| | | components.forEach(item => { |
| | | if (item.type === 'tabs') { |
| | | item.subtabs.forEach(tab => { |
| | | if (tab.label && titDict[tab.label]) { |
| | | tab.label = titDict[tab.label] |
| | | if (tab.label) { |
| | | tab.label = replaceTitle(tab.label) |
| | | } |
| | | traversal(tab.components) |
| | | }) |
| | | } else if (item.type === 'group') { |
| | | traversal(item.components) |
| | | } else { |
| | | if (item.wrap && item.wrap.title) { |
| | | item.wrap.title = replaceTitle(item.wrap.title) |
| | | } |
| | | if (item.wrap && (item.wrap.click === 'menu' || item.wrap.click === 'menus')) { |
| | | if (item.wrap.click === 'menu') { |
| | | resetMenu(item.wrap) |
| | |
| | | |
| | | if (item.columns) { |
| | | item.columns.forEach(cell => { |
| | | if (cell.label && titDict[cell.label]) { |
| | | cell.label = titDict[cell.label] |
| | | if (cell.label) { |
| | | cell.label = replaceTitle(cell.label) |
| | | } |
| | | }) |
| | | } |
| | |
| | | } else if (item.type === 'table') { |
| | | let loopCol = (cols) => { |
| | | cols.forEach(col => { |
| | | if (col.label && titDict[col.label]) { |
| | | col.label = titDict[col.label] |
| | | if (col.label) { |
| | | col.label = replaceTitle(col.label) |
| | | } |
| | | if (col.prefix && titDict[col.prefix]) { |
| | | col.prefix = titDict[col.prefix] |
| | | if (col.prefix) { |
| | | col.prefix = replaceTitle(col.prefix) |
| | | } |
| | | if (col.postfix && titDict[col.postfix]) { |
| | | col.postfix = titDict[col.postfix] |
| | | if (col.postfix) { |
| | | col.postfix = replaceTitle(col.postfix) |
| | | } |
| | | if (col.type === 'colspan') { |
| | | loopCol(col.subcols) |
| | |
| | | // } |
| | | |
| | | let _search = '' |
| | | |
| | | if (item.setting.execute !== 'false') { |
| | | _dataresource = item.setting.dataresource || '' |
| | | _search = '@mk_search@' |
| | |
| | | _search = '' |
| | | } |
| | | |
| | | let custompage = false |
| | | let testSql = _dataresource + _customScript + _tailScript |
| | | |
| | | if (/order\s+by\s+sort_id\s*$/i.test(_dataresource)) { |
| | | custompage = true |
| | | } else if (/@pageSize@|@orderBy@|@mk_total/i.test(testSql)) { |
| | | custompage = true |
| | | } |
| | | |
| | | if (/\s/.test(_dataresource) && !/\)\s+tb$/.test(_dataresource)) { |
| | | _dataresource = '(' + _dataresource + ') tb' |
| | | } |
| | | |
| | | item.setting.dataresource = _dataresource |
| | | item.setting.customScript = _customScript |
| | | |
| | | let testSql = _dataresource + _customScript + _tailScript |
| | | |
| | | let decSql = [`@ErrorCode nvarchar(50),@retmsg nvarchar(4000)`] |
| | | let secSql = [`@ErrorCode='S',@retmsg =''`] |
| | |
| | | let DateCount = '' |
| | | if (_dataresource) { |
| | | /*system_query*/ |
| | | if (/@pageSize@|@orderBy@|@mk_total/i.test(testSql) || (item.wrap && item.wrap.tree === 'true')) { |
| | | if (custompage || (item.wrap && item.wrap.tree === 'true')) { |
| | | LText = `select ${arr_field} from ${_dataresource} ${_search} ` |
| | | } else if (item.setting.laypage === 'true' && item.setting.order) { |
| | | LText = `select top @pageSize@ ${arr_field} from (select ${arr_field} ,ROW_NUMBER() over(order by @orderBy@) as rows from ${_dataresource} ${_search}) tmptable where rows > @pageSize@ * (@pageIndex@ - 1) order by tmptable.rows ` |
| | |
| | | const ReplaceField = asyncComponent(() => import('@/menu/replaceField')) |
| | | const DelExtraDb = asyncComponent(() => import('@/menu/delExtraDb')) |
| | | const LowerField = asyncComponent(() => import('@/menu/lowerField')) |
| | | const LowerText = asyncComponent(() => import('@/menu/lowerText')) |
| | | const Debug = asyncComponent(() => import('@/menu/debug')) |
| | | const NormalCss = asyncComponent(() => import('@/menu/normalCss')) |
| | | const NormalCopy = asyncComponent(() => import('@/menu/normalCopy')) |
| | |
| | | <ReplaceField config={config} updateConfig={this.resetConfig}/> |
| | | <LowerField config={config} updateConfig={this.resetConfig}/> |
| | | <DelExtraDb config={config} updateConfig={this.resetConfig}/> |
| | | <LowerText /> |
| | | <PictureController/> |
| | | <Button onClick={() => window.open('#/ai')}>DeepSeek</Button> |
| | | </div>} trigger={['hover']}> |
| | |
| | | const ReplaceField = asyncComponent(() => import('@/menu/replaceField')) |
| | | const DelExtraDb = asyncComponent(() => import('@/menu/delExtraDb')) |
| | | const LowerField = asyncComponent(() => import('@/menu/lowerField')) |
| | | const LowerText = asyncComponent(() => import('@/menu/lowerText')) |
| | | const Debug = asyncComponent(() => import('@/menu/debug')) |
| | | const Versions = asyncComponent(() => import('@/menu/versions')) |
| | | const Transfer = asyncComponent(() => import('@/menu/transfer')) |
| | |
| | | <ReplaceField config={config} updateConfig={this.resetConfig}/> |
| | | <LowerField config={config} updateConfig={this.resetConfig}/> |
| | | <DelExtraDb config={config} updateConfig={this.resetConfig}/> |
| | | <LowerText /> |
| | | <Button onClick={() => window.open('#/ai')}>DeepSeek</Button> |
| | | </div>} trigger={['hover']}> |
| | | <div className="mk-button-more">更多<DownOutlined/></div> |