king
2021-09-28 241a37c30386c6ceb2188a2c562de354ac232cb0
2021-09-28
11个文件已修改
122 ■■■■■ 已修改文件
src/menu/components/chart/antv-bar/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-pie/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-scatter/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/pastecomponent/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/index.jsx 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/calendarconfig/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/searchcomponent/index.jsx 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/subtableconfig/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/editcomponent/index.jsx 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-bar/index.jsx
@@ -1338,7 +1338,7 @@
            {appType !== 'mob' ? <Icon className="plus" title="添加按钮" onClick={this.addButton} type="plus-square" /> : null}
            <ChartCompileForm config={card} dict={this.state.dict} plotchange={this.updateComponent}/>
            <CopyComponent type="line" card={card}/>
            <PasteComponent config={card} options={['action', 'search', 'form']} updateConfig={this.updateComponent} />
            <PasteComponent config={card} options={['action']} updateConfig={this.updateComponent} />
            <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" />
            <LogComponent btnlog={card.btnlog || []} handlelog={this.handleLog} />
            <ClockComponent config={card} updateConfig={this.updateComponent}/>
src/menu/components/chart/antv-pie/index.jsx
@@ -17,7 +17,6 @@
const SettingComponent = asyncIconComponent(() => import('@/menu/datasource'))
const ChartCompileForm = asyncIconComponent(() => import('./chartcompile'))
const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
const PasteComponent = asyncIconComponent(() => import('@/menu/components/share/pastecomponent'))
const NormalHeader = asyncComponent(() => import('@/menu/components/share/normalheader'))
const UserComponent = asyncIconComponent(() => import('@/menu/components/share/usercomponent'))
const ClockComponent = asyncIconComponent(() => import('@/menu/components/share/clockcomponent'))
@@ -674,7 +673,6 @@
            {!ismob ? <Icon className="plus" title="添加搜索" onClick={this.addSearch} type="plus-circle" /> : null}
            <ChartCompileForm config={card} dict={this.state.dict} plotchange={this.updateComponent}/>
            <CopyComponent type="pie" card={card}/>
            <PasteComponent config={card} options={['search', 'form']} updateConfig={this.updateComponent} />
            <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" />
            <ClockComponent config={card} updateConfig={this.updateComponent}/>
            <UserComponent config={card}/>
src/menu/components/chart/antv-scatter/index.jsx
@@ -376,7 +376,7 @@
            {appType !== 'mob' ? <Icon className="plus" title="添加按钮" onClick={this.addButton} type="plus-square" /> : null}
            <ChartCompileForm config={card} dict={this.state.dict} plotchange={this.updateComponent}/>
            <CopyComponent type="line" card={card}/>
            <PasteComponent config={card} options={['action', 'search', 'form']} updateConfig={this.updateComponent}/>
            <PasteComponent config={card} options={['action']} updateConfig={this.updateComponent}/>
            <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors"/>
            <LogComponent btnlog={card.btnlog || []} handlelog={this.handleLog}/>
            <ClockComponent config={card} updateConfig={this.updateComponent}/>
