king
2023-04-13 30068b0366757b6cae3cd6dda25e0622afcae795
2023-04-13
6个文件已修改
79 ■■■■■ 已修改文件
src/tabviews/custom/components/card/data-card/index.jsx 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/double-data-card/index.jsx 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/table-card/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/exceloutbutton/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/data-card/index.jsx
@@ -80,6 +80,8 @@
      }
    }
    _config.$extend = false
    _config.subcards.forEach(item => {
      if (item.setting.click === 'button' && !item.setting.linkbtn) {
        item.elements.forEach(ele => {
@@ -95,8 +97,10 @@
      if (item.$cardType !== 'extendCard') {
        _card = item
      } else if (!_card) {
        _config.$extend = true
        precards.push(item)
      } else {
        _config.$extend = true
        nextcards.push(item)
      }
    })
@@ -162,6 +166,10 @@
    this.loaded = _data !== null
    let pageOptions = ['10', '25', '50', '100', '500', '1000']
    if (!_config.setting.laypage) {
      _config.wrap.pagestyle = 'none'
    }
    if (_config.wrap.pagestyle === 'page') {
      let size = (_config.setting.pageSize || 10) + ''
@@ -945,15 +953,23 @@
    let _total = 0
    let switchable = false
    if (config.wrap.pagestyle === 'switch' && config.pageable && config.setting.laypage && total > pageSize && data) {
    if (config.wrap.pagestyle === 'switch' && total > pageSize && data) {
      _total = pageSize * pageIndex
      switchable = true
    }
    let extendData = {$$BID: BID, $$BData: BData, $$selectedData: selectedData, $$type: 'extendCard'}
    let extendData = null
    if (data && data[0]) {
      extendData = {...extendData, ...data[0]}
    if (config.$extend) {
      extendData = {$$BID: BID, $$BData: BData, $$selectedData: selectedData, $$type: 'extendCard'}
      if (data && data[0]) {
        if (selectedData[0]) {
          extendData = {...extendData, ...selectedData[0]}
        } else {
          extendData = {...extendData, ...data[0]}
        }
      }
    }
    let checkAll = ''
@@ -1028,10 +1044,10 @@
            ))}
          </Row>
          {switchable ? <div className={'prev-page ' + (total <= _total ? 'disabled' : '')} onClick={this.nextPage}><div><div><img src={nextImg} alt=""/></div></div></div> : null}
          {precards.length === 0 && nextcards.length === 0 && (!data || data.length === 0) ? <Empty description={false}/> : null}
          {!config.$extend && (!data || data.length === 0) ? <Empty description={false}/> : null}
        </div>
        {config.wrap.pagestyle === 'page' && config.setting.laypage && data ? <Pagination size="small" total={total} showTotal={(t, range) => total > 0 ? `${range[0]}-${range[1]} 共 ${total} 条` : `共 ${total} 条`} pageSize={pageSize} showSizeChanger={true} pageSizeOptions={this.state.pageOptions} onChange={this.changePageIndex} onShowSizeChange={this.pageSizeChange} current={pageIndex}/> : null}
        {config.wrap.pagestyle === 'more' && config.setting.laypage && data && data.length > 0 ? <div className={'mk-more' + (pageSize * pageIndex >= total ? ' disabled' : '')} onClick={this.loadMore}>查看更多<DownOutlined/></div> : null}
        {config.wrap.pagestyle === 'page' && data ? <Pagination size="small" total={total} showTotal={(t, range) => total > 0 ? `${range[0]}-${range[1]} 共 ${total} 条` : `共 ${total} 条`} pageSize={pageSize} showSizeChanger={true} pageSizeOptions={this.state.pageOptions} onChange={this.changePageIndex} onShowSizeChange={this.pageSizeChange} current={pageIndex}/> : null}
        {config.wrap.pagestyle === 'more' && data && data.length > 0 ? <div className={'mk-more' + (pageSize * pageIndex >= total ? ' disabled' : '')} onClick={this.loadMore}>查看更多<DownOutlined/></div> : null}
      </div>
    )
  }
src/tabviews/custom/components/card/double-data-card/index.jsx
@@ -78,6 +78,8 @@
      }
    }
    _config.$extend = false
    _config.subcards.forEach(item => {
      if (item.setting.click === 'button' && !item.setting.linkbtn) {
        item.elements.forEach(ele => {
@@ -93,8 +95,10 @@
      if (item.$cardType !== 'extendCard') {
        _card = item
      } else if (!_card) {
        _config.$extend = true
        precards.push(item)
      } else {
        _config.$extend = true
        nextcards.push(item)
      }
    })
@@ -139,6 +143,10 @@
    _config.setting.sub_field = subconfig.columns.map(col => col.field).join(',')
    let pageOptions = ['10', '25', '50', '100', '500', '1000']
    if (!_config.setting.laypage) {
      _config.wrap.pagestyle = 'none'
    }
    if (_config.wrap.pagestyle === 'page') {
      let size = (_config.setting.pageSize || 10) + ''
@@ -889,10 +897,18 @@
    if (config.wrap.empty === 'hidden' && (!data || data.length === 0)) return null
    let extendData = {$$BID: BID, $$BData: BData, $$selectedData: selectedData, $$type: 'extendCard'}
    let extendData = null
    if (data && data[0]) {
      extendData = {...extendData, ...data[0]}
    if (config.$extend) {
      extendData = {$$BID: BID, $$BData: BData, $$selectedData: selectedData, $$type: 'extendCard'}
      if (data && data[0]) {
        if (selectedData[0]) {
          extendData = {...extendData, ...selectedData[0]}
        } else {
          extendData = {...extendData, ...data[0]}
        }
      }
    }
    let checkAll = ''
@@ -989,11 +1005,11 @@
                </Col>
              ))}
            </Row>
            {precards.length === 0 && nextcards.length === 0 && (!data || data.length === 0) ? <Empty description={false}/> : null}
            {!config.$extend && (!data || data.length === 0) ? <Empty description={false}/> : null}
          </div>
        </div>
        {config.wrap.pagestyle === 'page' && config.setting.laypage && data ? <Pagination size="small" total={total} showTotal={(t, range) => total > 0 ? `${range[0]}-${range[1]} 共 ${total} 条` : `共 ${total} 条`} pageSize={pageSize} showSizeChanger={true} pageSizeOptions={this.state.pageOptions} onChange={this.changePageIndex} onShowSizeChange={this.pageSizeChange} current={pageIndex}/> : null}
        {config.wrap.pagestyle === 'more' && config.setting.laypage && data && data.length > 0 ? <div className={'mk-more' + (pageSize * pageIndex >= total ? ' disabled' : '')} onClick={this.loadMore}>查看更多<DownOutlined/></div> : null}
        {config.wrap.pagestyle === 'page' && data ? <Pagination size="small" total={total} showTotal={(t, range) => total > 0 ? `${range[0]}-${range[1]} 共 ${total} 条` : `共 ${total} 条`} pageSize={pageSize} showSizeChanger={true} pageSizeOptions={this.state.pageOptions} onChange={this.changePageIndex} onShowSizeChange={this.pageSizeChange} current={pageIndex}/> : null}
        {config.wrap.pagestyle === 'more' && data && data.length > 0 ? <div className={'mk-more' + (pageSize * pageIndex >= total ? ' disabled' : '')} onClick={this.loadMore}>查看更多<DownOutlined/></div> : null}
      </div>
    )
  }
