king
2023-11-19 0e5c395b974b187b4227ed86dac746131425052a
2023-11-19
6个文件已修改
219 ■■■■ 已修改文件
src/assets/css/viewstyle.scss 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/options.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-bar/chartcompile/index.jsx 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-bar/index.jsx 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-bar-line/index.jsx 154 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/viewstyle.scss
@@ -41,6 +41,17 @@
        }
      }
    }
    .data-zoom.radio.deepBackFont, .data-zoom.checkbox.deepBackFont {
      .mk-card:hover, .mk-card.active, .mk-card.selected {
        > .card-item-box {
          border-color: $color6!important;
          background-color: $color6!important;
          .ant-mk-text:not(.sign-font) {
            color: #ffffff;
          }
        }
      }
    }
    .data-zoom.radio.font, .data-zoom.checkbox.font {
      .mk-card:hover, .mk-card.active, .mk-card.selected {
        > .card-item-box {
src/menu/components/card/data-card/options.jsx
@@ -267,7 +267,8 @@
      options: [
        {value: 'none', label: '无'},
        {value: 'active', label: '外阴影'},
        {value: 'backFont', label: '背景+文字'},
        {value: 'backFont', label: '背景(浅)+文字(深)'},
        {value: 'deepBackFont', label: '背景(深)+文字(浅)'},
        {value: 'font', label: '文字'},
        {value: 'tabs', label: '标签页'},
        ...(subtype === 'datacard' ? [
src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx
@@ -394,6 +394,9 @@
      }, {
        value: 'percent',
        text: '百分比'
      }, {
        value: 'thdSeparator',
        text: '千分位'
      }]
    }, {
      type: labelOptions.length > 20 ? 'select' : 'radio',
src/menu/components/chart/antv-bar/chartcompile/index.jsx
@@ -209,7 +209,7 @@
        ],
        render: (text, record) => {
          let trans = {'true': '显示', 'false': '隐藏'}
          return trans[text] || '隐藏'
          return trans[text] || ''
        }
      },
      {
@@ -237,10 +237,11 @@
        width: '12%',
        options: [
          { value: 'value', text: '数值'},
          { value: 'percent', text: '百分比'}
          { value: 'percent', text: '百分比'},
          { value: 'thdSeparator', text: '千分位'}
        ],
        render: (text, record) => {
          let trans = {'value': '数值', 'percent': '百分比'}
          let trans = {value: '数值', percent: '百分比', thdSeparator: '千分位'}
          return trans[text] || ''
        }
      },
@@ -249,6 +250,7 @@
        dataIndex: 'min',
        inputType: 'number',
        editable: true,
        max: 9999999999,
        required: false,
        width: '12%'
      },
@@ -257,6 +259,7 @@
        dataIndex: 'max',
        inputType: 'number',
        editable: true,
        max: 9999999999,
        required: false,
        width: '12%'
      },