src/menu/components/share/pastecomponent/index.jsx
@@ -162,10 +162,7 @@
        }
        MKEmitter.emit('addButton', config.uuid, res)
      } else if (type === 'search' || type === 'form') {
        config.search = config.search || []
        config.search = config.search.filter(item => !item.origin)
        let keys = config.search.map(item => item.field.toLowerCase())
        let keys = config.search.map(item => item.field ? item.field.toLowerCase() : '')
        if (type === 'form') {
          if (['number', 'switch', 'textarea', 'fileupload', 'hint', 'color', 'funcvar'].includes(res.type)) {
@@ -188,7 +185,9 @@
          return
        }
        config.search.push(res)
        MKEmitter.emit('plusSearch', config.uuid, res, 'simple')
        this.setState({visible: false})
        return
      } else if (type === 'cardcell') {
        config.subcards.push(res)
      } else if (type === 'menucell') {
src/menu/components/table/normal-table/index.scss
@@ -8,7 +8,7 @@
  min-height: 100px;
  
  .model-table-search-list {
    padding: 10px 0px 0px;
    padding: 10px 0px 15px;
    min-height: 65px;
    border-bottom: 1px solid #f0f0f0;
    >.anticon-question-circle {
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -692,15 +692,17 @@
                  delete _param.ErrMesg
                  delete _param.message
                  Api.genericInterface(_param).then(result => {
                    if (!result.status) {
                      notification.warning({
                        top: 92,
                        message: result.message,
                        duration: 5
                      })
                    }
                  })
                  setTimeout(() => {
                    Api.genericInterface(_param).then(result => {
                      if (!result.status) {
                        notification.warning({
                          top: 92,
                          message: result.message,
                          duration: 5
                        })
                      }
                    })
                  }, 600)
                }
                resolve(res)
              }, () => {
@@ -1160,15 +1162,17 @@
          delete _param.ErrMesg
          delete _param.message
  
          Api.genericInterface(_param).then(result => {
            if (!result.status) {
              notification.warning({
                top: 92,
                message: result.message,
                duration: 5
              })
            }
          })
          setTimeout(() => {
            Api.genericInterface(_param).then(result => {
              if (!result.status) {
                notification.warning({
                  top: 92,
                  message: result.message,
                  duration: 5
                })
              }
            })
          }, 600)
        }
        if (params.length === 0) {
          this.execSuccess(res)
src/templates/calendarconfig/index.jsx
@@ -767,7 +767,7 @@
              </div>
            } bordered={false} extra={
              <div>
                <EditComponent dict={this.state.dict} options={['search']} config={this.state.config}/>
                <EditComponent dict={this.state.dict} type="table" options={['search', 'form']} config={this.state.config}/>
                <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={this.state.config.enabled} onChange={this.onEnabledChange} />
                <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['model.save']}</Button>
                <Button onClick={this.cancelConfig}>{this.state.dict['model.back']}</Button>
src/templates/comtableconfig/index.jsx
@@ -1262,7 +1262,7 @@
              <div>
                <Versions MenuId={menu.MenuID} open_edition={openEdition} updateConfig={this.refreshConfig}/>
                <ReplaceField type="table" config={config} updateConfig={this.updateconfig}/>
                <EditComponent dict={this.state.dict} options={['search', 'action', 'columns']} config={this.state.config} MenuID={this.props.menu.MenuID} thawButtons={this.state.thawButtons} refresh={this.editConfig}/>
                <EditComponent dict={this.state.dict} type="table" options={['search', 'form', 'action', 'columns']} config={this.state.config} MenuID={this.props.menu.MenuID} thawButtons={this.state.thawButtons} refresh={this.editConfig}/>
                <Switch className="big" checkedChildren={this.state.dict['model.enable']} unCheckedChildren={this.state.dict['model.disable']} checked={this.state.config.enabled} onChange={this.onEnabledChange} />
                <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['model.save']}</Button>
                <Button onClick={this.cancelConfig}>{this.state.dict['model.back']}</Button>
src/templates/sharecomponent/searchcomponent/index.jsx
@@ -43,21 +43,21 @@
    })
  }
  /**
   * @description 监听到搜索条件复制时,触发搜索条件编辑
   */
  UNSAFE_componentWillReceiveProps (nextProps) {
    const { searchlist } = this.state
  // /**
  //  * @description 监听到搜索条件复制时,触发搜索条件编辑
  //  */
  // UNSAFE_componentWillReceiveProps (nextProps) {
  //   const { searchlist } = this.state
    if (!is(fromJS(nextProps.config.search), fromJS(this.props.config.search)) && !is(fromJS(nextProps.config.search), fromJS(searchlist))) {
      let len = nextProps.config.search.length
      let item = nextProps.config.search[len - 1]
      if (item && item.focus) {
        this.handleSearch(item)
      }
      this.setState({searchlist: fromJS(nextProps.config.search).toJS()})
    }
  }
  //   if (!is(fromJS(nextProps.config.search), fromJS(this.props.config.search)) && !is(fromJS(nextProps.config.search), fromJS(searchlist))) {
  //     let len = nextProps.config.search.length
  //     let item = nextProps.config.search[len - 1]
  //     if (item && item.focus) {
  //       this.handleSearch(item)
  //     }
  //     this.setState({searchlist: fromJS(nextProps.config.search).toJS()})
  //   }
  // }
  componentDidMount () {
    MKEmitter.addListener('plusSearch', this.plusSearch)
@@ -336,7 +336,7 @@
        <Tooltip placement="bottomLeft" overlayClassName="middle" title={dict['model.tooltip.search.guide']}>
          <Icon type="question-circle" />
        </Tooltip>
        <FieldsComponent config={config} type="search" />
        <FieldsComponent config={{uuid: config.uuid, search: searchlist}} type="search" />
        <Switch checkedChildren={dict['model.switch.open']} unCheckedChildren={dict['model.switch.close']} defaultChecked={showField} onChange={this.onFieldChange} />
        <DragElement
          list={searchlist}
src/templates/subtableconfig/index.jsx
@@ -1057,7 +1057,7 @@
              <div>
                <Versions MenuId={config.uuid} open_edition={openEdition} updateConfig={this.refreshConfig}/>
                <ReplaceField type="table" config={config} updateConfig={this.updateconfig}/>
                <EditComponent dict={this.state.dict} options={['search', 'action', 'columns']} config={config} MenuID={config.uuid} thawButtons={this.state.thawButtons} refresh={this.updateConfig}/>
                <EditComponent dict={this.state.dict} type="table" options={['search', 'form', 'action', 'columns']} config={config} MenuID={config.uuid} thawButtons={this.state.thawButtons} refresh={this.updateConfig}/>
                <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config.enabled} onChange={this.onEnabledChange} />
                <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['model.save']}</Button>
                <Button onClick={this.cancelConfig}>{this.state.dict['model.back']}</Button>
