king
2020-12-30 1ed217be1abce1a1da18d90a1a9f358beef79acd
2020-12-30
11个文件已修改
307 ■■■■ 已修改文件
src/assets/css/viewstyle.scss 114 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/dragaction/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/normalheader/index.scss 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/columns/index.jsx 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/wrapsetting/settingform/index.jsx 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/wrapsetting/settingform/index.scss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/options.js 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/share/normalTable/index.jsx 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/share/normalTable/index.scss 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/billprint/index.jsx 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/billprint/index.scss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/viewstyle.scss
@@ -216,6 +216,30 @@
      }
    }
  }
  .custom-data-card-box, .custom-prop-card-box {
    .data-zoom.radio .card-row-list > .ant-col:not(.active):not(.selected):hover > .card-item-box, .data-zoom.checkbox .card-row-list > .ant-col:not(.active):not(.selected):hover > .card-item-box {
      border-color: $color4 !important;
      box-shadow: 0 0 4px $color4 !important;
    }
    .card-row-list.radio, .card-row-list.checkbox {
      >.ant-col:not(.active):not(.selected):hover {
        >.card-item-box {
          border-color: $color4!important;
          box-shadow: 0 0 4px $color4!important;
        }
      }
    }
    .card-row-list {
      >.active >.card-item-box {
        border-color: $color6!important;
        box-shadow: 0 0 4px $color6;
      }
      >.selected >.card-item-box {
        border-color: $color4!important;
        box-shadow: 0 0 4px $color4;
      }
    }
  }
  // 系统样式修改
  // .ant-select-dropdown-menu-item:hover:not(.ant-select-dropdown-menu-item-disabled) {
@@ -309,6 +333,15 @@
  --antd-wave-shadow-color: #f5222d;
  @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #fff1f0, #ffccc7, #ffa39e, #ff7875, #ff4d4f, #f5222d, #cf1322, #a8071a, #820014, #5c0011);
}
body.mk-orange-red-black {
  --antd-wave-shadow-color: #fa541c;
  @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65), #fff2e8, #ffd8bf, #ffbb96, #ff9c6e, #ff7a45, #fa541c, #d4380d, #ad2102, #871400, #610b00);
  @include bgblack();
}
body.mk-orange-red-white {
  --antd-wave-shadow-color: #fa541c;
  @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #fff2e8, #ffd8bf, #ffbb96, #ff9c6e, #ff7a45, #fa541c, #d4380d, #ad2102, #871400, #610b00);
}
body.mk-orange-black {
  --antd-wave-shadow-color: #fa8c16;
  @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65), #fff7e6, #ffe7ba, #ffd591, #ffc069, #ffa940, #fa8c16, #d46b08, #ad4e00, #873800, #612500);