src/tabviews/custom/components/card/table-card/index.jsx
@@ -83,13 +83,14 @@
      showHeader = true
    }
    _config.wrap.pagestyle = _config.wrap.pagestyle || 'page'
    if (_config.setting.laypage) {
      _config.wrap.contentHeight = showHeader ? 'calc(100% - 85px)' : 'calc(100% - 40px)'
    } else {
      _config.wrap.pagestyle = 'none'
      _config.wrap.contentHeight = showHeader ? 'calc(100% - 45px)' : '100%'
    }
    _config.wrap.pagestyle = _config.wrap.pagestyle || 'page'
    this.loaded = _data !== null
@@ -513,8 +514,8 @@
        {data && data.length === 0 ? <div className="card-row-list" style={{height: config.wrap.contentHeight}}>
          <Empty description={false}/>
        </div> : null}
        {config.setting.laypage && config.wrap.pagestyle === 'page' ? <Pagination size="small" current={pageIndex} total={total} onChange={this.changePageIndex} /> : null}
        {config.setting.laypage && config.wrap.pagestyle === 'more' && data && data.length > 0 ? <div className={'mk-more' + (config.setting.pageSize * pageIndex >= total ? ' disabled' : '')} onClick={this.loadMore}>查看更多<DownOutlined/></div> : null}
        {config.wrap.pagestyle === 'page' ? <Pagination size="small" current={pageIndex} total={total} onChange={this.changePageIndex} /> : null}
        {config.wrap.pagestyle === 'more' && data && data.length > 0 ? <div className={'mk-more' + (config.setting.pageSize * pageIndex >= total ? ' disabled' : '')} onClick={this.loadMore}>查看更多<DownOutlined/></div> : null}
      </div>
    )
  }
