king
2023-12-10 2682e38fcea26a70d3bac34c79931973b989eab5
2023-12-10
7个文件已修改
164 ■■■■ 已修改文件
src/components/normalform/modalform/index.jsx 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/normalform/modalform/index.scss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx 114 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-bar/chartcompile/index.jsx 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-bar/chartcompile/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/rolemanage/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/rolemanage/index.scss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/normalform/modalform/index.jsx
@@ -18,7 +18,8 @@
const MKCheckbox = asyncComponent(() => import('./mkCheckbox'))
const StyleInput = asyncComponent(() => import('./styleInput'))
const MKFileUpload = asyncComponent(() => import('@/tabviews/zshare/fileupload'))
const MKColor = asyncComponent(() => import('@/tabviews/zshare/mutilform/mkColor'))
const MKColor = asyncComponent(() => import('@/mob/colorsketch'))
// const MKColor = asyncComponent(() => import('@/tabviews/zshare/mutilform/mkColor'))
const MkEditIcon = asyncComponent(() => import('@/components/mkIcon'))
const SourceComponent = asyncComponent(() => import('@/menu/components/share/sourcecomponent'))
@@ -110,7 +111,7 @@
      let supItem = fieldMap.get(key)
      let supval = supItem.initval
      if (supItem.initval && supItem.type !== 'checkbox' && supItem.type !== 'multiselect' && JSON.stringify(supItem.initval) === '[]') {
      if (supval && JSON.stringify(supval) === '[]') {
        supval = ''
      }
@@ -126,13 +127,13 @@
        } else if (supItem.hidden) {
          cell.hidden = true
        } else if (item.notNull) {
          cell.hidden = !supval
        } else if (supItem.type === 'checkbox' || supItem.type === 'multiselect') {
          let vals = [...supval, ...item.values]
          let vals = [...(supval || []), ...item.values]
          if (vals.length === new Set(vals).size) {
            cell.hidden = true
          }
        } else if (item.notNull) {
          cell.hidden = !supval
        } else if (!item.values.includes(supval)) {
          cell.hidden = true
        }