src/templates/zshare/editcomponent/index.jsx
@@ -117,16 +117,35 @@
  }
  pasteSubmit = () => {
    const { options, config } = this.props
    const { options, config, type } = this.props
    let _config = fromJS(this.props.config).toJS()
    this.pasteFormRef.handleConfirm().then(res => {
      if (res.copyType === 'action' && options.includes('action')) {
      if (!options.includes(res.copyType)) {
        notification.warning({
          top: 92,
          message: '配置信息格式错误!',
          duration: 5
        })
        return
      } else if (res.copyType === 'action') {
        res.uuid = Utils.getuuid()
        MKEmitter.emit('pasteButton', config.uuid, res)
      } else if (options.includes('search') && res.copyType === 'search') {
      } else if (res.copyType === 'search' || (type === 'table' && res.copyType === 'form')) {
        res.uuid = Utils.getuuid()
        let keys = _config.search.map(item => item.field ? item.field.toLowerCase() : '')
        if (type === 'table') {
          if (['number', 'switch', 'textarea', 'fileupload', 'hint', 'color', 'funcvar'].includes(res.type)) {
            res.type = 'text'
          } else if (res.type === 'radio') {
            res.type = 'select'
          } else if (res.type === 'checkbox') {
            res.type = 'multiselect'
          } else if (res.type === 'datetime') {
            res.type = 'date'
          }
        }
        if (res.field && keys.includes(res.field.toLowerCase())) {
          notification.warning({
@@ -137,12 +156,12 @@
          return
        }
        MKEmitter.emit('plusSearch', config.uuid, res, 'simple')
      } else if (options.includes('columns') && res.copyType === 'columns') {
      } else if (res.copyType === 'columns') {
        let keys = _config.columns.map(item => item.field ? item.field.toLowerCase() : '')
        let items = res.columns.filter(col => col.field && !keys.includes(col.field.toLowerCase()))
        
        MKEmitter.emit('plusColumns', config.uuid, items)
      } else if (options.includes('form') && res.copyType === 'form') {
      } else if (res.copyType === 'form') {
        let keys = _config.fields.map(item => item.field ? item.field.toLowerCase() : '')
        res.uuid = Utils.getuuid()