king
2020-05-22 f25d46a5cfdc9cab3981e50255a5e82f72eba686
2020-05-22
12个文件已修改
110 ■■■■ 已修改文件
src/tabviews/commontable/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/cardcomponent/index.scss 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/chartcomponent/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/topSearch/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/cardcomponent/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/columncomponent/index.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/subtableconfig/index.jsx 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/editcomponent/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx
@@ -176,6 +176,7 @@
      // 视图权限
      config.charts = config.charts.filter(item => {
        if (item.Hide === 'true') return false
        if (!item.blacklist || item.blacklist.length === 0) return true
        let _black = item.blacklist.filter(v => {
src/tabviews/zshare/cardcomponent/index.scss
@@ -5,6 +5,9 @@
  .chart-card-box {
    padding: 0 10px;
    .anticon {
      margin-right: 0px;
    }
  }
  .chart-card-box:not(.ant-col) {
    display: inline-block;
@@ -19,6 +22,7 @@
        .ant-tabs-tab {
          margin: 0;
          padding: 12px 5px;
          cursor: default;
          .chart-card-box:not(.ant-col) {
            margin-bottom: 0px;
@@ -102,12 +106,11 @@
      margin: 0px;
      padding: 20px;
      position: relative;
      white-space: normal;
      .ant-card-meta-avatar {
        position: absolute;
        top: 0px;
        left: 0px;
        padding-top: 15px;
        padding-left: 15px;
        padding-top: 0px;
        padding-left: 0px;
      }
      .ant-avatar-image {
@@ -139,10 +142,25 @@
      }
      .ant-card-meta-detail > div {
        height: 23px;
        vertical-align: top;
      }
      .ant-card-meta-detail > div:not(:last-child) {
        margin-bottom: 2px;
      }
      .helf {
        display: inline-block;
        width: 50%;
      }
      .third {
        display: inline-block;
        width: 33.3%;
      }
      .align-center {
        text-align: center;
      }
      .align-right {
        text-align: right;
      }
    }
  }
src/tabviews/zshare/chartcomponent/index.scss
@@ -4,6 +4,6 @@
  .canvas {
    margin: 0 20px;
    border: 1px solid #e8e8e8;
    padding: 15px;
    padding: 25px 15px;
  }
}
src/tabviews/zshare/topSearch/index.jsx
@@ -216,7 +216,6 @@
              })(
                <Select
                  showSearch
                  // allowClear={true}
                  onChange={(value) => {this.selectChange(item, value)}}
                  filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                  getPopupContainer={() => document.getElementById(this.state.formId)}
src/templates/comtableconfig/index.jsx
@@ -1127,7 +1127,7 @@
      }
    })
    if (config.setting.interType === 'inner' && !config.setting.innerFunc && !config.setting.dataresource) {
    if (config.setting.interType === 'inner' && !config.setting.innerFunc && config.setting.default !== 'false' && !config.setting.dataresource) {
      return '菜单尚未设置数据源,不可启用!'
    } else if (!config.setting.primaryKey) {
      return '菜单尚未设置主键,不可启用!'
src/templates/sharecomponent/cardcomponent/index.scss
@@ -45,7 +45,7 @@
        color: #26C281;
        position: absolute;
        right: -15px;
        top: -5px;
        top: -15px;
        padding: 5px;
      }
src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx
@@ -279,6 +279,11 @@
          return item
        })
      })
      if (val === 'absolute') {
        this.props.form.setFieldsValue({cardWidth: 250})
      } else {
        this.props.form.setFieldsValue({cardWidth: 6})
      }
    } else if (key === 'over' && val === 'roll') {
      this.setState({
        formlist: formlist.map(item => {
@@ -293,7 +298,7 @@
        })
      })
      if (this.props.form.getFieldValue('widthType') !== undefined) {
        this.props.form.setFieldsValue({widthType: 'absolute'})
        this.props.form.setFieldsValue({widthType: 'absolute', cardWidth: 250})
      }
    } else if (key === 'over' && val === 'whole') {
      this.setState({
@@ -544,7 +549,7 @@
        <Row gutter={24}>{this.getFields()}</Row>
        {legends ? <Row gutter={24} className="chart-model-image">
          {legends.map(item => <Col span={6} key={item.uuid}>
            <img onClick={() => this.changeSelectLegend(item)} src={item.url} className={selectlegend.uuid === item.uuid ? 'active' : ''} alt=""/>
            <img onClick={() => this.changeSelectLegend(item)} src={item.url} className={selectlegend && selectlegend.uuid === item.uuid ? 'active' : ''} alt=""/>
          </Col>)}
        </Row> : null}
      </Form>
src/templates/sharecomponent/columncomponent/index.jsx
@@ -49,17 +49,21 @@
   * @description 监听到显示列复制时,触发显示列编辑
   */
  UNSAFE_componentWillReceiveProps (nextProps) {
    const { config } = this.props
    const { columnlist } = this.state
    if (
      nextProps.pasteContent &&
      columnlist.length === 0 &&
      nextProps.pasteContent.columns &&
      nextProps.pasteContent.copyType === 'columns' &&
      nextProps.pasteContent.columns.length > 0
    ) {
      this.setState({columnlist: nextProps.pasteContent.columns})
    } else if (!is(fromJS(nextProps.config.columns), fromJS(this.props.config.columns)) && !is(fromJS(nextProps.config.columns), fromJS(columnlist))) {
      if (columnlist.filter(col => !col.origin).length === 0) {
        this.setState({columnlist: nextProps.pasteContent.columns}, () => {
          this.props.updatecolumn({...config, columns: nextProps.pasteContent.columns})
        })
      }
    } else if (!is(fromJS(nextProps.config.columns), fromJS(config.columns)) && !is(fromJS(nextProps.config.columns), fromJS(columnlist))) {
      this.setState({columnlist: fromJS(nextProps.config.columns).toJS()})
    }
  }
src/templates/sharecomponent/settingcomponent/index.jsx
@@ -38,7 +38,7 @@
   */
  changeSetting = () => {
    const { menuformRef, MenuID, config, type, permFuncField, mainsearch } = this.props
    console.log(config)
    let menu = {MenuID: MenuID}
    if (menuformRef) {
@@ -64,7 +64,7 @@
      }
    })
    _columns.unshift({value: '', text: '未设置'})
    // _columns.unshift({value: '', text: '未设置'})
    let _config = fromJS(config).toJS()
src/templates/subtableconfig/index.jsx
@@ -299,9 +299,9 @@
      let _config = {...config, tabName: res.MenuName, tabNo: res.MenuNo, Remark: res.Remark}
      // 未设置数据源或主键时,启用状态为false
      if (_config.setting.interType === 'inner' && !_config.setting.innerFunc && !_config.setting.dataresource) {
        _config.enabled = false
      } else if (!_config.setting.primaryKey) {
      let result = this.verifyconfig(_config)
      if (result !== true) {
        _config.enabled = false
      }
@@ -894,22 +894,42 @@
  onEnabledChange = () => {
    const { config } = this.state
    if (config.setting.interType === 'inner' && !config.setting.innerFunc && !config.setting.dataresource) {
    let _enabled = !config.enabled
    let result = this.verifyconfig(config)
    if (_enabled && result !== true) {
      notification.warning({
        top: 92,
        message: '尚未设置数据源,不可启用!',
        message: result,
        duration: 5
      })
      return
    }
    this.setState({
      config: {...config, enabled: _enabled}
    })
  }
  /**
   * @description 校验配置信息的合法性
   */
  verifyconfig = (config) => {
    let charterr = ''
    config.charts.forEach(chart => {
      if (!charterr && ['line', 'bar', 'pie'].includes(chart.chartType) && !chart.Xaxis) {
        charterr = '图表' + (chart.title ? '《' + chart.title + '》' : '') + '坐标轴未设置,不可启用!'
      }
    })
    if (config.setting.interType === 'inner' && !config.setting.innerFunc && config.setting.default !== 'false' && !config.setting.dataresource) {
      return '菜单尚未设置数据源,不可启用!'
    } else if (!config.setting.primaryKey) {
      notification.warning({
        top: 92,
        message: '尚未设置主键,不可启用!',
        duration: 5
      })
      return '菜单尚未设置主键,不可启用!'
    } else if (charterr) {
      return charterr
    } else {
      this.setState({
        config: {...config, enabled: !config.enabled}
      })
      return true
    }
  }
src/templates/zshare/editcomponent/index.jsx
@@ -154,7 +154,8 @@
          })
        })
      } else if (res.copyType === 'columns') {
        if (config.columns && config.columns.length > 0) {
        let _columns = config.columns.filter(col => !col.origin)
        if (_columns.length > 0) {
          notification.warning({
            top: 92,
            message: '显示列已存在!',
src/templates/zshare/formconfig.jsx
@@ -2238,7 +2238,7 @@
      type: 'number',
      key: 'size',
      label: '字体大小',
      initVal: card.size || 14,
      initVal: card.size || 28,
      min: 12,
      max: 500,
      required: false,