@@ -196,7 +197,7 @@
      let reset = (current) => {
        let val = this.record[current.field]
        if (val && current.type !== 'checkbox' && current.type !== 'multiselect' && JSON.stringify(val) === '[]') {
        if (val && JSON.stringify(val) === '[]') {
          val = ''
        }
@@ -205,15 +206,15 @@
          if (current.hidden) {
            m.hidden = true
          } else if (cell.notNull) {
            m.hidden = !val
          } else if (current.type === 'checkbox' || current.type === 'multiselect') {
            let vals = [...val, ...cell.values]
            let vals = [...(val || []), ...cell.values]
            if (vals.length !== new Set(vals).size) {
              m.hidden = false
            } else {
              m.hidden = true
            }
          } else if (cell.notNull) {
            m.hidden = !val
          } else {
            m.hidden = !cell.values.includes(val)
          }
@@ -287,7 +288,7 @@
      } else if (item.type === 'select' || item.type === 'multiselect') {
        content = (<MKSelect config={item} onChange={(val, other) => this.recordChange({[item.field]: val, ...other}, item)} />)
      } else if (item.type === 'color') {
        content = (<MKColor config={item} onChange={(val) => this.recordChange({[item.field]: val})}/>)
        content = (<MKColor config={item} allowClear={item.allowClear} onChange={(val) => this.recordChange({[item.field]: val})}/>)
      } else if (item.type === 'styleInput') {
        content = (<StyleInput config={item} onChange={(val) => this.recordChange({[item.field]: val})}/>)
      } else if (item.type === 'radio') {
src/components/normalform/modalform/index.scss
@@ -42,6 +42,7 @@
    overflow: hidden;
    .color-sketch-block-box {
      min-width: 50px;
      max-width: 100px;
      .color-sketch-block-inner {
        box-shadow: 0 0 0 1px rgba(0, 0, 0, .1) inset;
      }
src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx
@@ -273,6 +273,28 @@
    }])
  }
  let axis = []
  if (card.grid !== 'hidden') {
    axis.push('grid')
  }
  if (card.x_line !== 'hidden') {
    axis.push('x_line')
  }
  if (card.y_line !== 'hidden') {
    axis.push('y_line')
  }
  if (card.tick !== 'hidden') {
    axis.push('tick')
  }
  let tickVals = []
  if (card.x_label !== 'hidden') {
    tickVals.push('x_label')
  }
  if (card.y_label !== 'hidden') {
    tickVals.push('y_label')
  }
  return [
    {
      type: 'radio',
@@ -504,32 +526,70 @@
        label: '极坐标'
      }]
    }, {
      type: 'radio',
      field: 'grid',
      label: '网格线',
      initval: card.grid || 'show',
      type: 'checkbox',
      field: 'axis',
      label: '坐标轴',
      initval: axis,
      required: false,
      options: [{
        value: 'show',
        label: '显示'
        value: 'grid',
        label: '网格线'
      }, {
        value: 'hidden',
        label: '隐藏'
      }]
        value: 'x_line',
        label: 'X轴'
      }, {
        value: 'y_line',
        label: 'Y轴'
      }, {
        value: 'tick',
        label: '刻度线'
      }],
      controlFields: [
        {field: 'lineColor', notNull: true},
      ]
    }, {
      type: 'radio',
      field: 'y_line',
      label: 'y轴边线',
      initval: card.y_line || 'hidden',
      tooltip: '图形左侧或右侧的边线。',
      type: 'checkbox',
      field: 'tickVals',
      label: '刻度值',
      initval: tickVals,
      required: false,
      options: [{
        value: 'show',
        label: '显示'
        value: 'x_label',
        label: 'X轴'
      }, {
        value: 'hidden',
        label: '隐藏'
      }]
        value: 'y_label',
        label: 'Y轴'
      }],
      controlFields: [
        {field: 'color', notNull: true},
      ]
    // }, {
    //   type: 'radio',
    //   field: 'grid',
    //   label: '网格线',
    //   initval: card.grid || 'show',
    //   required: false,
    //   options: [{
    //     value: 'show',
    //     label: '显示'
    //   }, {
    //     value: 'hidden',
    //     label: '隐藏'
    //   }]
    // }, {
    //   type: 'radio',
    //   field: 'y_line',
    //   label: 'y轴边线',
    //   initval: card.y_line || 'hidden',
    //   tooltip: '图形左侧或右侧的边线。',
    //   required: false,
    //   options: [{
    //     value: 'show',
    //     label: '显示'
    //   }, {
    //     value: 'hidden',
    //     label: '隐藏'
    //   }]
    }, {
      type: 'radio',
      field: 'download',
@@ -602,17 +662,17 @@
      required: false
    }, {
      type: 'color',
      field: 'color',
      label: '刻度值颜色',
      initval: card.color || 'rgba(0, 0, 0, 0.65)',
      tooltip: '刻度值的文字颜色。',
      field: 'lineColor',
      label: '坐标轴颜色',
      initval: card.lineColor || '',
      tooltip: '坐标轴线的颜色,包括x轴、y轴、网格线、刻度线。',
      allowClear: true,
      required: false
    }, {
      type: 'color',
      field: 'lineColor',
      label: '轴线颜色',
      initval: card.lineColor,
      tooltip: '坐标轴线的颜色,包括x轴、y轴及网格线。',
      field: 'color',
      label: '刻度值颜色',
      initval: card.color || '',
      allowClear: true,
      required: false
    }, {
src/menu/components/chart/antv-bar/chartcompile/index.jsx
@@ -482,6 +482,22 @@
  resetPlot = (_plot) => {
    const { config } = this.props
    if (_plot.axis) {
      _plot.grid = _plot.axis.includes('grid') ? 'show' : 'hidden'
      _plot.x_line = _plot.axis.includes('x_line') ? 'show' : 'hidden'
      _plot.y_line = _plot.axis.includes('y_line') ? 'show' : 'hidden'
      _plot.tick = _plot.axis.includes('tick') ? 'show' : 'hidden'
      delete _plot.axis
    }
    if (_plot.tickVals) {
      _plot.x_label = _plot.tickVals.includes('x_label') ? 'show' : 'hidden'
      _plot.y_label = _plot.tickVals.includes('y_label') ? 'show' : 'hidden'
      delete _plot.tickVals
    }
    if (_plot.datatype === 'statistics') {
      _plot.enabled = 'false'
      _plot.customs = []
@@ -613,14 +629,14 @@
        <Modal
          wrapClassName="mk-pop-modal"
          visible={visible}
          width={1100}
          width={1200}
          maskClosable={false}
          onOk={this.onSubmit}
          onCancel={() => { this.setState({ visible: false }) }}
          destroyOnClose
        >
          {config.name ? <div className="mk-com-name">{config.name} - 编辑</div> : null}
          <Tabs activeKey={view} className="menu-chart-edit-box" onChange={this.changeTab}>
          <Tabs activeKey={view} className="menu-chart-line-edit-box" onChange={this.changeTab}>
            <TabPane tab="组件设置" key="base">
              <ModalForm formlist={baseFormlist} inputSubmit={this.onSubmit} wrappedComponentRef={(inst) => this.baseRef = inst}/>
            </TabPane>
src/menu/components/chart/antv-bar/chartcompile/index.scss
@@ -4,7 +4,7 @@
    color: #1890ff;
  }
}
.menu-chart-edit-box {
.menu-chart-line-edit-box {
  .ant-radio-wrapper {
    margin-right: 5px;
  }
src/views/rolemanage/index.jsx
@@ -51,7 +51,7 @@
        key: 'action',
        align: 'center',
        render: (text, record) => (
          <div>
          <div style={{minWidth: '125px'}}>
            {record.type !== 'none' ?
              <Button type="link" onClick={() => this.deleteMenu(record)} style={{color: '#ff4d4f'}}>删除</Button> :
              <Button type="link" onClick={() => {
src/views/rolemanage/index.scss
@@ -68,8 +68,8 @@
      border-radius: 4px;
    }
    .ant-table-tbody {
      > tr.ant-table-row-selected td {
        background: #bae7ff;
      td:nth-child(1), td:nth-child(2) {
        word-break: break-all;
      }
    }
  }