king
2022-05-18 0011ec870d3d1fe9d77a4941358c84acf8632e5e
2022-05-18
7个文件已修改
93 ■■■■ 已修改文件
src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-bar/chartcompile/index.jsx 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-bar-line/index.jsx 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/share/normalTable/index.scss 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/edit-table/normalTable/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/option.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx
@@ -258,6 +258,8 @@
    }])
  }
  let _label = card.label || 'false'
  return [
    {
      type: 'radio',
@@ -389,7 +391,7 @@
      type: labelOptions.length > 20 ? 'select' : 'radio',
      key: 'label',
      label: '标注',
      initVal: card.label || 'false',
      initVal: _label,
      tooltip: '图形节点处的数值。',
      required: false,
      options: labelOptions
@@ -400,6 +402,7 @@
      initVal: card.labelColor || 'system',
      tooltip: '使用系统色时,使用色系选项设置的系统颜色,使用自定义为颜色设置中定义的图形颜色。',
      required: false,
      hidden: _label !== 'true',
      options: [{
        value: 'system',
        text: '系统'
@@ -407,20 +410,21 @@
        value: 'custom',
        text: '自定义'
      }]
    // }, {
    //   type: 'radio',
    //   key: 'offset',
    //   label: '标注位置',
    //   initVal: card.offset || 'outer',
    //   required: false,
    //   options: [{
    //     value: 'outer',
    //     text: '外部'
    //   }, {
    //     value: 'inner',
    //     text: '内部'
    //   }],
    //   forbid: card.chartType !== 'bar'
    }, {
      type: 'radio',
      key: 'labelValue',
      label: '标注值',
      initVal: card.labelValue || 'default',
      tooltip: '标注值的显示规则。',
      required: false,
      hidden: _label === 'false',
      options: [{
        value: 'default',
        text: '默认'
      }, {
        value: 'zero',
        text: '隐藏 0 值'
      }],
    }, {
      type: 'radio',
      key: 'adjust',
src/menu/components/chart/antv-bar/chartcompile/index.jsx
@@ -286,7 +286,7 @@
    if (key === 'datatype') {
      this.setState({
        datatype: val,
        formlist: formlist.map(item => {
        formlist: fromJS(formlist).toJS().map(item => {
          if (['Yaxis'].includes(item.key)) {
            item.hidden = val === 'statistics'
          } else if (['InfoType', 'InfoValue'].includes(item.key)) {
@@ -295,6 +295,26 @@
          return item
        })
      })
    } else if (key === 'label') {
      this.setState({formlist: fromJS(formlist).toJS().map(cell => {
        if (!['labelColor', 'labelValue'].includes(cell.key)) return cell
        if (cell.key === 'labelColor') {
          if (val !== 'true') {
            cell.hidden = true
          } else {
            cell.hidden = false
          }
        } else {
          if (val === 'false') {
            cell.hidden = true
          } else {
            cell.hidden = false
          }
        }
        return cell
      })})
    }
  }
src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx
@@ -261,7 +261,7 @@
    {
      type: 'radio',
      key: 'label',
      label: '标签',
      label: '标注',
      initVal: card.label || 'false',
      required: false,
      options: [{
src/tabviews/custom/components/chart/antv-bar-line/index.jsx
@@ -1018,6 +1018,9 @@
    }
    if (plot.label !== 'false') {
      _chart.label(_valfield, (value) => {
        if (plot.labelValue === 'zero' && value === 0) {
          return null
        }
        if (plot.show === 'percent') {
          value = value + '%'
        }
@@ -1253,6 +1256,10 @@
        }
        if (plot.label !== 'false') {
          _chart.label('value*key', (value, key) => {
            if (plot.labelValue === 'zero' && value === 0) {
              return null
            }
            if (plot.show === 'percent') {
              value = value + '%'
            }
@@ -1304,6 +1311,10 @@
        }
        if (plot.label !== 'false') {
          _chart.label('value*key', (value, key) => {
            if (plot.labelValue === 'zero' && value === 0) {
              return null
            }
            if (plot.show === 'percent') {
              value = value + '%'
            }
@@ -1371,6 +1382,10 @@
        }
        if (item.label !== 'false') {
          _chart.label(item.name, (value) => {
            if (plot.labelValue === 'zero' && value === 0) {
              return null
            }
            if (item.show === 'percent') {
              value = value + '%'
            }
@@ -1419,6 +1434,10 @@
        if (item.label === 'true') {
          _chart.label(item.name, (value) => {
            if (plot.labelValue === 'zero' && value === 0) {
              return null
            }
            if (item.show === 'percent') {
              value = value + '%'
            }
@@ -1624,6 +1643,10 @@
      }
      if (plot.label !== 'false') {
        _chart.label(`${_valfield}*${_typefield}`, (value, key) => {
          if (plot.labelValue === 'zero' && value === 0) {
            return null
          }
          if (plot.show === 'percent') {
            value = value + '%'
          }
@@ -1682,6 +1705,10 @@
      }
      if (plot.label !== 'false') {
        _chart.label(`${_valfield}*${_typefield}`, (value, key) => {
          if (plot.labelValue === 'zero' && value === 0) {
            return null
          }
          if (plot.show === 'percent') {
            value = value + '%'
          }
src/tabviews/custom/components/share/normalTable/index.scss
@@ -26,6 +26,8 @@
  .mk-disabled {
    color: #bcbcbc;
    cursor: not-allowed;
    --mk-table-color: #bcbcbc;
    .ant-btn {
      cursor: not-allowed;
    }
@@ -207,7 +209,7 @@
      font-size: var(--mk-table-font-size)!important;
      font-weight: var(--mk-table-font-weight)!important;
      >span, div:not(.card-cell-list), div:not(.card-cell-list) div, div:not(.card-cell-list) span {
      >span, >div:not(.card-cell-list) div, >div:not(.card-cell-list) span {
        font-weight: var(--mk-table-font-weight)!important;
      }
    }
src/tabviews/custom/components/table/edit-table/normalTable/index.scss
@@ -310,7 +310,7 @@
      font-size: var(--mk-table-font-size)!important;
      font-weight: var(--mk-table-font-weight)!important;
      >span, div:not(.card-cell-list), div:not(.card-cell-list) div, div:not(.card-cell-list) span {
      >span, >div:not(.card-cell-list) div, >div:not(.card-cell-list) span {
        font-weight: var(--mk-table-font-weight)!important;
      }
    }
src/utils/option.js
@@ -102,7 +102,7 @@
]
// 图表色系
export const chartColors = ['rgb(91, 143, 249)', 'rgb(90, 216, 166)', 'rgb(93, 112, 146)', 'rgb(246, 189, 22)', 'rgb(232, 100, 82)', 'rgb(109, 200, 236)', 'rgb(148, 95, 185)', 'rgb(246, 189, 22)', 'rgb(205, 221, 253)', 'rgb(248, 208, 203)']
export const chartColors = ['rgb(91, 143, 249)', 'rgb(90, 216, 166)', 'rgb(93, 112, 146)', 'rgb(246, 189, 22)', 'rgb(232, 100, 82)', 'rgb(109, 200, 236)', 'rgb(148, 95, 185)', 'rgb(205, 221, 253)', 'rgb(248, 208, 203)', 'rgb(145, 213, 255)', 'rgb(211, 173, 247)']
// 日期默认值选择范围
export const dateOptions = {