king
2020-11-12 f830c733cbc071f023c9a9a4e1571b7c81d672bf
2020-11-12
33个文件已修改
754 ■■■■ 已修改文件
src/components/404/index.scss 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/actioncomponent/verifyprint/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/wrapsetting/settingform/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-bar/chartcompile/index.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-bar/index.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-pie/chartcompile/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-pie/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/settingform/index.jsx 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/modelsource/option.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/cardcellList/index.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/data-card/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/prop-card/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/table-card/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-bar-line/index.jsx 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-pie/index.jsx 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.jsx 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtabtable/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/newpagebutton/index.jsx 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/chartcomponent/index.jsx 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/index.jsx 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/chartcomponent/chartcompile/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/chartcomponent/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/chartgroupcomponent/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/createinterface/index.jsx 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/billprint/index.jsx 207 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/billprint/index.scss 173 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/404/index.scss
@@ -1,6 +1,11 @@
.box404 {
  max-height: calc(100vh - 110px);
  text-align: center;
  .ant-result-title {
    font-size: 18px;
    color: #1890ff;
  }
}
.ant-tabs-tabpane {
  >.box404 {
src/index.js
@@ -1,7 +1,7 @@
import React from 'react'
import ReactDOM from 'react-dom'
import Route from './router'
import {Provider} from 'react-redux'
import { Provider } from 'react-redux'
import store from '@/store'
import * as serviceWorker from './serviceWorker'
import options from '@/store/options.js'
src/menu/actioncomponent/verifyprint/index.jsx
@@ -47,9 +47,9 @@
  componentDidMount() {
    let _sql = `select PrintTempNO,Images,PrintTempNO+PrintTempName as PN from sPrintTemplate 
    where appkey= @appkey@ and Deleted=0
    union select ID,Images,a.PrintTempNO+PrintTempName as PN
    from (select * from sPrintTemplate where appkey= '' and Deleted=0 ) a
    where appkey= @appkey@ and Deleted=0 and typechartwo=''
    union select a.PrintTempNO,Images,a.PrintTempNO+PrintTempName as PN
    from (select * from sPrintTemplate where appkey= '' and Deleted=0 and typechartwo='') a
    left join (select PrintTempNO from sPrintTemplate where appkey= @appkey@ and Deleted=0 ) b 
    on a.PrintTempNO=b.PrintTempNO 
    left join (select Srcid from sPrintTemplate_Log where appkey='' and apicode= @appkey@ and Deleted=0 ) c 
src/menu/components/card/data-card/wrapsetting/settingform/index.jsx
@@ -172,7 +172,7 @@
                })(<InputNumber min={100} max={2000} precision={0} onPressEnter={this.handleSubmit} />)}
              </Form.Item>
            </Col> : null}
            <Col span={12}>
            {MenuType !== 'billPrint' ? <Col span={12}>
              <Form.Item label="黑名单">
                {getFieldDecorator('blacklist', {
                  initialValue: wrap.blacklist || []
@@ -188,7 +188,7 @@
                  </Select>
                )}
              </Form.Item>
            </Col>
            </Col> : null}
          </Row>
        </Form>
      </div>
src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx
@@ -8,7 +8,7 @@
 * @param {object} card       // 图表对象
 * @param {Array}  columns    // 显示列
 */
export function getBarOrLineChartOptionForm (card, columns, sysRoles = []) {
export function getBarOrLineChartOptionForm (card, columns, sysRoles = [], MenuType) {
  let shapes = []
  let _sysRoles = sysRoles.map(item => ({...item, field: item.value, label: item.text}))
@@ -279,13 +279,13 @@
      required: true
    }, {
      type: 'number',
      key: 'correction',
      label: '数据修正',
      tooltip: '当数据项少于设置值时,系统会自动修正(避免柱形图过宽),在自定义中,设置为折线图时失效。',
      key: 'barSize',
      label: '柱形宽度',
      tooltip: '空值时,宽度自适应。',
      min: 5,
      max: 30,
      max: 100,
      decimal: 0,
      initVal: card.correction,
      initVal: card.barSize,
      forbid: !['bar'].includes(card.chartType),
      required: false
    }, {
@@ -309,6 +309,7 @@
      initVal: card.blacklist || [],
      multi: true,
      required: false,
      forbid: MenuType === 'billPrint',
      options: _sysRoles
    }
  ]
src/menu/components/chart/antv-bar/chartcompile/index.jsx
@@ -12,6 +12,7 @@
class LineChartDrawerForm extends Component {
  static propTpyes = {
    MenuType: PropTypes.any,
    dict: PropTypes.object,
    plot: PropTypes.object,
    sysRoles: PropTypes.array,
@@ -67,7 +68,7 @@
  }
  showDrawer = () => {
    const { config, sysRoles } = this.props
    const { config, sysRoles, MenuType } = this.props
    let fieldName = {}
    config.columns.forEach(col => {
@@ -76,13 +77,18 @@
      }
    })
    if (config.plot.correction) {
      delete config.plot.correction // 数据修正(已弃用)
      config.plot.barSize = 35
    }
    this.setState({
      visible: true,
      view: 'normal',
      disabled: config.plot.datatype === 'statistics',
      fieldName: fieldName,
      plot: fromJS(config.plot).toJS(),
      formlist: getBarOrLineChartOptionForm(config.plot, config.columns, sysRoles)
      formlist: getBarOrLineChartOptionForm(config.plot, config.columns, sysRoles, MenuType)
    })
  }
src/menu/components/chart/antv-bar/index.jsx
@@ -44,6 +44,7 @@
        customs: [],
        width: 24,
        height: 400,
        barSize: 35,
        name: card.name
      }
@@ -601,6 +602,10 @@
        if (plot.label === 'true') {
          _chart.label('value')
        }
        if (plot.barSize || plot.correction) {
          _chart.size(plot.barSize || 35)
        }
      } else if (plot.adjust === 'stack') {
        let _chart = chart
          .interval()
@@ -611,6 +616,10 @@
  
        if (plot.label === 'true') {
          _chart.label('value')
        }
        if (plot.barSize || plot.correction) {
          _chart.size(plot.barSize || 35)
        }
      }
  
@@ -750,7 +759,7 @@
          <div className="mk-popover-control">
            {menu && menu.MenuType !== 'billPrint' ? <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" /> : null}
            {menu && menu.MenuType !== 'billPrint' ? <Icon className="plus" title="添加按钮" onClick={this.addButton} type="plus-square" /> : null}
            {menu ? <ChartCompileForm config={card} sysRoles={menu.sysRoles} dict={this.state.dict} plotchange={this.updateComponent}/> : null}
            {menu ? <ChartCompileForm config={card} sysRoles={menu.sysRoles} MenuType={menu.MenuType} dict={this.state.dict} plotchange={this.updateComponent}/> : null}
            <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" />
            <Icon className="close" title="delete" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} />
            <SettingComponent config={card} updateConfig={this.updateComponent}/>
src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx
@@ -8,7 +8,7 @@
 * @param {object} card       // 图表对象
 * @param {Array}  columns    // 显示列
 */
export function getPieChartOptionForm (card, columns, sysRoles = []) {
export function getPieChartOptionForm (card, columns, sysRoles = [], MenuType) {
  let xfields = columns.filter(item => /^Nvarchar/ig.test(item.datatype))
  let yfields = columns.filter(item => /^(Int|Decimal)/ig.test(item.datatype))
  let _sysRoles = sysRoles.map(item => ({...item, field: item.value, label: item.text}))
@@ -204,6 +204,7 @@
      initVal: card.blacklist || [],
      multi: true,
      required: false,
      forbid: MenuType === 'billPrint',
      options: _sysRoles
    }
  ]
src/menu/components/chart/antv-pie/chartcompile/index.jsx
@@ -9,6 +9,7 @@
class LineChartDrawerForm extends Component {
  static propTpyes = {
    MenuType: PropTypes.any,
    dict: PropTypes.object,
    plot: PropTypes.object,
    sysRoles: PropTypes.array,
@@ -23,12 +24,12 @@
  }
  showDrawer = () => {
    const { config, sysRoles } = this.props
    const { config, sysRoles, MenuType } = this.props
    this.setState({
      visible: true,
      plot: fromJS(config.plot).toJS(),
      formlist: getPieChartOptionForm(config.plot, config.columns, sysRoles)
      formlist: getPieChartOptionForm(config.plot, config.columns, sysRoles, MenuType)
    })
  }
src/menu/components/chart/antv-pie/index.jsx
@@ -426,7 +426,7 @@
        <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
          <div className="mk-popover-control">
            {menu && menu.MenuType !== 'billPrint' ? <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" /> : null}
            {menu ? <ChartCompileForm config={card} sysRoles={menu.sysRoles} dict={this.state.dict} plotchange={this.updateComponent}/> : null}
            {menu ? <ChartCompileForm config={card} sysRoles={menu.sysRoles} MenuType={menu.MenuType} dict={this.state.dict} plotchange={this.updateComponent}/> : null}
            <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" />
            <Icon className="close" title="delete" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} />
            <SettingComponent config={card} updateConfig={this.updateComponent}/>
src/menu/datasource/verifycard/settingform/index.jsx
@@ -22,7 +22,8 @@
    interType: this.props.setting.interType || 'system',
    laypage: this.props.setting.laypage || 'true',
    modules: [],
    useMSearch: this.props.setting.useMSearch || 'false'
    useMSearch: this.props.setting.useMSearch || 'false',
    supModule: this.props.setting.supModule || []
  }
  UNSAFE_componentWillMount () {
@@ -172,10 +173,14 @@
    }
  }
  changeSupModule = (val) => {
    this.setState({supModule: val})
  }
  render() {
    const { setting, menu, columns, config } = this.props
    const { getFieldDecorator } = this.props.form
    const { interType, modules, useMSearch, laypage } = this.state
    const { interType, modules, useMSearch, laypage, supModule } = this.state
    const formItemLayout = {
      labelCol: {
@@ -377,7 +382,7 @@
                </Tooltip>
              }>
                {getFieldDecorator('supModule', {
                  initialValue: setting.supModule || [],
                  initialValue: supModule,
                  rules: [
                    {
                      required: true,
@@ -385,7 +390,7 @@
                    }
                  ]
                })(
                  <Cascader options={modules} expandTrigger="hover" placeholder="" />
                  <Cascader options={modules} onChange={this.changeSupModule} expandTrigger="hover" placeholder="" />
                )}
              </Form.Item>
            </Col> : null}
@@ -419,7 +424,8 @@
                })(<InputNumber min={1} max={500} precision={0} />)}
              </Form.Item>
            </Col> : null}
            {!config.pageable || (config.pageable && laypage === 'false') ? <Col span={8}>
            {/* 1、不分页且不存在上级模块 2、打印时 */}
            {((!config.pageable || (config.pageable && laypage === 'false')) && (!supModule || supModule.length === 0 || supModule[0] === 'empty')) || menu.MenuType === 'billPrint' ? <Col span={8}>
              <Form.Item label={
                <Tooltip placement="topLeft" title={'初始化加载时,是否与其他组件一同加载数据,注:仅在使用系统函数,且初始化加载数据时有效,分页请求时无效。'}>
                  <Icon type="question-circle" />
src/menu/modelsource/option.jsx
@@ -21,7 +21,7 @@
  { type: 'menu', url: Mainsearch, component: 'search', subtype: 'mainsearch', title: '搜索条件', width: 24, forbid: ['billPrint'] },
  { type: 'menu', url: card1, component: 'card', subtype: 'datacard', title: '数据卡', config: `[{"uuid":"160135809128212dm7i29fim9ksto9od","setting":{"width":6},"style":{"paddingTop":"15px","marginTop":"4px","paddingRight":"15px","marginRight":"8px","marginLeft":"8px","backgroundColor":"rgba(255, 255, 255, 1)","borderColor":"#e8e8e8","paddingLeft":"15px","marginBottom":"4px","borderWidth":"1px","paddingBottom":"10px"},"backStyle":{},"elements":[{"datatype":"static","width":12,"marks":null,"height":1,"value":"关单","style":{},"prefix":"","postfix":"","format":"","eleType":"text","uuid":"160231860159931untbea62sgokunc5s"},{"datatype":"dynamic","width":12,"marks":null,"style":{"color":"rgba(250, 219, 20, 1)","textAlign":"right"},"btnstyle":{},"eleType":"icon","icon":"question-circle","field":"nvarchar2","uuid":"1602318768361nv8ql4t47sgcsn88b0u"},{"datatype":"static","width":24,"marks":null,"height":1,"innerHeight":36,"value":"100","style":{"fontSize":"24px","fontWeight":"500","color":"rgba(0, 0, 0, 1)"},"prefix":"","btnstyle":{},"postfix":"","format":"","eleType":"text","uuid":"1602318817884v70gtgb65ubnm8mbcvv"},{"color":"#1890ff","width":24,"marks":null,"maxValue":100,"style":{"color":"rgba(250, 140, 22, 1)","paddingTop":"20px","paddingBottom":"10px"},"btnstyle":{},"eleType":"slider","field":"int1","uuid":"16023188871233rkktuvpp1h077igrsu"},{"eleType":"splitline","width":24,"color":"#e8e8e8","uuid":"1602320017038n31bk9o831ggug0tu0b","marks":null,"style":{"marginTop":"10px","marginBottom":"10px"},"btnstyle":{}},{"datatype":"static","width":12,"marks":null,"height":1,"value":"100","style":{"marginTop":"6px"},"prefix":"关单","btnstyle":{},"postfix":"","format":"","eleType":"text","uuid":"1602320061243drd7lf3agvn04kgr175"}],"backElements":[]}]` },
  { type: 'menu', url: card2, component: 'card', subtype: 'propcard', title: '属性卡', config: `[{"uuid":"1603681387259qaqf1127f72esmtchge","setting":{"width":6,"type":"simple"},"style":{"paddingTop":"15px","marginTop":"8px","paddingRight":"15px","marginRight":"8px","marginLeft":"8px","borderColor":"#e8e8e8","paddingLeft":"15px","marginBottom":"8px","borderWidth":"1px","paddingBottom":"15px"},"backStyle":{},"elements":[{"datatype":"static","width":12,"marks":null,"height":1,"value":"超时工单","style":{"color":"rgba(67, 67, 67, 0.51)"},"prefix":"","postfix":"","format":"","eleType":"text","uuid":"1603681402945qnkgm7q8cng65evn5ev"},{"eleType":"icon","datatype":"static","width":12,"icon":"question-circle","tooltip":"超时工单","uuid":"1603681473384i2crkbtofg4pu76k06a","marks":null,"style":{"textAlign":"right","color":"rgba(250, 219, 20, 1)"}},{"datatype":"static","width":24,"marks":null,"height":1,"innerHeight":36,"value":"100","style":{"fontSize":"24px","color":"rgba(0, 0, 0, 1)"},"prefix":"","postfix":"","format":"","eleType":"number","uuid":"1603681539870d704ufqf98kc6t7537t"},{"color":"rgba(250, 219, 20, 1)","datatype":"static","width":24,"marks":null,"maxValue":100,"value":50,"style":{"paddingTop":"10px","paddingBottom":"10px"},"eleType":"slider","uuid":"1603683067556mvupau0odvrtv45u7o8"},{"eleType":"splitline","width":24,"color":"#e8e8e8","uuid":"1603683117981t9k55k8an430fuppmci","marks":null,"style":{"paddingTop":"5px","paddingBottom":"5px"}},{"datatype":"static","width":12,"marks":null,"height":1,"value":"100","style":{"color":"rgba(0, 0, 0, 0.65)","marginTop":"10px"},"prefix":"超时工单  ","postfix":"","format":"","eleType":"text","uuid":"1603683136553uvsmkfohkft9idbfkhu"}],"backElements":[]}]` },
  { type: 'menu', url: TableCard, component: 'table', subtype: 'tablecard', title: '表格', width: 12, forbid: ['billPrint'] },
  { type: 'menu', url: TableCard, component: 'table', subtype: 'tablecard', title: '表格', width: 12 },
  { type: 'menu', url: line, component: 'line', subtype: 'line', title: '折线图' },
  { type: 'menu', url: line1, component: 'line', subtype: 'line1', title: '阶梯折线图' },
  { type: 'menu', url: bar, component: 'bar', subtype: 'bar', title: '柱状图' },
src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -145,7 +145,16 @@
        }
        if (card.col && card.col.type === 'number') {
          val = val.toFixed(card.col.decimal || 0)
          let decimal = card.col.decimal || 0
          if (card.format === 'percent') {
            decimal = decimal - 2
          }
          if (decimal < 0) {
            decimal = 0
          }
          val = val.toFixed(decimal)
        } else {
          val = '' + val
        }
src/tabviews/custom/components/card/data-card/index.jsx
@@ -74,10 +74,6 @@
    }, () => {
      if (_config.setting.sync !== 'true' && _config.setting.onload === 'true') {
        this.loadData()
      } else if (_sync && !_data) {
        this.setState({
          loading: true
        })
      }
    })
  }
@@ -99,7 +95,7 @@
        _data = nextProps.data[config.dataName] || []
      }
      this.setState({sync: false, loading: false, data: _data})
      this.setState({sync: false, data: _data})
    } else if (!is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) {
      if (config.setting.syncRefresh === 'true') {
        this.setState({}, () => {
src/tabviews/custom/components/card/prop-card/index.jsx
@@ -77,10 +77,6 @@
    }, () => {
      if (_config.wrap.datatype !== 'static' && _config.setting && _config.setting.sync !== 'true' && _config.setting.onload === 'true') {
        this.loadData()
      } else if (_sync && !_data) {
        this.setState({
          loading: true
        })
      }
    })
  }
@@ -115,7 +111,7 @@
        }
      }
      this.setState({sync: false, loading: false, data: _data})
      this.setState({sync: false, data: _data})
    } else if (!is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) {
      if (config.wrap.datatype !== 'static' && config.setting.syncRefresh === 'true') {
        this.setState({}, () => {
src/tabviews/custom/components/card/table-card/index.jsx
@@ -80,10 +80,6 @@
    }, () => {
      if (_config.setting.sync !== 'true' && _config.setting.onload === 'true') {
        this.loadData()
      } else if (_sync && !_data) {
        this.setState({
          loading: true
        })
      }
    })
  }
@@ -115,7 +111,7 @@
        _data = nextProps.data[config.dataName] || []
      }
      this.setState({sync: false, loading: false, data: _data})
      this.setState({sync: false, data: _data})
    } else if (!is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) {
      if (config.setting.syncRefresh === 'true') {
        this.setState({}, () => {
src/tabviews/custom/components/chart/antv-bar-line/index.jsx
@@ -127,14 +127,8 @@
    }, () => {
      if (config.setting.sync !== 'true' && config.setting.onload === 'true') {
        this.loadData()
      } else if (config.setting.sync === 'true') {
        if (!_data) {
          this.setState({
            loading: true
          })
        } else {
          this.handleData()
        }
      } else if (config.setting.sync === 'true' && _data) {
        this.handleData()
      }
    })
  }
@@ -158,7 +152,7 @@
        _data = nextProps.data[config.dataName] || []
      }
      this.setState({sync: false, loading: false, data: _data}, () => {
      this.setState({sync: false, data: _data}, () => {
        this.handleData()
      })
    } else if (!is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) {
@@ -351,22 +345,6 @@
      })
      _data = [..._mdata.values()]
    }
    if (plot.correction && plot.chartType === 'bar' && _data.length > 0 && _data.length < plot.correction) {
      if (plot.enabled !== 'true' || (plot.customs && plot.customs.filter(cell => cell.chartType !== 'bar').length === 0)) {
        let _num = plot.correction - _data.length
        for (let i = 0; i < _num; i++) {
          let _val = Array( i + 2 ).join(' ')
          let _cell = {}
          _cell[plot.Xaxis] = _val
          vFields.forEach(col => {
            _cell[col.field] = ''
          })
          _data.push(_cell)
        }
      }
    }
    this.setState({empty: _data.length === 0})
@@ -1003,6 +981,10 @@
      if (plot.label === 'true') {
        _chart.label(_valfield)
      }
      if (plot.barSize || plot.correction) {
        _chart.size(plot.barSize || 35)
      }
    } else if (plot.adjust === 'stack') {
      let _chart = chart
        .interval()
@@ -1020,6 +1002,10 @@
      if (plot.label === 'true') {
        _chart.label(_valfield)
      }
      if (plot.barSize || plot.correction) {
        _chart.size(plot.barSize || 35)
      }
    }
    chart.render()
src/tabviews/custom/components/chart/antv-pie/index.jsx
@@ -72,14 +72,8 @@
    }, () => {
      if (config.setting.sync !== 'true' && config.setting.onload === 'true') {
        this.loadData()
      } else if (config.setting.sync === 'true') {
        if (!_data) {
          this.setState({
            loading: true
          })
        } else {
          this.handleData()
        }
      } else if (config.setting.sync === 'true' && _data) {
        this.handleData()
      }
    })
  }
@@ -103,7 +97,7 @@
        _data = nextProps.data[config.dataName] || []
      }
      this.setState({sync: false, loading: false, data: _data}, () => {
      this.setState({sync: false, data: _data}, () => {
        this.handleData()
      })
    } else if (!is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) {
@@ -374,19 +368,13 @@
          _chart.label(Y_axis, {
            offset: -30,
            content: (data) => {
              let _label = ''
              let _val = ''
              if (plot.show !== 'value') {
                _val = `${(data[Y_axis] * 100).toFixed(2)}%`
              } else {
                _val = `${data[Y_axis]}`
              }
              if (plot.label === 'inner') {
                _label = _val
              } else {
                _label = `${data[X_axis]}: ${_val}`
              }
              return _label
              return _val
            },
            style: {
              textAlign: 'center',
@@ -401,19 +389,14 @@
            layout: { type: 'pie-spider' },
            labelHeight: 20,
            content: (data) => {
              let _label = ''
              let _val = ''
              if (plot.show !== 'value') {
                _val = `${(data[Y_axis] * 100).toFixed(2)}%`
              } else {
                _val = `${data[Y_axis]}`
              }
              if (plot.label === 'inner') {
                _label = _val
              } else {
                _label = `${data[X_axis]}: ${_val}`
              }
              return _label
              return `${data[X_axis]}: ${_val}`
            },
            labelLine: {
              style: {
src/tabviews/custom/index.jsx
@@ -43,8 +43,6 @@
    config: null,         // 页面配置信息,包括组件等
    mainSearch: null,
    userConfig: null,     // 用户自定义设置
    arr_field: '',        // 使用 sPC_Get_TableData 时的查询字段集
    setting: null,        // 页面全局设置:数据源、按钮及显示列固定、主键等
    data: null,           // 列表数据集
    loading: false,       // 列表数据加载中
    visible: false,       // 标签页控制
@@ -67,12 +65,6 @@
      let config = ''
      let userConfig = null
      setTimeout(() => { // 延时加载状态
        this.setState({
          loadingview: false
        })
      }, 1500)
      try { // 配置信息解析
        config = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam)))
      } catch (e) {
@@ -89,11 +81,12 @@
          userConfig = null
        }
      }
      // 页面配置解析错误时提示
      if (!config) {
        this.setState({
          viewlost: true
          viewlost: true,
          loadingview: false
        })
        return
      }
@@ -102,6 +95,7 @@
      if (!config.enabled) {
        this.setState({
          viewlost: true,
          loadingview: false,
          lostmsg: this.state.dict['main.view.unenabled']
        })
        return
@@ -146,16 +140,24 @@
      })
      let params = []
      config.components = this.formatSetting(config.components, params, mainSearch, permAction)
      let BID = param && param.BID ? param.BID : ''
      config.components = this.formatSetting(config.components, params, mainSearch, permAction, BID)
      this.setState({
        BID: param && param.BID ? param.BID : '',
        BID: BID,
        userConfig: userConfig,
        setting: config.setting,
        config,
        mainSearch
      }, () => {
        this.loadmaindata(params)
        if (!params || params.length === 0) {
          setTimeout(() => { // 延时加载状态
            this.setState({
              loadingview: false
            })
          }, 1000)
        } else {
          this.loadmaindata(params)
        }
      })
    } else {
      this.setState({
@@ -207,7 +209,7 @@
  }
  // 格式化默认设置
  formatSetting = (components, params, mainSearch, permAction) => {
  formatSetting = (components, params, mainSearch, permAction, BID) => {
    return components.map(component => {
      if (component.type === 'tabs') {
        component.subtabs = component.subtabs.map(tab => {
@@ -266,7 +268,7 @@
      // dataName 系统生成的数据源名称
      // pageable 是否分页,组件属性,不分页的组件才可以统一查询
      if (component.floor === 1 && component.dataName && (!component.pageable || (component.pageable && !component.setting.laypage)) && component.setting.onload === 'true' && component.setting.sync === 'true') {
        let param = this.getDefaultParam(component, mainSearch)
        let param = this.getDefaultParam(component, mainSearch, BID)
        params.push(param)
      } else if (component.floor === 1) {
        component.setting.sync = 'false'
@@ -279,7 +281,7 @@
  /**
   * @description 获取系统存储过程 sPC_Get_TableData 的参数
   */
  getDefaultParam = (component, mainSearch) => {
  getDefaultParam = (component, mainSearch, BID) => {
    const { columns, search, setting, dataName, format } = component
    
    let searchlist = []
@@ -300,6 +302,7 @@
    let _dataresource = setting.dataresource
    let _customScript = setting.customScript
    if (setting.queryType === 'statistics' || _customScript) {
      let allSearch = Utils.getAllSearchOptions(searchlist)
      let regoptions = allSearch.map(item => {
@@ -313,10 +316,11 @@
        if (_dataresource && setting.queryType === 'statistics') {
          _dataresource = _dataresource.replace(item.reg, item.value)
        }
        if (_customScript) {
          _customScript = _customScript.replace(item.reg, item.value)
        }
        _customScript = _customScript.replace(item.reg, item.value)
      })
      _dataresource = _dataresource.replace(/@BID@/ig, BID)
      _customScript = _customScript.replace(/@BID@/ig, BID)
    }
    let _search = ''
@@ -353,7 +357,6 @@
   * @description 主表数据加载
   */ 
  loadmaindata = (params) => {
    if (!params || params.length === 0) return
    let LText_field = []
    let LText = params.map((item, index) => {
      let _sql = item.sql
@@ -381,6 +384,8 @@
    param.LText_field = Utils.formatOptions(param.LText_field)
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    param.secretkey = Utils.encrypt(param.LText, param.timestamp)
    this.setState({loading: true, loadingview: false})
    Api.getLocalConfig(param).then(result => {
      if (result.status) {
@@ -511,11 +516,11 @@
  render() {
    const { menuType, MenuNo } = this.props
    const { loadingview, viewlost, config } = this.state
    const { loadingview, viewlost, config, loading } = this.state
    return (
      <div className="custom-page-wrap" id={this.state.ContainerId} style={config ? config.style : null}>
        {loadingview && <Spin size="large" />}
        {(loadingview || loading) ? <Spin size="large" /> : null}
        <Row>{this.getComponents()}</Row>
        {MenuNo && options.sysType !== 'cloud' && menuType !== 'HS' ? <Button
          icon="copy"
src/tabviews/subtable/index.jsx
@@ -766,7 +766,7 @@
              )
            } else if (item.chartType === 'card') {
              return (
                <Col span={item.width} key={item.uuid}>
                <Col className="card-view" span={item.width} key={item.uuid}>
                  <CardComponent
                    plot={item}
                    config={config}
src/tabviews/subtabtable/index.jsx
@@ -631,7 +631,7 @@
              )
            } else if (item.chartType === 'card') {
              return (
                <Col span={item.width} key={item.uuid}>
                <Col className="card-view" span={item.width} key={item.uuid}>
                  <CardComponent
                    tableId=""
                    plot={item}
src/tabviews/zshare/actionList/newpagebutton/index.jsx
@@ -1,5 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { is, fromJS } from 'immutable'
import { Button, notification, Modal } from 'antd'
@@ -47,7 +48,7 @@
   * @description 触发按钮操作
   */
  actionTrigger = (triggerId) => {
    const { setting, btn, selectedData } = this.props
    const { setting, btn, selectedData, dataManager } = this.props
    const _this = this
    if (triggerId && btn.uuid !== triggerId) return
@@ -91,7 +92,7 @@
    }
    if (btn.pageTemplate === 'billprint') {
      let src = '#/billprint/' + window.btoa(window.encodeURIComponent(JSON.stringify({ id: Id, tempId: btn.printTemp })))
      let src = '#/billprint/' + window.btoa(window.encodeURIComponent(JSON.stringify({ id: Id, tempId: btn.printTemp, dataManager: dataManager })))
      window.open(src)
    } else if (btn.pageTemplate === 'billprintTemp') {
      let src = '#/menudesign/' + window.btoa(window.encodeURIComponent(JSON.stringify({ MenuType: 'billPrint', MenuId: Id, MenuNo: MenuNo, MenuName: name || '打印', Remark: Remark })))
@@ -162,4 +163,14 @@
  }
}
export default NewPageButton
const mapStateToProps = (state) => {
  return {
    dataManager: state.dataManager
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(NewPageButton)
src/tabviews/zshare/chartcomponent/index.jsx
@@ -233,22 +233,6 @@
      _data = [..._mdata.values()]
    }
    if (plot.correction && plot.chartType === 'bar' && _data.length > 0 && _data.length < plot.correction) {
      if (plot.enabled !== 'true' || (plot.customs && plot.customs.filter(cell => cell.chartType !== 'bar').length === 0)) {
        let _num = plot.correction - _data.length
        for (let i = 0; i < _num; i++) {
          let _val = Array( i + 2 ).join(' ')
          let _cell = {}
          _cell[plot.Xaxis] = _val
          _columns.forEach(col => {
            _cell[col.field] = ''
          })
          _data.push(_cell)
        }
      }
    }
    this.setState({empty: _data.length === 0})
    return _data
  }
@@ -871,6 +855,7 @@
      let _chart = chart
        .interval()
        .position(`${plot.Xaxis}*${_valfield}`)
        .size(30)
        .color(_typefield)
        .adjust([
          {
@@ -893,6 +878,7 @@
      let _chart = chart
        .interval()
        .position(`${plot.Xaxis}*${_valfield}`)
        .size(30)
        .color(_typefield)
        .adjust('stack')
        .shape(plot.shape || 'rect')
@@ -995,8 +981,10 @@
          }
        })
      if (plot.label === 'true') {
        let setting = {
      if (plot.label !== 'false') {
        _chart.label('percent', {
          layout: { type: 'pie-spider' },
          labelHeight: 20,
          content: (data) => {
            let val = data[plot.Xaxis]
            if (val) {
@@ -1006,20 +994,14 @@
              }
            }
            return `${val}: ${(data.percent * 100).toFixed(2)}%`
          },
          labelLine: {
            style: {
              lineWidth: 0.5,
            },
          }
        }
        if (plot.labelLayout === 'overlap') {
          setting.type = 'pie'
          setting.layout = {
            type: 'overlap'
          }
          setting.offset = 0
        }
        _chart.label('percent', setting)
        })
      }
    } else {
      let _chart = chart
        .interval()
src/templates/sharecomponent/actioncomponent/index.jsx
@@ -75,11 +75,11 @@
  }
  getBillPrintTemp = () => {
    let _sql = `select PrintTempNO,Images,PrintTempNO+PrintTempName as PN from sPrintTemplate
    where appkey= @appkey@ and Deleted=0  and typechartwo='web_print'
    let _sql = `select ID,Images,PrintTempNO+PrintTempName as PN from sPrintTemplate
    where appkey= @appkey@ and Deleted=0 and typechartwo='web_print'
    union select ID,Images,a.PrintTempNO+PrintTempName as PN 
    from (select * from sPrintTemplate where appkey= '' and Deleted=0  and typechartwo='web_print') a
    left join (select PrintTempNO from sPrintTemplate where appkey= @appkey@  and Deleted=0 ) b
    from (select * from sPrintTemplate where appkey= '' and Deleted=0 and typechartwo='web_print') a
    left join (select PrintTempNO from sPrintTemplate where appkey= @appkey@ and Deleted=0 ) b
    on a.PrintTempNO=b.PrintTempNO 
    left join (select Srcid from sPrintTemplate_Log where appkey='' and apicode= @appkey@ and Deleted=0 ) c 
    on a.ID=c.Srcid where b.PrintTempNO is null and c.Srcid is null`
@@ -88,7 +88,7 @@
      func: 'sPC_Get_SelectedList',
      LText: Utils.formatOptions(_sql),
      obj_name: 'data',
      arr_field: 'PN,PrintTempNO,Images'
      arr_field: 'PN,ID,Images'
    }
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
@@ -100,7 +100,7 @@
      if (res.status) {
        let temps = res.data.map(temp => {
          return {
            value: temp.PrintTempNO,
            value: temp.ID,
            text: temp.PN
          }
        })
src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx
@@ -47,10 +47,10 @@
  componentDidMount() {
    let _sql = `select PrintTempNO,Images,PrintTempNO+PrintTempName as PN from sPrintTemplate 
    where appkey= @appkey@ and Deleted=0  and typechartwo=''
    union select ID,Images,a.PrintTempNO+PrintTempName as PN
    from (select * from sPrintTemplate where appkey= '' and Deleted=0  and typechartwo='') a
    left join (select PrintTempNO from sPrintTemplate where appkey= @appkey@  and Deleted=0 ) b
    where appkey= @appkey@ and Deleted=0 and typechartwo=''
    union select a.PrintTempNO,Images,a.PrintTempNO+PrintTempName as PN
    from (select * from sPrintTemplate where appkey= '' and Deleted=0 and typechartwo='') a
    left join (select PrintTempNO from sPrintTemplate where appkey= @appkey@ and Deleted=0 ) b
    on a.PrintTempNO=b.PrintTempNO 
    left join (select Srcid from sPrintTemplate_Log where appkey='' and apicode= @appkey@ and Deleted=0 ) c 
    on a.ID=c.Srcid where b.PrintTempNO is null and c.Srcid is null`
src/templates/sharecomponent/chartcomponent/chartcompile/index.jsx
@@ -77,6 +77,11 @@
      }
    })
    if (plot.correction) {
      delete plot.correction // 数据修正(已弃用)
      plot.barSize = 35
    }
    this.setState({
      visible: true,
      view: 'normal',
src/templates/sharecomponent/chartcomponent/index.jsx
@@ -420,6 +420,9 @@
        if (plot.label === 'true') {
          _chart.label('value')
        }
        if (plot.barSize || plot.correction) {
          _chart.size(plot.barSize || 35)
        }
      } else if (plot.adjust === 'stack') {
        let _chart = chart
          .interval()
@@ -431,6 +434,10 @@
        if (plot.label === 'true') {
          _chart.label('value')
        }
        if (plot.barSize || plot.correction) {
          _chart.size(plot.barSize || 35)
        }
      }
  
      chart.render()
src/templates/sharecomponent/chartgroupcomponent/index.jsx
@@ -90,7 +90,7 @@
        icon: 'line-chart',
        Hide: 'false',
        blacklist: [],
        correction: 7
        barSize: 35
      }
    }