src/tabviews/zshare/actionList/exceloutbutton/index.jsx
@@ -899,7 +899,7 @@
      defaultSql = btn.verify.defaultSql || 'true'
      _dataresource = btn.verify.dataresource || ''
      queryType = btn.verify.queryType
      primaryKey = btn.verify.primaryKey || 'ID'
      // primaryKey = btn.verify.primaryKey || 'ID'
      if (/\s/.test(_dataresource)) {
        _dataresource = '(' + _dataresource + ') tb'
@@ -1008,9 +1008,9 @@
    if (btn.Ot === 'requiredOnce' && selectedData && selectedData.length > 0) {
      primaryId = selectedData.map(d => d.$$uuid || '').filter(Boolean).join(',')
      if (_search && primaryId) {
        _search += ` and ${primaryKey} in (select ID from  dbo.SplitComma('${primaryId}'))`
        _search += ` and ${primaryKey} in (select ${primaryKey} from dbo.SplitComma('${primaryId}'))`
      } else if (primaryId) {
        _search = `where ${primaryKey} in (select ID from  dbo.SplitComma('${primaryId}'))`
        _search = `where ${primaryKey} in (select ${primaryKey} from dbo.SplitComma('${primaryId}'))`
      }
    }
src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx
@@ -216,13 +216,13 @@
                </Radio.Group>)}
              </Form.Item>
            </Col> : null}
            {dataType === 'custom' && defaultSql === 'true' ? <Col className="short-label" span={8}>
            {/* {dataType === 'custom' && defaultSql === 'true' ? <Col className="short-label" span={8}>
              <Form.Item label="主键">
                {getFieldDecorator('primaryKey', {
                  initialValue: setting.primaryKey || 'ID',
                })(<Input placeholder={''} autoComplete="off" />)}
              </Form.Item>
            </Col> : null}
            </Col> : null} */}
            {dataType === 'custom' && defaultSql === 'true' ? <Col className="short-label" span={8}>
              <Form.Item label="排序方式">
                {getFieldDecorator('order', {
src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
@@ -592,7 +592,6 @@
            delete _verify.tableName
            delete _verify.dataresource
            delete _verify.queryType
            delete _verify.primaryKey
            delete _verify.defaultSql
            delete _verify.order
@@ -1056,7 +1055,6 @@
      verify.tableName = verify.tableName || config.setting.tableName || ''
      verify.dataresource = verify.dataresource || config.setting.dataresource || ''
      verify.queryType = verify.queryType || config.setting.queryType || ''
      verify.primaryKey = verify.primaryKey || config.setting.primaryKey || ''
      verify.defaultSql = verify.defaultSql || config.setting.execute || ''
      verify.order = verify.order || config.setting.order || ''