king
2021-11-10 5af280c40f52a839fc4bda38934f680cccf98763
2021-11-10
11个文件已修改
163 ■■■■ 已修改文件
src/menu/components/carousel/data-card/options.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/columns/index.jsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/index.jsx 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/formdragelement/card.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/modalconfig/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/modalconfig/index.scss 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/searchconfig/searchdragelement/card.jsx 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/searchconfig/source.jsx 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/carousel/data-card/options.jsx
@@ -91,7 +91,7 @@
        {value: 'true', label: '是'},
        {value: 'false', label: '否'},
      ],
      forbid: true // v5 不支持垂直显示
      forbid: appType !== 'mob'
    },
    {
      type: 'radio',
src/menu/components/table/normal-table/columns/index.jsx
@@ -16,6 +16,7 @@
const EditColumn = asyncIconComponent(() => import('./editColumn'))
const MarkColumn = asyncIconComponent(() => import('@/menu/components/share/markcomponent'))
const CardCellComponent = asyncComponent(() => import('@/menu/components/card/cardcellcomponent'))
const MobPagination = asyncIconComponent(() => import('@/menu/components/share/mobPagination'))
class HeaderCol extends Component {
  deleteCol = () => {
@@ -553,7 +554,7 @@
  render() {
    const { config } = this.props
    const { fields, card, lineMarks, dict, tableId } = this.state
    const { fields, card, lineMarks, dict, tableId, appType } = this.state
    const components = {
      header: {
        cell: DragableHeaderCol
@@ -592,15 +593,16 @@
            dataSource={this.state.data}
            rowSelection={config.wrap.tableType ? { type: 'radio' } : null}
            columns={columns}
            pagination={{
            pagination={appType !== 'mob' ? {
              current: 1,
              pageSize: 10,
              pageSizeOptions: ['10', '25', '50', '100', '500', '1000'],
              showSizeChanger: true,
              total: 58,
              showTotal: (total, range) => `${range[0]}-${range[1]} 共 ${total} 条`
            }}
            } : false}
          />
          {appType === 'mob' && config.setting.laypage !== 'fasle' ? <MobPagination /> : null}
        </DndProvider>
        <EditColumn column={card} dict={dict} fields={fields} submitCol={this.submitCol} cancelCol={this.cancelCol}/>
      </div>
src/menu/components/table/normal-table/index.jsx
@@ -41,6 +41,7 @@
  UNSAFE_componentWillMount () {
    const { card } = this.props
    const { appType } = this.state
    if (card.isNew) {
      let _card = {
@@ -122,14 +123,24 @@
        }
      }
      
      if (appType === 'mob') {
        _card.search = []
        _card.action = _card.action.filter(a => !a.origin)
      }
      this.setState({
        card: _card
      })
      this.filterOrigin(_card)
    } else {
      let _card = fromJS(card).toJS()
      if (appType === 'mob') {
        _card.search = []
      }
      this.setState({
        card: fromJS(card).toJS()
        card: _card
      })
    }
  }
@@ -394,7 +405,12 @@
  render() {
    const { card, appType } = this.state
    let options = ['action', 'search', 'form', 'cols']
    let _style = resetStyle(card.style)
    if (appType === 'mob') {
      options = ['action', 'cols']
    }
    return (
      <div className="menu-normal-table-edit-box" style={_style} onClick={this.clickComponent} id={card.uuid}>
@@ -408,7 +424,7 @@
              <Icon type="edit" style={{color: '#1890ff'}} title="编辑"/>
            </NormalForm>
            <CopyComponent type="normaltable" card={card}/>
            <PasteComponent config={card} options={['action', 'search', 'form', 'cols']} updateConfig={this.updateComponent} />
            <PasteComponent config={card} options={options} updateConfig={this.updateComponent} />
            <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" />
            <LogComponent btnlog={card.btnlog || []} handlelog={this.handleLog} />
            <UserComponent config={card}/>
src/menu/datasource/index.jsx
@@ -203,7 +203,7 @@
            if (item.status === 'false') return
            if (/exec\s/ig.test(item.sql)) {
              maxScript = 100
              maxScript = 1000
            } else if (item.sql.length > maxScript) {
              maxScript = item.sql.length
            }
src/mob/components/formdragelement/card.jsx
@@ -90,8 +90,9 @@
        <div className="am-list-line">
          <div className="am-input-label">{card.label}</div>
          <div className="am-input-control" style={{textAlign: 'left'}}>
            {card.fileType !== 'picture-card' ? <Icon type="upload" style={{position: 'absolute', right: '10px', top: '10px'}} /> : null}
            {card.fileType === 'picture-card' ? <Button style={{width: '100px', marginBottom: '10px', height: '100px', fontSize: '50px', color: '#d9d9d9'}}><Icon type="plus" /></Button> : null}
            {/* {card.fileType !== 'picture-card' ? <Icon type="upload" style={{position: 'absolute', right: '10px', top: '10px'}} /> : null} */}
            {/* {card.fileType === 'picture-card' ? <Button style={{width: '100px', marginBottom: '10px', height: '100px', fontSize: '50px', color: '#d9d9d9'}}><Icon type="plus" /></Button> : null} */}
            <Button style={{width: '100px', marginBottom: '10px', height: '100px', fontSize: '50px', color: '#d9d9d9'}}><Icon type="plus" /></Button>
          </div>
        </div>
      </div>
src/mob/modalconfig/index.jsx
@@ -441,10 +441,8 @@
                  handleForm={this.handleForm}
                  closeForm={this.closeForm}
                />
                {config.setting.btnPosition !== 'top' ? <div className="modal-btns">
                  <Button className="modal-reset" type="default">重置</Button>
                  <Button className="modal-submit" type="primary">{config.setting.btnName || '确定'}</Button>
                </div> : null}
                {config.setting.btnPosition !== 'top' ?
                  <Button className="modal-submit" type="primary">{config.setting.btnName || '确定'}</Button> : null}
              </div>
            </div>
          </div>
src/mob/modalconfig/index.scss
@@ -176,26 +176,15 @@
          font-size: 16px;
        }
      }
      .modal-btns {
        display: flex;
        .modal-reset {
          display: inline-block;
          height: 50px;
          width: 30%;
          font-size: 20px;
          border-radius: 0;
          opacity: 0.5;
          cursor: default;
        }
        .modal-submit {
          display: inline-block;
          width: 70%;
          border-radius: 0;
        display: block;
        width: calc(100% - 30px);
          opacity: 0.5;
          cursor: default;
          font-size: 20px;
          height: 50px;
        }
        margin: 15px 15px;
        border-radius: 25px;
      }
      .modal-fields-row {
src/mob/searchconfig/searchdragelement/card.jsx
@@ -80,27 +80,27 @@
        </div>
      </div>
    </div>)
  } else if (card.type === 'daterange') {
    let value = '请选择'
    if (card.initval === 'week') {
      value = [moment().startOf('week').format('YYYY-MM-DD'), moment().endOf('week').format('YYYY-MM-DD')].join(' ~ ')
    } else if (card.initval === 'month') {
      value = [moment().startOf('month').format('YYYY-MM-DD'), moment().endOf('month').format('YYYY-MM-DD')].join(' ~ ')
    } else if (card.initval) {
      try {
        let _initval = JSON.parse(card.initval)
        value = [moment().subtract(_initval[0], 'days').format('YYYY-MM-DD'), moment().subtract(_initval[1], 'days').format('YYYY-MM-DD')].join(' ~ ')
      } catch (e) {
        value = '请选择'
      }
    }
    formItem = (<div className="am-list-item">
      <div className="am-list-line">
        {card.labelShow !== 'false' ? <div className="am-input-label">{card.label}</div> : null}
        <div className="am-input-control">{value}</div>
        <div className="am-list-extra"><Icon type="right" /></div>
      </div>
    </div>)
  // } else if (card.type === 'daterange') {
  //   let value = '请选择'
  //   if (card.initval === 'week') {
  //     value = [moment().startOf('week').format('YYYY-MM-DD'), moment().endOf('week').format('YYYY-MM-DD')].join(' ~ ')
  //   } else if (card.initval === 'month') {
  //     value = [moment().startOf('month').format('YYYY-MM-DD'), moment().endOf('month').format('YYYY-MM-DD')].join(' ~ ')
  //   } else if (card.initval) {
  //     try {
  //       let _initval = JSON.parse(card.initval)
  //       value = [moment().subtract(_initval[0], 'days').format('YYYY-MM-DD'), moment().subtract(_initval[1], 'days').format('YYYY-MM-DD')].join(' ~ ')
  //     } catch (e) {
  //       value = '请选择'
  //     }
  //   }
  //   formItem = (<div className="am-list-item">
  //     <div className="am-list-line">
  //       {card.labelShow !== 'false' ? <div className="am-input-label">{card.label}</div> : null}
  //       <div className="am-input-control">{value}</div>
  //       <div className="am-list-extra"><Icon type="right" /></div>
  //     </div>
  //   </div>)
  } else if (card.type === 'checkcard') {
    formItem = (<div className="am-list-item check-card">
      <div className="am-list-line">
src/mob/searchconfig/source.jsx
@@ -23,11 +23,11 @@
    subType: 'datemonth',
    url: ''
  },
  {
    type: 'search',
    label: '日期(区间)',
    subType: 'daterange',
    url: ''
  },
  // {
  //   type: 'search',
  //   label: '日期(区间)',
  //   subType: 'daterange',
  //   url: ''
  // },
]
src/templates/sharecomponent/settingcomponent/index.jsx
@@ -131,7 +131,7 @@
          if (item.status === 'false') return
          if (/exec\s/ig.test(item.sql)) {
            maxScript = 100
            maxScript = 1000
          } else if (item.sql.length > maxScript) {
            maxScript = item.sql.length
          }
src/templates/zshare/formconfig.jsx
@@ -314,9 +314,9 @@
    }, {
      value: 'datemonth',
      text: Formdict['model.form.datemonth']
    }, {
      value: 'daterange',
      text: Formdict['model.form.daterange']
    // }, {
    //   value: 'daterange',
    //   text: Formdict['model.form.daterange']
    }]
  } else {
    typeOptions = [{
@@ -2740,17 +2740,20 @@
      type: 'select',
      key: 'fileType',
      label: '显示方式',
      initVal: card.fileType || (appType === 'mob' ? 'picture-card' : 'text'),
      initVal: card.fileType || 'text',
      options: [{
        value: 'text',
        text: '文件'
      }, {
      },
      {
        value: 'picture',
        text: '图文信息'
      }, {
      },
      {
        value: 'picture-card',
        text: '图片卡'
      }]
      }],
      forbid: appType === 'mob'
    },
    {
      type: 'number',
@@ -2947,20 +2950,20 @@
        text: 'nvarchar(50)'
      }]
    },
    {
      type: 'radio',
      key: 'mode',
      label: '模式',
      initVal: card.mode || 'picker',
      options: [{
        value: 'picker',
        text: '选择器'
      }, {
        value: 'calendar',
        text: '日历'
      }],
      forbid: appType !== 'mob'
    },
    // {
    //   type: 'radio',
    //   key: 'mode',
    //   label: '模式',
    //   initVal: card.mode || 'picker',
    //   options: [{
    //     value: 'picker',
    //     text: '选择器'
    //   }, {
    //     value: 'calendar',
    //     text: '日历'
    //   }],
    //   forbid: appType !== 'mob'
    // },
    {
      type: 'number',
      key: 'span',