king
2021-05-26 f66e19dd13af07ee466306632ad43c72f1f16ae7
src/menu/pastecontroller/index.jsx
@@ -149,12 +149,16 @@
      item.btnlog = []
    }
    let oriUids = {}
    if (item.action) {
      if (sessionStorage.getItem('editMenuType') === 'popview') {
        item.action = item.action.filter(c => c.OpenType !== 'popview' && c.OpenType !== 'funcbutton')
      }
      item.action = item.action.map(cell => {
        let _uuid = Utils.getuuid()
        oriUids[cell.uuid] = _uuid
        if (cell.OpenType === 'popview') {
          let _cell = fromJS(cell).toJS()
          _cell.$originUuid = _cell.uuid
@@ -177,6 +181,13 @@
        return cell
      })
    }
    if (item.setting && item.setting.supModule) {
      item.setting.supModule = ''
    }
    if (item.wrap && item.wrap.doubleClick) {
      item.wrap.doubleClick = oriUids[item.wrap.doubleClick] || ''
    }
    return item
  }
@@ -187,14 +198,14 @@
    let isgroup = Tab && Tab.type === 'group' ? true : false
    this.pasteFormRef.handleConfirm().then(res => {
      if (!isgroup && !['tabs', 'datacard', 'propcard', 'mainsearch', 'group', 'normaltable', 'tablecard', 'line', 'bar', 'pie'].includes(res.copyType)) {
      if (!isgroup && !['tabs', 'datacard', 'propcard', 'mainsearch', 'group', 'normaltable', 'tablecard', 'line', 'bar', 'pie', 'dashboard', 'scatter'].includes(res.copyType)) {
        notification.warning({
          top: 92,
          message: '配置信息格式错误!',
          duration: 5
        })
        return
      } else if (isgroup && !['datacard', 'propcard', 'normaltable', 'tablecard', 'line', 'bar', 'pie'].includes(res.copyType)) {
      } else if (isgroup && !['datacard', 'propcard', 'normaltable', 'tablecard', 'line', 'bar', 'pie', 'dashboard', 'scatter'].includes(res.copyType)) {
        notification.warning({
          top: 92,
          message: '配置信息格式错误!',
@@ -241,7 +252,7 @@
    return (
      <div style={{display: 'inline-block'}}>
        {type !== 'menu' ? <Icon type="snippets" style={{color: 'purple'}} onClick={() => {this.setState({visible: true})}} /> : null}
        {type === 'menu' ? <Button type="link" style={{padding: '5px'}} icon="snippets" onClick={() => {this.setState({visible: true})}}>粘贴</Button> : null}
        {type === 'menu' ? <Button className="menu-config-paste" icon="snippets" onClick={() => {this.setState({visible: true})}}>粘贴</Button> : null}
        <Modal
          title="粘贴"
          visible={visible}