src/templates/zshare/createinterface/index.jsx
@@ -452,7 +452,7 @@
                  fieldlen: _fieldlen,
                  key: cell.field,
                  required: cell.required === 'true' ? 'required' : '',
                  writein: cell.required !== 'false',
                  writein: cell.writein !== 'false',
                  value: cell.initval || ''
                }
@@ -720,10 +720,10 @@
        `
    }
    if (_initcolumnfields.length > 0) {
      _sql += `select ${_initcolumnfields.join(',')} from ${setting.dataresource} where ${primaryKey}=@ID@
        `
    }
    // if (_initcolumnfields.length > 0) {
    //   _sql += `select ${_initcolumnfields.join(',')} from (${setting.dataresource})tb where ${primaryKey}=@ID@
    //     `
    // }
    
    // 去除禁用的验证
    if (verify.contrasts) {
@@ -955,8 +955,10 @@
      receiptKeys.push('bid')
    }
    let _insertsql = ''
    let _updatesql = ''
    // 添加、修改、逻辑删除、物理删除
    if (_actionType === 'insert') {
    if (_actionType === 'insert' || _actionType === 'insertOrUpdate') {
      let keys = []
      let values = []
@@ -991,10 +993,12 @@
      keys = keys.join(',')
      values = values.join(',')
      _sql += `
      _insertsql = `
        /* 默认sql */
        insert into ${btn.sql} (${keys}) select ${values};`
    } else if (_actionType === 'update') {
    }
    if (_actionType === 'update' || _actionType === 'audit' || _actionType === 'insertOrUpdate') {
      let _form = []
      let _arr = []
@@ -1034,9 +1038,28 @@
      }
      _form = _form.join(',')
      _sql += `
      _updatesql = `
        /* 默认sql */
        update ${btn.sql} set ${_form} where ${primaryKey}=@${primaryKey}@;`
    }
    if (_actionType === 'insert') {
      _sql += _insertsql
    } else if (_actionType === 'update' || _actionType === 'audit') {
      _sql += _updatesql
    } else if (_actionType === 'insertOrUpdate') {
      _sql += `
        select @tbid=''
        select @tbid='X' from ${btn.sql} where ${primaryKey}=@ID@
        if @tbid=''
          begin
          ${_insertsql}
          end
        else
          begin
          ${_updatesql}
          end
      `
    } else if (_actionType === 'LogicDelete') { // 逻辑删除
      _sql += `
        /* 默认sql */
src/templates/zshare/formconfig.jsx
@@ -1741,13 +1741,13 @@
      required: true
    }, {
      type: 'number',
      key: 'correction',
      label: '数据修正',
      tooltip: '当数据项少于设置值时,系统会自动修正(避免柱形图过宽),在自定义中,设置为折线图时失效。',
      key: 'barSize',
      label: '柱形宽度',
      tooltip: '空值时,宽度自适应。',
      min: 5,
      max: 30,
      max: 100,
      decimal: 0,
      initVal: card.correction,
      initVal: card.barSize,
      forbid: !['bar'].includes(card.chartType),
      required: false
    }
src/views/billprint/index.jsx
@@ -1,7 +1,6 @@
import React, { Component } from 'react'
import { is, fromJS } from 'immutable'
import { connect } from 'react-redux'
import { Col, Row, Spin, notification } from 'antd'
import { Col, Row, Spin, notification, Button } from 'antd'
import moment from 'moment'
import Api from '@/api'
@@ -9,6 +8,7 @@
import zhCN from '@/locales/zh-CN/main.js'
import enUS from '@/locales/en-US/main.js'
import options from '@/store/options.js'
import UtilsDM from '@/utils/utils-datamanage.js'
import NotFount from '@/components/404'
import asyncComponent from '@/utils/asyncComponent'
@@ -23,6 +23,8 @@
class BillPrint extends Component {
  state = {
    dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    loadingview: true,
    dataManager: false,
    BID: '',
    data: '',
    tempId: '',
@@ -32,10 +34,10 @@
  UNSAFE_componentWillMount() {
    try {
      let param = JSON.parse(window.decodeURIComponent(window.atob(this.props.match.params.param)))
      this.setState({
        BID: param.id || '',
        tempId: param.tempId,
        dataManager: param.dataManager
      }, () => {
        this.getMenuParam()
      })
@@ -62,39 +64,33 @@
  }
  getMenuParam = () => {
    const { tempId, BID } = this.state
    const { tempId, BID, dataManager } = this.state
    let param = {
      func: 's_PrintTemplateMGetData',
      Type: 'Y',
      PrintTempNO: tempId
    let _param = {
      func: 'sPC_Get_LongParam',
      MenuID: tempId
    }
    if (window.GLOB.mainSystemApi) { // 从单点登录服务器取打印配置信息
      param.rduri = window.GLOB.mainSystemApi
      _param.rduri = window.GLOB.mainSystemApi
    }
    Api.getLocalConfig(param).then(result => {
    Api.getLocalConfig(_param).then(result => {
      if (result.status) {
        let config = ''
        try {
          config = JSON.parse(window.decodeURIComponent(window.atob(result.ConfigParam)))
          config = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam)))
        } catch (e) {
          console.warn('Parse Failure')
          config = ''
        }
        setTimeout(() => { // 延时加载状态
          this.setState({
            loadingview: false
          })
        }, 1500)
        // 页面配置解析错误时提示
        if (!config) {
          this.setState({
            viewlost: true
            viewlost: true,
            loadingview: false
          })
          return
        }
@@ -103,15 +99,17 @@
        if (!config.enabled) {
          this.setState({
            viewlost: true,
            loadingview: false,
            lostmsg: this.state.dict['main.view.unenabled']
          })
          return
        }
        let params = []
        let _pars = []
        config.components = config.components.filter(item => !['tabs', 'search'].includes(item.type) && item.subtype !== 'tablecard')
        config.components = config.components.map(component => {
          if (['tabs', 'search'].includes(component.type)) return null
          if (component.action) component.action = []
          if (component.search) component.search = []
    
@@ -143,7 +141,7 @@
            component.setting.dataresource = '(' + component.setting.dataresource + ') tb'
          }
      
          if (this.props.dataManager) { // 数据权限
          if (dataManager) { // 数据权限
            component.setting.dataresource = component.setting.dataresource.replace(/\$@/ig, '/*')
            component.setting.dataresource = component.setting.dataresource.replace(/@\$/ig, '*/')
            _customScript = _customScript.replace(/\$@/ig, '/*')
@@ -163,19 +161,35 @@
          // pageable 是否分页,组件属性,不分页的组件才可以统一查询
          if (component.dataName && component.setting.sync === 'true') {
            let param = this.getDefaultParam(component)
            params.push(param)
            _pars.push(param)
          } else {
            component.setting.sync = 'false'
            let arr_field = component.columns.map(col => col.field).join(',')
            let param = UtilsDM.getQueryDataParams(component.setting, arr_field, [], component.setting.order || '', 1, 1000, BID, '', dataManager)
            param.componentId = component.uuid
            params.push(param)
          }
          component.setting.sync = 'true'
    
          return component
        })
        _pars = this.getFormatParam(_pars)
        if (_pars) {
          _pars.componentId = 'union'
          params.unshift(_pars)
        }
        this.setState({
          setting: config.setting,
          config
        }, () => {
          this.loadmaindata(params)
          if (params.length === 0) {
            this.setState({loadingview: false})
          } else {
            this.loadmaindata(params)
          }
        })
      } else {
        notification.warning({
@@ -221,11 +235,8 @@
    }
  }
  /**
   * @description 主表数据加载
   */
  loadmaindata = (params) => {
    if (!params || params.length === 0) return
  getFormatParam = (params) => {
    if (!params || params.length === 0) return ''
    let LText_field = []
    let LText = params.map((item, index) => {
      let _sql = item.sql
@@ -254,36 +265,109 @@
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    param.secretkey = Utils.encrypt(param.LText, param.timestamp)
    Api.getLocalConfig(param).then(result => {
      if (result.status) {
        delete result.status
        delete result.message
        delete result.ErrMesg
        delete result.ErrCode
    return param
  }
        this.setState({
          data: result,
          loading: false
  /**
   * @description 主表数据加载
   */
  loadmaindata = (params) => {
    let deffers = params.map(item => {
      let componentId = item.componentId
      delete item.componentId
      return new Promise(resolve => {
        Api.getLocalConfig(item).then(res => {
          if (!res.status) {
            notification.warning({
              top: 92,
              message: res.message,
              duration: 5
            })
            resolve(false)
          } else {
            res.componentId = componentId
            resolve(res)
          }
        })
      } else {
        this.setState({
          data: '',
          loading: false
        })
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      })
    })
    Promise.all(deffers).then(results => {
      let _results = results.filter(Boolean)
      this.setState({loadingview: false})
      if (_results.length === results.length) {
        console.log(_results)
      }
      // delete result.ErrCode
      // delete result.ErrMesg
      // delete result.message
      // delete result.status
    })
  }
  getComponents = () => {
    const { dataManager } = this.props
    const { config, BID, data } = this.state
  print = () => {
    let bdhtml = window.document.body.innerHTML
    let jubuData = document.getElementById('bill-print').innerHTML
    window.document.body.innerHTML = jubuData
    // document.getElementsByTagName('body')[0].style.zoom = 0.7
    if (!config || !config.components) return
    try {
      if (window.ActiveXObject) {
        let hkeyRoot
        let hkeyPath
        let hkeyKey
        // eslint-disable-next-line
        let RegWsh = new ActiveXObject('WScript.Shell')
        hkeyRoot = 'HKEY_CURRENT_USER'
        hkeyPath = '\\Software\\Microsoft\\Internet Explorer\\PageSetup\\'
        // 设置页眉/脚的字体样式
        hkeyKey = 'font'
        RegWsh.RegWrite(hkeyRoot + hkeyPath + hkeyKey, 'font-size: 12px; font-family: 黑体; line-height: 24px')
        // 设置页眉
        hkeyKey = 'header'
        RegWsh.RegWrite(hkeyRoot + hkeyPath + hkeyKey, '打印编号')
        // 设置页脚
        hkeyKey = 'footer'
        RegWsh.RegWrite(hkeyRoot + hkeyPath + hkeyKey, '&b第 &p 页/共 &P 页')
        // 设置页边距(0.6 要乘以 2.5为实际打印的尺寸)
        hkeyKey = 'margin_bottom'
        RegWsh.RegWrite(hkeyRoot + hkeyPath + hkeyKey, '0.6')
        hkeyKey = 'margin_left'
        RegWsh.RegWrite(hkeyRoot + hkeyPath + hkeyKey, '0.6')
        hkeyKey = 'margin_right'
        RegWsh.RegWrite(hkeyRoot + hkeyPath + hkeyKey, '0.6')
        hkeyKey = 'margin_top'
        RegWsh.RegWrite(hkeyRoot + hkeyPath + hkeyKey, '0.6')
        window.print()
      } else {
        window.print()
      }
    } catch (e) {
      notification.warning({
        top: 92,
        message: '打印异常!',
        duration: 5
      })
    }
    window.document.body.innerHTML = bdhtml
    window.location.reload()
  }
  getComponents = () => {
    const { config, BID, data, dataManager } = this.state
    return config.components.map(item => {
      if (!item) return null
@@ -322,23 +406,14 @@
    const { loadingview, viewlost, config } = this.state
    return (
      <div className="custom-page-wrap" id={this.state.ContainerId} style={config ? config.style : null}>
      <div className="bill-print-wrap" >
        {loadingview && <Spin size="large" />}
        <Row>{this.getComponents()}</Row>
        {config ? <div id="bill-print" style={config.style}><Row>{this.getComponents()}</Row></div> : null}
        {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
        {!loadingview && !viewlost ? <div className="print-button"><Button onClick={this.print}>打印</Button></div> : null}
      </div>
    )
  }
}
const mapStateToProps = (state) => {
  return {
    dataManager: state.dataManager
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(BillPrint)
export default BillPrint
src/views/billprint/index.scss
@@ -1,160 +1,19 @@
.pc-menu-view {
  background: #000;
  min-height: 100vh;
  .menu-body {
    width: 100vw;
    height: 100vh;
    overflow-x: hidden;
    position: relative;
    background: #ffffff;
    padding: 50px 0px 0px 0px;
.bill-print-wrap {
  width: 1200px;
  margin: 0 auto;
    .menu-setting {
      position: fixed;
      left: 0;
      top: 48px;
      z-index: 10;
      height: calc(100vh - 48px);
      width: 300px;
      background: #ffffff;
      box-shadow: 0px 2px 5px #bcbcbc;
      overflow-y: auto;
      > .ant-collapse {
        .ant-collapse-item.ant-collapse-item-active {
          border-bottom: 1px solid #d9d9d9;
        }
        .ant-collapse-header {
          padding: 11px 16px 10px 40px;
          border-bottom: 1px solid #d9d9d9;
          background: #1890ff;
          color: #ffffff;
        }
        .ant-collapse-content-box {
          .ant-form-item {
            margin-bottom: 10px;
          }
          .model-table-tablemanage-view {
            >.ant-list {
              margin-top: 20px;
              .ant-list-item {
                display: -webkit-box;
                padding-right: 20px;
                position: relative;
                padding-left: 5px;
                overflow: hidden;
                text-overflow: ellipsis;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
                min-height: 55px;
                width: 100%;
                .anticon {
                  position: absolute;
                  top: 0px;
                  right: 0px;
                  padding: 3px 3px 10px 10px;
                  cursor: pointer;
                }
              }
            }
            >.tables {
              width: 66.66666667%!important;
            }
            >.ant-form-item-label {
              width: 33.33333333%;
            }
          }
        }
      }
      >.ant-tabs {
        >.ant-tabs-bar {
          border-bottom: 1px solid #181F29;
          margin-bottom: 0px;
          min-height: 48px;
          .ant-tabs-tab {
            padding: 14px 16px;
            color: rgba(255, 255, 255, 0.85);
          }
          .ant-tabs-tab-active.ant-tabs-tab {
            color: #1890ff;
          }
        }
      }
    }
    .menu-setting::-webkit-scrollbar {
      width: 4px;
    }
    .menu-setting::-webkit-scrollbar-thumb {
      border-radius: 5px;
      box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.08);
      background: rgba(0, 0, 0, 0.08);
    }
    .menu-setting::-webkit-scrollbar-track {
      box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
      border-radius: 3px;
      border: 1px solid rgba(0, 0, 0, 0.07);
      background: rgba(0, 0, 0, 0);
    }
    .menu-view {
      position: relative;
      width: calc(100vw - 300px);
      margin-left: 300px;
      height: calc(100vh - 50px);
      overflow-y: auto;
      > .ant-card {
        >.ant-card-head {
          margin-bottom: 0px;
          .ant-card-head-title {
            color: #1890ff;
            padding: 5px 0;
          }
          .ant-card-extra {
            padding: 5px 0;
            button {
              margin-left: 20px;
            }
            .ant-switch.big {
              min-width: 60px;
              height: 28px;
              line-height: 28px;
              margin-top: -2px;
              .ant-switch-inner {
                font-size: 14px;
              }
            }
            .ant-switch.big:after {
              width: 24px;
              height: 24px;
            }
          }
        }
        >.ant-card-body {
          padding: 0px;
        }
      }
    }
    .menu-view.saving {
      .anticon-tool {
        display: none;
      }
    }
    .menu-view::-webkit-scrollbar {
      width: 7px;
    }
    .menu-view::-webkit-scrollbar-thumb {
      border-radius: 5px;
      box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.08);
      background: rgba(0, 0, 0, 0.08);
    }
    .menu-view::-webkit-scrollbar-track {
      box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
      border-radius: 3px;
      border: 1px solid rgba(0, 0, 0, 0.07);
      background: rgba(0, 0, 0, 0);
    }
  .ant-spin {
    position: absolute;
    top: 40vh;
    z-index: 1;
    left: calc(50vw - 20px);
  }
  .box404 {
    margin-top: 10vh;
  }
  .print-button {
    position: fixed;
    right: 10px;
    top: 45vh;
  }
}
src/views/menudesign/index.jsx
@@ -396,7 +396,7 @@
          error = `组件《${item.name}》未设置数据源!`
        } else if (item.setting.interType === 'system' && item.setting.execute === 'false' && item.scripts.length === 0) {
          error = `组件《${item.name}》未设置数据源!`
        } else if (item.setting.interType && !item.setting.primaryKey) {
        } else if (item.setting.interType && !item.setting.primaryKey && config.MenuType !== 'billPrint') {
          error = `组件《${item.name}》未设置主键!`
        }
      }