@@ -647,8 +650,8 @@
            _plot.customs = []
            delete _plot.Yaxis
          } else if (!is(fromJS(values.Yaxis), fromJS(plot.Yaxis || []))) {
            _plot.enabled = 'false'
            _plot.colors = null
            // _plot.enabled = 'false'
            // _plot.colors = null
            let cus = {}
            _plot.customs && _plot.customs.forEach(m => {
@@ -662,7 +665,7 @@
                type: item,
                name: labels[item] || item,
                axis: i === 0 ? 'true' : 'false',
                label: 'false',
                label: _plot.label === 'false' ? 'false' : true,
                title: 'true',
                shape: _plot.chartType === 'bar' && i === 0 ? ['bar', 'rect'] : ['line', 'smooth']
              }
@@ -820,7 +823,7 @@
        <Modal
          wrapClassName="mk-pop-modal"
          visible={visible}
          width={1000}
          width={1100}
          maskClosable={false}
          onOk={this.onSubmit}
          onCancel={() => { this.setState({ visible: false }) }}
src/menu/components/chart/antv-bar/index.jsx
@@ -581,6 +581,29 @@
        fill: '#fff'
      }
    }
    let label = plot.label
    if (Bar_axis.length) {
      if (label === 'false') {
        plot.customs.forEach(item => {
          if (!Bar_axis.includes(item.type)) return
          if (item.label === 'true') {
            label = 'true'
          }
        })
      } else {
        let reset = true
        plot.customs.forEach(item => {
          if (!Bar_axis.includes(item.type)) return
          if (item.label === 'true') {
            reset = false
          }
        })
        if (reset) {
          label = 'false'
        }
      }
    }
    if (plot.label === 'top') {
      lablecfg.offset = -5
@@ -682,13 +705,13 @@
        } else {
          _chart.color('key')
        }
        if (plot.label !== 'false') {
        if (label !== 'false') {
          _chart.label('value*key', (value, key) => {
            if (plot.show === 'percent') {
              value = value + '%'
            }
            if (plot.label === 'true' && plot.labelColor === 'custom' && colors.has(key)) {
            if (label === 'true' && plot.labelColor === 'custom' && colors.has(key)) {
              lablecfg.style.fill = colors.get(key)
            }
            return {
@@ -733,13 +756,13 @@
        } else {
          _chart.color('key')
        }
        if (plot.label !== 'false') {
        if (label !== 'false') {
          _chart.label('value*key', (value, key) => {
            if (plot.show === 'percent') {
              value = value + '%'
            }
            if (plot.label === 'true' && plot.labelColor === 'custom' && colors.has(key)) {
            if (label === 'true' && plot.labelColor === 'custom' && colors.has(key)) {
              lablecfg.style.fill = colors.get(key)
            }
src/tabviews/custom/components/chart/antv-bar-line/index.jsx
@@ -134,6 +134,32 @@
      if (_config.plot.mutilBar !== 'overlap' && Bar_axis.length > 1) {
        _config.plot.Bar_axis = Bar_axis
      }
      if (_config.plot.Bar_axis && _config.plot.Bar_axis.length) {
        let label = _config.plot.label
        if (label === 'false') {
          _config.plot.customs.forEach(item => {
            if (!Bar_axis.includes(item.type)) return
            if (item.label === 'true') {
              label = 'true'
            }
          })
        } else {
          let reset = true
          _config.plot.customs.forEach(item => {
            if (!Bar_axis.includes(item.type)) return
            if (item.label === 'true') {
              reset = false
            }
          })
          if (reset) {
            label = 'false'
          }
        }
        _config.plot.$label = label
      }
    } else {
      _config.plot.enabled = 'false'
    }
@@ -1051,9 +1077,17 @@
      .position(`${plot.Xaxis}*${_valfield}`)
      .shape(plot.shape || 'smooth')
      .tooltip(`${plot.Xaxis}*${_valfield}*${_typefield}`, (name, value, type) => {
        let val = value
        if (plot.show === 'percent') {
          val = value + '%'
        } else if (plot.show === 'thdSeparator') {
          val = val + ''
          val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
        }
        return {
          name: type,
          value: plot.show === 'percent' ? value + '%' : value
          value: val
        }
      })
@@ -1078,11 +1112,15 @@
        if (plot.labelValue === 'zero' && value === 0) {
          return null
        }
        let val = value
        if (plot.show === 'percent') {
          value = value + '%'
          val = value + '%'
        } else if (plot.show === 'thdSeparator') {
          val = val + ''
          val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
        }
        return {
          content: value,
          content: val,
          style: {
            fill: plot.color
          }
@@ -1292,12 +1330,16 @@
          ])
          .shape(plot.shape || 'rect')
          .tooltip(`${plot.Xaxis}*value*key`, (name, value, key) => {
            let val = value
            if (plot.show === 'percent') {
              value = value + '%'
              val = value + '%'
            } else if (plot.show === 'thdSeparator') {
              val = val + ''
              val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
            }
            return {
              name: key,
              value: value
              value: val
            }
          })
@@ -1314,21 +1356,25 @@
        } else {
          _chart.color('key')
        }
        if (plot.label !== 'false') {
        if (plot.$label !== 'false') {
          _chart.label('value*key', (value, key) => {
            if (plot.labelValue === 'zero' && value === 0) {
              return null
            }
            let val = value
            if (plot.show === 'percent') {
              value = value + '%'
              val = value + '%'
            } else if (plot.show === 'thdSeparator') {
              val = val + ''
              val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
            }
            if (plot.label === 'true' && plot.labelColor === 'custom' && plot.$colors && plot.$colors.has(key)) {
            if (plot.$label === 'true' && plot.labelColor === 'custom' && plot.$colors && plot.$colors.has(key)) {
              lablecfg.style.fill = plot.$colors.get(key)
            }
            return {
              content: value,
              content: val,
              ...lablecfg
            }
          })
@@ -1347,12 +1393,16 @@
          .adjust('stack')
          .shape(plot.shape || 'rect')
          .tooltip(`${plot.Xaxis}*value*key`, (name, value, type) => {
            let val = value
            if (plot.show === 'percent') {
              value = value + '%'
              val = value + '%'
            } else if (plot.show === 'thdSeparator') {
              val = val + ''
              val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
            }
            return {
              name: type,
              value: value
              value: val
            }
          })
  
@@ -1369,20 +1419,24 @@
        } else {
          _chart.color('key')
        }
        if (plot.label !== 'false') {
        if (plot.$label !== 'false') {
          _chart.label('value*key', (value, key) => {
            if (plot.labelValue === 'zero' && value === 0) {
              return null
            }
            let val = value
            if (plot.show === 'percent') {
              value = value + '%'
              val = value + '%'
            } else if (plot.show === 'thdSeparator') {
              val = val + ''
              val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
            }
            if (plot.label === 'true' && plot.labelColor === 'custom' && plot.$colors && plot.$colors.has(key)) {
            if (plot.$label === 'true' && plot.labelColor === 'custom' && plot.$colors && plot.$colors.has(key)) {
              lablecfg.style.fill = plot.$colors.get(key)
            }
            return {
              content: value,
              content: val,
              ...lablecfg
            }
          })
@@ -1438,9 +1492,16 @@
          .color(item.color)
          .shape(item.shape)
          .tooltip(`${item.name}`, (value) => {
            let val = value
            if (item.show === 'percent') {
              val = value + '%'
            } else if (item.show === 'thdSeparator') {
              val = val + ''
              val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
            }
            return {
              name: item.name,
              value: item.show === 'percent' ? value + '%' : value
              value: val
            }
          })
@@ -1453,14 +1514,18 @@
              return null
            }
            let val = value
            if (item.show === 'percent') {
              value = value + '%'
              val = value + '%'
            } else if (item.show === 'thdSeparator') {
              val = val + ''
              val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
            }
            if (plot.label === 'true' && plot.labelColor === 'custom' && item.color) {
              lablecfg.style.fill = item.color
            }
            return {
              content: value,
              content: val,
              ...lablecfg
            }
          })
@@ -1493,9 +1558,17 @@
          .color(item.color)
          .shape(item.shape)
          .tooltip(`${item.name}`, (value) => {
            let val = value
            if (item.show === 'percent') {
              val = value + '%'
            } else if (item.show === 'thdSeparator') {
              val = val + ''
              val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
            }
            return {
              name: item.name,
              value: item.show === 'percent' ? value + '%' : value
              value: val
            }
          })
@@ -1505,11 +1578,16 @@
              return null
            }
            let val = value
            if (item.show === 'percent') {
              value = value + '%'
              val = value + '%'
            } else if (item.show === 'thdSeparator') {
              val = val + ''
              val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
            }
            return {
              content: value,
              content: val,
              style: {
                fill: plot.color
              }
@@ -1700,9 +1778,16 @@
        ])
        .shape(plot.shape || 'rect')
        .tooltip(`${plot.Xaxis}*${_valfield}*${_typefield}`, (name, value, type) => {
          let val = value
          if (plot.show === 'percent') {
            val = value + '%'
          } else if (plot.show === 'thdSeparator') {
            val = val + ''
            val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
          }
          return {
            name: type,
            value: plot.show === 'percent' ? value + '%' : value
            value: val
          }
        })
@@ -1739,8 +1824,12 @@
            return null
          }
          let val = value
          if (plot.show === 'percent') {
            value = value + '%'
            val = value + '%'
          } else if (plot.show === 'thdSeparator') {
            val = val + ''
            val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
          }
          if (plot.label === 'true' && plot.labelColor === 'custom' && plot.$colors && plot.$colors.has(key)) {
@@ -1748,7 +1837,7 @@
          }
          return {
            content: value,
            content: val,
            ...lablecfg
          }
        })
@@ -1776,9 +1865,16 @@
        .adjust('stack')
        .shape(plot.shape || 'rect')
        .tooltip(`${plot.Xaxis}*${_valfield}*${_typefield}`, (name, value, type) => {
          let val = value
          if (plot.show === 'percent') {
            val = value + '%'
          } else if (plot.show === 'thdSeparator') {
            val = val + ''
            val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
          }
          return {
            name: type,
            value: plot.show === 'percent' ? value + '%' : value
            value: val
          }
        })
@@ -1814,8 +1910,12 @@
            return null
          }
          let val = value
          if (plot.show === 'percent') {
            value = value + '%'
            val = value + '%'
          } else if (plot.show === 'thdSeparator') {
            val = val + ''
            val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
          }
          if (plot.label === 'true' && plot.labelColor === 'custom' && plot.$colors && plot.$colors.has(key)) {
@@ -1823,7 +1923,7 @@
          }
          return {
            content: value,
            content: val,
            ...lablecfg
          }
        })