@@ -318,3 +351,84 @@
  --antd-wave-shadow-color: #fa8c16;
  @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #fff7e6, #ffe7ba, #ffd591, #ffc069, #ffa940, #fa8c16, #d46b08, #ad4e00, #873800, #612500);
}
body.mk-orange-yellow-black {
  --antd-wave-shadow-color: #faad14;
  @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#fffbe6, #fff1b8, #ffe58f, #ffd666, #ffc53d, #faad14, #d48806, #ad6800, #874d00, #613400);
  @include bgblack();
}
body.mk-orange-yellow-white {
  --antd-wave-shadow-color: #faad14;
  @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #fffbe6, #fff1b8, #ffe58f, #ffd666, #ffc53d, #faad14, #d48806, #ad6800, #874d00, #613400);
}
body.mk-yellow-black {
  --antd-wave-shadow-color: #fadb14;
  @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#feffe6, #ffffb8, #fffb8f, #fff566, #ffec3d, #fadb14, #d4b106, #ad8b00, #876800, #614700);
  @include bgblack();
}
body.mk-yellow-white {
  --antd-wave-shadow-color: #fadb14;
  @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #feffe6, #ffffb8, #fffb8f, #fff566, #ffec3d, #fadb14, #d4b106, #ad8b00, #876800, #614700);
}
body.mk-yellow-green-black {
  --antd-wave-shadow-color: #a0d911;
  @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#fcffe6, #f4ffb8, #eaff8f, #d3f261, #bae637, #a0d911, #7cb305, #5b8c00, #3f6600, #254000);
  @include bgblack();
}
body.mk-yellow-green-white {
  --antd-wave-shadow-color: #a0d911;
  @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #fcffe6, #f4ffb8, #eaff8f, #d3f261, #bae637, #a0d911, #7cb305, #5b8c00, #3f6600, #254000);
}
body.mk-green-black {
  --antd-wave-shadow-color: #52c41a;
  @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#f6ffed, #d9f7be, #b7eb8f, #95de64, #73d13d, #52c41a, #389e0d, #237804, #135200, #092b00);
  @include bgblack();
}
body.mk-green-white {
  --antd-wave-shadow-color: #52c41a;
  @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #f6ffed, #d9f7be, #b7eb8f, #95de64, #73d13d, #52c41a, #389e0d, #237804, #135200, #092b00);
}
body.mk-cyan-black {
  --antd-wave-shadow-color: #13c2c2;
  @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#e6fffb, #b5f5ec, #87e8de, #5cdbd3, #36cfc9, #13c2c2, #08979c, #006d75, #00474f, #002329);
  @include bgblack();
}
body.mk-cyan-white {
  --antd-wave-shadow-color: #13c2c2;
  @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #e6fffb, #b5f5ec, #87e8de, #5cdbd3, #36cfc9, #13c2c2, #08979c, #006d75, #00474f, #002329);
}
body.mk-blue-purple-black {
  --antd-wave-shadow-color: #2f54eb;
  @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#f0f5ff, #d6e4ff, #adc6ff, #85a5ff, #597ef7, #2f54eb, #1d39c4, #10239e, #061178, #030852);
  @include bgblack();
}
body.mk-blue-purple-white {
  --antd-wave-shadow-color: #2f54eb;
  @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #f0f5ff, #d6e4ff, #adc6ff, #85a5ff, #597ef7, #2f54eb, #1d39c4, #10239e, #061178, #030852);
}
body.mk-purple-black {
  --antd-wave-shadow-color: #722ed1;
  @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#f9f0ff, #efdbff, #d3adf7, #b37feb, #9254de, #722ed1, #531dab, #391085, #22075e, #120338);
  @include bgblack();
}
body.mk-purple-white {
  --antd-wave-shadow-color: #722ed1;
  @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #f9f0ff, #efdbff, #d3adf7, #b37feb, #9254de, #722ed1, #531dab, #391085, #22075e, #120338);
}
body.mk-magenta-black {
  --antd-wave-shadow-color: #eb2f96;
  @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#fff0f6, #ffd6e7, #ffadd2, #ff85c0, #f759ab, #eb2f96, #c41d7f, #9e1068, #780650, #520339);
  @include bgblack();
}
body.mk-magenta-white {
  --antd-wave-shadow-color: #eb2f96;
  @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #fff0f6, #ffd6e7, #ffadd2, #ff85c0, #f759ab, #eb2f96, #c41d7f, #9e1068, #780650, #520339);
}
body.mk-grass-green-black {
  --antd-wave-shadow-color: #aeb303;
  @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#f2efda, #e6de97, #d9d26c, #ccc845, #bfbf22, #aeb303, #838c00, #5c6600, #374000, #151a00);
  @include bgblack();
}
body.mk-grass-green-white {
  --antd-wave-shadow-color: #aeb303;
  @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #f2efda, #e6de97, #d9d26c, #ccc845, #bfbf22, #aeb303, #838c00, #5c6600, #374000, #151a00);
}
src/menu/components/card/cardcellcomponent/dragaction/index.jsx
@@ -34,8 +34,9 @@
  }
  const copyCard = id => {
    const { card, index: overIndex } = findCard(id)
    const { card } = findCard(id)
    let copycard = fromJS(card).toJS()
    let _cards = fromJS(cards).toJS()
    copycard.uuid = Utils.getuuid()
    copycard.copyType = 'customCardElement'
@@ -59,7 +60,7 @@
      document.body.removeChild(oInput)
    }
    const _cards = update(cards, { $splice: [[overIndex + 1, 0, copycard]] })
    _cards.push(copycard)
    handleList(_cards)
    handleMenu(copycard)
