| | |
| | | let param = { |
| | | func: 's_debug_sql', |
| | | exec_type: 'y', |
| | | LText: res.dataSource |
| | | LText: `declare @mk_organization nvarchar(512) |
| | | ${res.dataSource}` |
| | | } |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | |
| | | let param = { |
| | | func: 's_debug_sql', |
| | | exec_type: 'y', |
| | | LText: res.dataSource |
| | | LText: `declare @mk_organization nvarchar(512) |
| | | ${res.dataSource}` |
| | | } |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | |
| | | let param = { |
| | | func: 's_debug_sql', |
| | | exec_type: 'y', |
| | | LText: res.dataSource |
| | | LText: `declare @mk_organization nvarchar(512) |
| | | ${res.dataSource}` |
| | | } |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | |
| | | ) |
| | | } else if (item.key === 'sql' || item.key === 'sheet') { |
| | | rules.push( |
| | | { pattern: /^[a-zA-Z@_]+$/, message: '表名只可使用字母以及_' }, |
| | | { pattern: /^[a-zA-Z0-9@_]+$/, message: '表名只可使用字母、数字以及_' }, |
| | | { max: formRule.func.max, message: formRule.func.maxMessage } |
| | | ) |
| | | } else if (item.key === 'outerFunc' || item.key === 'callbackFunc') { |
| | |
| | | message: '表名最长为50个字符!' |
| | | }, |
| | | { |
| | | pattern: /^[a-zA-Z@_]+$/, |
| | | message: '表名只可使用字母以及_' |
| | | pattern: /^[a-zA-Z0-9@_]+$/, |
| | | message: '表名只可使用字母、数字以及_' |
| | | } |
| | | ] |
| | | })(<Input placeholder={''} autoComplete="off" />)} |
| | |
| | | let param = { |
| | | func: 's_debug_sql', |
| | | exec_type: 'y', |
| | | LText: res.dataSource |
| | | LText: `declare @mk_organization nvarchar(512) |
| | | ${res.dataSource}` |
| | | } |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | |
| | | let param = { |
| | | func: 's_debug_sql', |
| | | exec_type: 'y', |
| | | LText: res.dataSource |
| | | LText: `declare @mk_organization nvarchar(512) |
| | | ${res.dataSource}` |
| | | } |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | |
| | | render() { |
| | | const { config, loading, BID, BData, data, group, dict } = this.state |
| | | |
| | | if (config.setting.supModule && !BID) return null |
| | | |
| | | return ( |
| | | <div className="custom-simple-form-box" id={'anchor' + config.uuid} style={{...config.style}}> |
| | | {loading ? |
| | |
| | | render() { |
| | | const { config, loading, BID, BData, data, group, dict, step } = this.state |
| | | |
| | | if (config.setting.supModule && !BID) return null |
| | | |
| | | return ( |
| | | <div className="custom-normal-form-box" id={'anchor' + config.uuid} style={{...config.style}}> |
| | | {loading ? |
| | |
| | | render() { |
| | | const { config, loading, BID, BData, data, group, dict } = this.state |
| | | |
| | | if (config.setting.supModule && !BID) return null |
| | | |
| | | return ( |
| | | <div className="custom-tab-form-box" id={'anchor' + config.uuid} style={{...config.style}}> |
| | | {loading ? |
| | |
| | | group.subButton.syncComponentId = '' |
| | | } |
| | | |
| | | let _sql = `Declare @mk_organization nvarchar(512) select @mk_organization='${sessionStorage.getItem('organization') || ''}'\n` |
| | | let _sso = _sql |
| | | let _local = _sql |
| | | |
| | | group.fields = group.fields.map(cell => { |
| | | // 数据源sql语句,预处理,权限黑名单字段设置为隐藏表单 |
| | | if (['select', 'link', 'multiselect', 'radio', 'checkbox', 'checkcard'].includes(cell.type) && cell.resourceType === '1') { |
| | | let _option = Utils.getSelectQueryOptions(cell) |
| | | |
| | | if (cell.database === 'sso') { |
| | | cell.data_sql = Utils.formatOptions(_sso + _option.sql) |
| | | _sso = '' |
| | | } else { |
| | | cell.data_sql = Utils.formatOptions(_local + _option.sql) |
| | | _local = '' |
| | | } |
| | | |
| | | cell.data_sql = Utils.formatOptions(_option.sql) |
| | | cell.base_sql = window.btoa(window.encodeURIComponent(_option.sql)) |
| | | cell.base_sql = window.btoa(window.encodeURIComponent(_sql + _option.sql)) |
| | | cell.arr_field = _option.field |
| | | } |
| | | |
| | |
| | | group.subButton.syncComponentId = '' |
| | | } |
| | | |
| | | let _sql = `Declare @mk_organization nvarchar(512) select @mk_organization='${sessionStorage.getItem('organization') || ''}'\n` |
| | | let _sso = _sql |
| | | let _local = _sql |
| | | |
| | | group.fields = group.fields.map(cell => { |
| | | // 数据源sql语句,预处理,权限黑名单字段设置为隐藏表单 |
| | | if (['select', 'link', 'multiselect', 'radio', 'checkbox', 'checkcard'].includes(cell.type) && cell.resourceType === '1') { |
| | | let _option = Utils.getSelectQueryOptions(cell) |
| | | |
| | | cell.data_sql = Utils.formatOptions(_option.sql) |
| | | cell.base_sql = window.btoa(window.encodeURIComponent(_option.sql)) |
| | | if (cell.database === 'sso') { |
| | | cell.data_sql = Utils.formatOptions(_sso + _option.sql) |
| | | _sso = '' |
| | | } else { |
| | | cell.data_sql = Utils.formatOptions(_local + _option.sql) |
| | | _local = '' |
| | | } |
| | | |
| | | cell.base_sql = window.btoa(window.encodeURIComponent(_sql + _option.sql)) |
| | | cell.arr_field = _option.field |
| | | } |
| | | |
| | |
| | | |
| | | handleModelConfig = (config) => { |
| | | let roleId = sessionStorage.getItem('role_id') || '' // 角色ID |
| | | let _sql = `Declare @mk_organization nvarchar(512) select @mk_organization='${sessionStorage.getItem('organization') || ''}'\n` |
| | | let _sso = _sql |
| | | let _local = _sql |
| | | config.fields = config.fields.map(cell => { |
| | | // 数据源sql语句,预处理,权限黑名单字段设置为隐藏表单 |
| | | if (['select', 'link', 'multiselect', 'radio', 'checkbox', 'checkcard'].includes(cell.type) && cell.resourceType === '1') { |
| | | let _option = Utils.getSelectQueryOptions(cell) |
| | | |
| | | cell.data_sql = Utils.formatOptions(_option.sql) |
| | | cell.base_sql = window.btoa(window.encodeURIComponent(_option.sql)) |
| | | if (cell.database === 'sso') { |
| | | cell.data_sql = Utils.formatOptions(_sso + _option.sql) |
| | | _sso = '' |
| | | } else { |
| | | cell.data_sql = Utils.formatOptions(_local + _option.sql) |
| | | _local = '' |
| | | } |
| | | |
| | | cell.base_sql = window.btoa(window.encodeURIComponent(_sql + _option.sql)) |
| | | cell.arr_field = _option.field |
| | | } |
| | | |
| | |
| | | |
| | | handleModelConfig = (config) => { |
| | | let roleId = sessionStorage.getItem('role_id') || '' // 角色ID |
| | | let _sql = `Declare @mk_organization nvarchar(512) select @mk_organization='${sessionStorage.getItem('organization') || ''}'\n` |
| | | let _sso = _sql |
| | | let _local = _sql |
| | | config.fields = config.fields.map(cell => { |
| | | // 数据源sql语句,预处理,权限黑名单字段设置为隐藏表单 |
| | | if (['select', 'link', 'multiselect', 'radio', 'checkbox', 'checkcard'].includes(cell.type) && cell.resourceType === '1') { |
| | | let _option = Utils.getSelectQueryOptions(cell) |
| | | |
| | | cell.data_sql = Utils.formatOptions(_option.sql) |
| | | cell.base_sql = window.btoa(window.encodeURIComponent(_option.sql)) |
| | | if (cell.database === 'sso') { |
| | | cell.data_sql = Utils.formatOptions(_sso + _option.sql) |
| | | _sso = '' |
| | | } else { |
| | | cell.data_sql = Utils.formatOptions(_local + _option.sql) |
| | | _local = '' |
| | | } |
| | | |
| | | cell.base_sql = window.btoa(window.encodeURIComponent(_sql + _option.sql)) |
| | | cell.arr_field = _option.field |
| | | } |
| | | |
| | |
| | | localItems.push(`select '${item.field}' as obj_name,'${item.arr_field}' as arr_field,'${item.base_sql}' as LText`) |
| | | } |
| | | }) |
| | | |
| | | if (!window.GLOB.mkHS && options.sysType !== 'local') { |
| | | localItems = [...localItems, ...mainItems] |
| | | mainItems = [] |
| | | } |
| | | |
| | | // 本地请求 |
| | | let param = { |
| | |
| | | let param = { |
| | | func: 's_debug_sql', |
| | | exec_type: 'y', |
| | | LText: res.dataSource |
| | | LText: `declare @mk_organization nvarchar(512) |
| | | ${res.dataSource}` |
| | | } |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | |
| | | let param = { |
| | | func: 's_debug_sql', |
| | | exec_type: 'y', |
| | | LText: res.dataSource |
| | | LText: `declare @mk_organization nvarchar(512) |
| | | ${res.dataSource}` |
| | | } |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | |
| | | ) |
| | | } else if (item.key === 'sql' || item.key === 'sheet') { |
| | | rules.push( |
| | | { pattern: /^[a-zA-Z@_]+$/, message: '表名只可使用字母以及_' }, |
| | | { pattern: /^[a-zA-Z0-9@_]+$/, message: '表名只可使用字母、数字以及_' }, |
| | | { max: formRule.func.max, message: formRule.func.maxMessage } |
| | | ) |
| | | } else if (item.key === 'outerFunc' || item.key === 'callbackFunc') { |
| | |
| | | message: '表名最长为50个字符!' |
| | | }, |
| | | { |
| | | pattern: /^[a-zA-Z@_]+$/, |
| | | message: '表名只可使用字母以及_' |
| | | pattern: /^[a-zA-Z0-9@_]+$/, |
| | | message: '表名只可使用字母、数字以及_' |
| | | } |
| | | ] |
| | | })(<Input placeholder={''} autoComplete="off" />)} |
| | |
| | | component.cols = getColumns(component.cols) |
| | | } |
| | | |
| | | if (component.wrap.datatype === 'static') { |
| | | if (component.wrap && component.wrap.datatype === 'static') { |
| | | component.format = '' |
| | | } |
| | | |
| | |
| | | return image |
| | | } |
| | | |
| | | chartToImage(canvas) { |
| | | let image = new Image() |
| | | image.src = canvas.toDataURL('image/jpg') |
| | | image.style = `width:100%;height:${canvas.style.height || '100%'};` |
| | | return image |
| | | } |
| | | |
| | | print = () => { |
| | | const { config, printing } = this.state |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | let charts = document.getElementsByTagName('canvas') |
| | | |
| | | if (charts.length) { |
| | | for (let i = 0; i < charts.length; i++) { |
| | | let img = this.chartToImage(charts[i]) |
| | | let parentNode = charts[i].parentNode |
| | | |
| | | parentNode.append(img) |
| | | } |
| | | |
| | | while (charts[0]) { |
| | | charts[0].remove() |
| | | } |
| | | } |
| | | |
| | | let jubuData = document.getElementById('bill-print').innerHTML |
| | | |
| | | this.setState({printing: true}) |
| | |
| | | display: block; |
| | | } |
| | | } |
| | | .g2-tooltip { |
| | | display: none; |
| | | } |
| | | } |
| | | |
| | | .print-page { |