src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/menu/components/chart/antv-bar/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/tabviews/custom/components/chart/antv-bar-line/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/tabviews/custom/components/chart/antv-dashboard/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/tabviews/custom/components/chart/antv-pie/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/templates/zshare/verifycard/callbackcustomscript/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/utils/utils-custom.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx
@@ -432,7 +432,7 @@ required: false, options: labelOptions, controlFields: [ {field: 'labelColor', values: ['true']} {field: 'labelUnit', values: ['true', 'top', 'middle', 'bottom']} ] }, { type: 'radio', @@ -583,6 +583,13 @@ forbid: appType === 'mob', required: false }, { type: 'text', field: 'labelUnit', label: '标注单位', initval: card.labelUnit ||'', forbid: appType === 'mob', required: false }, { type: 'color', field: 'lineColor', label: '坐标轴颜色', src/menu/components/chart/antv-bar/index.jsx
@@ -337,6 +337,9 @@ if (plot.show === 'percent') { value = value + '%' } if (plot.labelUnit) { value = value + plot.labelUnit } let _color = color if (plot.labelColor === 'custom' && colors.has(key)) { @@ -720,6 +723,9 @@ if (plot.show === 'percent') { value = value + '%' } if (plot.labelUnit) { value = value + plot.labelUnit } if (label === 'true' && plot.labelColor === 'custom' && colors.has(key)) { lablecfg.style.fill = colors.get(key) @@ -770,6 +776,9 @@ _chart.label('value*key', (value, key) => { if (plot.show === 'percent') { value = value + '%' } if (plot.labelUnit) { value = value + plot.labelUnit } if (label === 'true' && plot.labelColor === 'custom' && colors.has(key)) { @@ -842,6 +851,9 @@ if (item.show === 'percent') { value = value + '%' } if (plot.labelUnit) { value = value + plot.labelUnit } if (plot.label === 'true' && plot.labelColor === 'custom') { lablecfg.style.fill = item.color @@ -884,6 +896,9 @@ _chart.label(item.name, (value) => { if (item.show === 'percent') { value = value + '%' } if (plot.labelUnit) { value = value + plot.labelUnit } let _color = color @@ -977,12 +992,31 @@ if (plot.grid === 'hidden') { yc.grid = null } if (plot.y_line === 'show') { if (plot.tick === 'hidden') { xc.tickLine = null } if (plot.x_line === 'hidden') { xc.line = null } if (plot.y_line === 'hidden') { yc.line = null } else { yc.line = {style: { stroke: '#D1D2CE' }} } if (plot.x_label === 'hidden') { xc.label = null } if (plot.y_label === 'hidden') { yc.label = null } if (plot.lineColor) { xc.tickLine = {style: { stroke: plot.lineColor }} xc.line = { style: { stroke: plot.lineColor } } if (xc.tickLine !== null) { xc.tickLine = {style: { stroke: plot.lineColor }} } if (xc.line !== null) { xc.line = { style: { stroke: plot.lineColor } } } if (yc.grid !== null) { yc.grid = { line: { style: { stroke: plot.lineColor } }} } @@ -1119,6 +1153,9 @@ if (plot.show === 'percent') { value = value + '%' } if (plot.labelUnit) { value = value + plot.labelUnit } if (plot.label === 'true' && plot.labelColor === 'custom' && colors.has(key)) { lablecfg.style.fill = colors.get(key) @@ -1180,6 +1217,9 @@ if (plot.show === 'percent') { value = value + '%' } if (plot.labelUnit) { value = value + plot.labelUnit } if (plot.label === 'true' && plot.labelColor === 'custom' && colors.has(key)) { lablecfg.style.fill = colors.get(key) src/tabviews/custom/components/chart/antv-bar-line/index.jsx
@@ -256,15 +256,35 @@ style: { fill: _config.plot.color } }} let yc = {label: { style: { fill: _config.plot.color } }} if (_config.plot.grid === 'hidden') { yc.grid = null } if (_config.plot.y_line === 'show') { if (_config.plot.tick === 'hidden') { xc.tickLine = null } if (_config.plot.x_line === 'hidden') { xc.line = null } if (_config.plot.y_line === 'hidden') { yc.line = null } else { yc.line = {style: { stroke: '#D1D2CE' }} } if (_config.plot.x_label === 'hidden') { xc.label = null } if (_config.plot.y_label === 'hidden') { yc.label = null } if (_config.plot.lineColor) { xc.tickLine = {style: { stroke: _config.plot.lineColor }} xc.line = { style: { stroke: _config.plot.lineColor } } if (xc.tickLine !== null) { xc.tickLine = {style: { stroke: _config.plot.lineColor }} } if (xc.line !== null) { xc.line = { style: { stroke: _config.plot.lineColor } } } if (yc.grid !== null) { yc.grid = { line: { style: { stroke: _config.plot.lineColor } }} } @@ -929,6 +949,9 @@ val = val + '' val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,') } if (plot.labelUnit) { val = val + plot.labelUnit } return { content: val, style: { @@ -1221,6 +1244,9 @@ val = val + '' val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,') } if (plot.labelUnit) { val = val + plot.labelUnit } if (plot.$label === 'true' && plot.labelColor === 'custom' && plot.$colors && plot.$colors.has(key)) { lablecfg.style.fill = plot.$colors.get(key) @@ -1283,6 +1309,9 @@ } else if (plot.show === 'thdSeparator') { val = val + '' val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,') } if (plot.labelUnit) { val = val + plot.labelUnit } if (plot.$label === 'true' && plot.labelColor === 'custom' && plot.$colors && plot.$colors.has(key)) { lablecfg.style.fill = plot.$colors.get(key) @@ -1380,6 +1409,9 @@ val = val + '' val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,') } if (plot.labelUnit) { val = val + plot.labelUnit } if (plot.label === 'true' && plot.labelColor === 'custom' && item.color) { lablecfg.style.fill = item.color } @@ -1446,6 +1478,9 @@ } else if (item.show === 'thdSeparator') { val = val + '' val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,') } if (plot.labelUnit) { val = val + plot.labelUnit } return { @@ -1694,6 +1729,9 @@ val = val + '' val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,') } if (plot.labelUnit) { val = val + plot.labelUnit } if (plot.label === 'true' && plot.labelColor === 'custom' && plot.$colors && plot.$colors.has(key)) { lablecfg.style.fill = plot.$colors.get(key) @@ -1780,6 +1818,9 @@ val = val + '' val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,') } if (plot.labelUnit) { val = val + plot.labelUnit } if (plot.label === 'true' && plot.labelColor === 'custom' && plot.$colors && plot.$colors.has(key)) { lablecfg.style.fill = plot.$colors.get(key) src/tabviews/custom/components/chart/antv-dashboard/index.jsx
@@ -3,7 +3,7 @@ import { is, fromJS } from 'immutable' import { Chart, registerShape } from '@antv/g2' import { Spin, notification, Modal } from 'antd' import { DownloadOutlined } from '@ant-design/icons' // import { DownloadOutlined } from '@ant-design/icons' import moment from 'moment' import Api from '@/api' @@ -731,7 +731,7 @@ } <NormalHeader config={config} /> <div className="canvas-wrap"> {config.plot.download === 'enable' && this.state.chart ? <DownloadOutlined onClick={this.downloadImage} className="system-color download"/> : null} {/* {config.plot.download === 'enable' && this.state.chart ? <DownloadOutlined onClick={this.downloadImage} className="system-color download"/> : null} */} <div className="canvas" id={this.state.chartId}></div> </div> </div> src/tabviews/custom/components/chart/antv-pie/index.jsx
@@ -4,7 +4,7 @@ import { Chart } from '@antv/g2' import DataSet, { DataView } from '@antv/data-set' import { Spin, Empty, notification, Modal } from 'antd' import { DownloadOutlined } from '@ant-design/icons' // import { DownloadOutlined } from '@ant-design/icons' import moment from 'moment' import Api from '@/api' @@ -916,7 +916,7 @@ } <NormalHeader config={config} BID={BID} refresh={this.refreshSearch} /> <div className="canvas-wrap"> {config.plot.download === 'enable' && this.state.chart && !empty ? <DownloadOutlined onClick={this.downloadImage} className="system-color download"/> : null} {/* {config.plot.download === 'enable' && this.state.chart && !empty ? <DownloadOutlined onClick={this.downloadImage} className="system-color download"/> : null} */} <div className={'canvas' + (empty ? ' empty' : '')} id={this.state.chartId}></div> </div> {empty ? <Empty description={false}/> : null} src/templates/zshare/verifycard/callbackcustomscript/index.jsx
@@ -57,6 +57,15 @@ } if (!err) { if (/^[\s\n]+$/.test(values.sql)) { notification.warning({ top: 92, message: '请输入sql!', duration: 5 }) return } values.uuid = editItem ? editItem.uuid : '' values.position = values.position || (editItem ? editItem.position : 'front') src/utils/utils-custom.js
@@ -1649,6 +1649,16 @@ if (card.$c_ds) { columns = card.columns.map(c => c.field) if (card.setting.primaryKey && !columns.includes(card.setting.primaryKey)) { let key = card.setting.primaryKey.toLowerCase() columns.forEach(f => { if (f.toLowerCase() === key) { card.setting.primaryKey = f } }) } if (card.setting.interType === 'system' && card.setting.execute !== 'false' && !card.setting.dataresource) { errors.push({ level: 0, detail: '未设置数据源!'}) } else if (card.setting.interType === 'system' && card.setting.execute === 'false' && card.scripts.filter(script => script.status !== 'false').length === 0) {