src/menu/components/share/normalheader/index.scss
@@ -13,6 +13,8 @@
    margin-left: 10px;
    position: relative;
    z-index: 1;
    min-height: 45px;
    min-width: 30px;
  }
}
.normal-header.hidden {
src/menu/components/table/normal-table/columns/index.jsx
@@ -176,6 +176,7 @@
  state = {
    dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    tableId: '',
    data: [{uuid: Utils.getuuid()}],
    refresh: false,    // 强制刷新
    columns: [],
@@ -186,7 +187,24 @@
  UNSAFE_componentWillMount () {
    const { config } = this.props
    let tableId = (() => {
      let uuid = []
      let _options = 'abcdefghigklmnopqrstuv'
      for (let i = 0; i < 19; i++) {
        uuid.push(_options.substr(Math.floor(Math.random() * 0x20), 1))
      }
      return uuid.join('')
    }) ()
    if (config.wrap && config.wrap.borderColor) { // 边框颜色
      let style = `#${tableId} table, #${tableId} tr, #${tableId} th, #${tableId} td {border-color: ${config.wrap.borderColor}}`
      let ele = document.createElement('style')
      ele.innerHTML = style
      document.getElementsByTagName('head')[0].appendChild(ele)
    }
    this.setState({
      tableId,
      columns: fromJS(config.cols).toJS(),
      fields: fromJS(config.columns).toJS(),
      lineMarks: config.lineMarks ? fromJS(config.lineMarks).toJS() : []
@@ -203,6 +221,11 @@
      }
    } else if (!is(fromJS(this.state.fields), fromJS(nextProps.config.columns))) {
      this.setState({fields: fromJS(nextProps.config.columns).toJS()})
    } else if (this.props.config.wrap.borderColor !== nextProps.config.wrap.borderColor) {
      let style = `#${this.state.tableId} table, #${this.state.tableId} tr, #${this.state.tableId} th, #${this.state.tableId} td {border-color: ${nextProps.config.wrap.borderColor}}`
      let ele = document.createElement('style')
      ele.innerHTML = style
      document.getElementsByTagName('head')[0].appendChild(ele)
    }
  }
@@ -459,7 +482,7 @@
  render() {
    const { config } = this.props
    const { fields, card, lineMarks, dict } = this.state
    const { fields, card, lineMarks, dict, tableId } = this.state
    const components = {
      header: {
        cell: DragableHeaderCol
@@ -472,7 +495,7 @@
    const columns = this.handlecolumns(this.state.columns, fields, config)
    return (
      <div className={`normal-table-columns ${config.setting.laypage} ${config.wrap.tableType}`}>
      <div className={`normal-table-columns ${config.setting.laypage} ${config.wrap.tableType}`} id={tableId}>
        <div className="col-control">
          <Icon title="复制" type="copy" onClick={this.copycolumn} />
          <MarkColumn columns={fields} type="line" marks={lineMarks} onSubmit={this.updateLineMarks} />
src/menu/components/table/normal-table/wrapsetting/settingform/index.jsx
@@ -2,6 +2,7 @@
import PropTypes from 'prop-types'
import { Form, Row, Col, Input, Radio, Tooltip, Icon, InputNumber, Select } from 'antd'
import ColorSketch from '@/mob/colorsketch'
import './index.scss'
class SettingForm extends Component {
@@ -116,13 +117,39 @@
                  initialValue: wrap.bordered || 'true'
                })(
                  <Radio.Group style={{whiteSpace: 'nowrap'}}>
                    <Radio key="true" value={'true'}> 有 </Radio>
                    <Radio key="false" value={'false'}> 无 </Radio>
                    <Radio key="true" value="true"> 有 </Radio>
                    <Radio key="false" value="false"> 无 </Radio>
                  </Radio.Group>
                )}
              </Form.Item>
            </Col>
            <Col span={12}>
              <Form.Item label="表头">
                {getFieldDecorator('tableHeader', {
                  initialValue: wrap.tableHeader || 'show'
                })(
                  <Radio.Group style={{whiteSpace: 'nowrap'}}>
                    <Radio key="show" value="show"> 显示 </Radio>
                    <Radio key="hidden" value="hidden"> 隐藏 </Radio>
                  </Radio.Group>
                )}
              </Form.Item>
            </Col>
            <Col span={12}>
              <Form.Item label={
                <Tooltip placement="topLeft" title="默认值 #e8e8e8。">
                  <Icon type="question-circle" />
                  边框颜色
                </Tooltip>
              }>
                {getFieldDecorator('borderColor', {
                  initialValue: wrap.borderColor || '#e8e8e8'
                })(
                  <ColorSketch />
                )}
              </Form.Item>
            </Col>
            <Col span={12}>
              <Form.Item label={
                <Tooltip placement="topLeft" title="栅格布局,每行等分为24列。">
                  <Icon type="question-circle" />
src/menu/components/table/normal-table/wrapsetting/settingform/index.scss
@@ -8,4 +8,8 @@
  .ant-input-number {
    width: 100%;
  }
  .color-sketch-block {
    position: relative;
    top: 7px;
  }
}
src/store/options.js
@@ -9,7 +9,27 @@
    bg_white_style_blue: 'mk-blue-white',
    bg_black_style_red: 'mk-red-black',
    bg_white_style_red: 'mk-red-white',
    bg_black_style_orange_red: 'mk-orange-red-black',
    bg_white_style_orange_red: 'mk-orange-red-white',
    bg_black_style_orange: 'mk-orange-black',
    bg_white_style_orange: 'mk-orange-white',
    bg_black_style_orange_yellow: 'mk-orange-yellow-black',
    bg_white_style_orange_yellow: 'mk-orange-yellow-white',
    bg_black_style_yellow: 'mk-yellow-black',
    bg_white_style_yellow: 'mk-yellow-white',
    bg_black_style_yellow_green: 'mk-yellow-green-black',
    bg_white_style_yellow_green: 'mk-yellow-green-white',
    bg_black_style_green: 'mk-green-black',
    bg_white_style_green: 'mk-green-white',
    bg_black_style_cyan: 'mk-cyan-black',
    bg_white_style_cyan: 'mk-cyan-white',
    bg_black_style_blue_purple: 'mk-blue-purple-black',
    bg_white_style_blue_purple: 'mk-blue-purple-white',
    bg_black_style_purple: 'mk-purple-black',
    bg_white_style_purple: 'mk-purple-white',
    bg_black_style_magenta: 'mk-magenta-black',
    bg_white_style_magenta: 'mk-magenta-white',
    bg_black_style_grass_green: 'mk-grass-green-black',
    bg_white_style_grass_green: 'mk-grass-green-white',
  }
}
src/tabviews/custom/components/share/normalTable/index.jsx
@@ -381,6 +381,7 @@
  state = {
    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    tableId: '',          // 表格ID
    selectedRowKeys: [],  // 表格中选中行
    pageIndex: 1,         // 初始页面索引
    pageSize: 10,         // 每页数据条数
@@ -457,9 +458,26 @@
      rowspans = null
    }
    let tableId = (() => {
      let uuid = []
      let _options = 'abcdefghigklmnopqrstuv'
      for (let i = 0; i < 19; i++) {
        uuid.push(_options.substr(Math.floor(Math.random() * 0x20), 1))
      }
      return uuid.join('')
    }) ()
    if (setting.borderColor) { // 边框颜色
      let style = `#${tableId} table, #${tableId} tr, #${tableId} th, #${tableId} td {border-color: ${setting.borderColor}}`
      let ele = document.createElement('style')
      ele.innerHTML = style
      document.getElementsByTagName('head')[0].appendChild(ele)
    }
    this.setState({
      columns: _columns,
      rowspans,
      tableId,
      orderfields
    })
  }
@@ -733,7 +751,7 @@
  render() {
    const { setting, statFValue, lineMarks, data } = this.props
    const { selectedRowKeys, activeIndex, pickup } = this.state
    const { selectedRowKeys, activeIndex, pickup, tableId } = this.state
    // 设置表格选择属性:单选、多选、不可选
    let rowSelection = null
@@ -780,7 +798,7 @@
    }
    return (
      <div className="normal-custom-table">
      <div className={'normal-custom-table ' + setting.tableHeader} id={tableId}>
        {(setting.tableType === 'radio' || setting.tableType === 'checkbox') && data && data.length > 0 ?
          <Switch title="收起" className="main-pickup" checkedChildren="开" unCheckedChildren="关" defaultChecked={pickup} onChange={this.pickupChange} /> : null
        }
src/tabviews/custom/components/share/normalTable/index.scss
@@ -157,6 +157,11 @@
    }
  }
}
.normal-custom-table.hidden {
  thead {
    display: none;
  }
}
.image-scale-modal {
  width: 70vw;
  min-height: 80vh;
src/views/billprint/index.jsx
@@ -19,6 +19,8 @@
const AntvPie = asyncComponent(() => import('@/tabviews/custom/components/chart/antv-pie'))
const DataCard = asyncComponent(() => import('@/tabviews/custom/components/card/data-card'))
const PropCard = asyncComponent(() => import('@/tabviews/custom/components/card/prop-card'))
const TableCard = asyncComponent(() => import('@/tabviews/custom/components/card/table-card'))
const NormalTable = asyncComponent(() => import('@/tabviews/custom/components/table/normal-table'))
class BillPrint extends Component {
  state = {
@@ -145,7 +147,7 @@
        let params = []
        let _pars = []
        config.components = config.components.filter(item => !['tabs', 'search'].includes(item.type) && item.subtype !== 'tablecard')
        config.components = config.components.filter(item => !['tabs', 'search'].includes(item.type))
        config.components = config.components.map(component => {
          if (component.action) component.action = []
          if (component.search) component.search = []
@@ -381,29 +383,34 @@
        comps.forEach((_item, index) => {
          let item = fromJS(_item).toJS()
          if (index + 1 >= length && !_pageover) {
            pagesover = true
          }
          if (item.wrap && item.wrap.printType === 'headerOrfooter') { // 页眉页脚
            page.push(item)
          } else if (_pageover) {
            return
          } else if (item.type === 'card' && item.subtype === 'datacard') {
            if (!_item.dataArray || _item.dataArray.length === 0) return
          } else if (item.subtype === 'datacard' || item.type === 'table') {
            if (_item.dataArray && _item.dataArray.length > 0) {
              item.data = []
            item.data = []
            while (count < limit && _item.dataArray.length > 0) {
              item.data.push(_item.dataArray.shift())
              count++
              while (count < limit && _item.dataArray.length > 0) {
                item.data.push(_item.dataArray.shift())
                count++
              }
              if (count >= limit) {
                _pageover = true
              }
              page.push(item)
            }
            if (count >= limit) {
              _pageover = true
            }
            page.push(item)
          } else {
            page.push(item)
          }
          if (index + 1 === length && !_pageover) {
          if (index + 1 >= length && !_pageover) {
            pagesover = true
          }
        })
@@ -430,20 +437,20 @@
              page.push(item)
            } else if (_pageover) {
              return
            } else if (item.type === 'card' && item.subtype === 'datacard') {
              if (!_item.dataArray || _item.dataArray.length === 0) return
            } else if (item.subtype === 'datacard' || item.type === 'table') {
              if (_item.dataArray && _item.dataArray.length > 0) {
                item.data = []
  
              item.data = []
              while (count < limit && _item.dataArray.length > 0) {
                item.data.push(_item.dataArray.shift())
                count++
                while (count < limit && _item.dataArray.length > 0) {
                  item.data.push(_item.dataArray.shift())
                  count++
                }
                if (count >= limit) {
                  _pageover = true
                }
                page.push(item)
              }
              if (count >= limit) {
                _pageover = true
              }
              page.push(item)
            } else {
              page.push(item)
            }
@@ -457,7 +464,7 @@
        pages.push(page)
        pageIndex++
        if (pageIndex >= 2000 || pagesover) {
        if (pageIndex >= 200 || pagesover) {
          over = true
        }
      }
@@ -537,6 +544,18 @@
            <PropCard config={item} initdata={item.data} mainSearch={[]} menuType="" />
          </Col>
        )
      } else if (item.type === 'table' && item.subtype === 'tablecard') {
        return (
          <Col span={item.width} key={item.uuid}>
            <TableCard config={item} initdata={item.data} mainSearch={[]} menuType="" />
          </Col>
        )
      } else if (item.type === 'table' && item.subtype === 'normaltable') {
        return (
          <Col span={item.width} key={item.uuid}>
            <NormalTable config={item} initdata={item.data} mainSearch={[]} menuType="" />
          </Col>
        )
      } else {
        return null
      }
src/views/billprint/index.scss
@@ -22,3 +22,7 @@
    top: calc(40vh + 70px);
  }
}
.normal-custom-table .main-pickup {
  display: none!important;
}