From da9942cd74b890c8533f475e7b333105c2358f0a Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 07 九月 2021 14:10:28 +0800
Subject: [PATCH] 2021-09-07

---
 src/menu/components/group/groupcomponents/index.jsx |    2 
 src/menu/components/group/paste/index.jsx           |  101 ++++++
 src/mob/components/tabs/antv-tabs/index.jsx         |    5 
 src/views/pcdesign/index.jsx                        |    2 
 src/menu/components/form/tab-form/index.jsx         |    2 
 src/menu/versions/index.scss                        |    4 
 src/utils/utils-custom.js                           |  239 +++++++++++++++
 src/menu/components/form/normal-form/index.jsx      |    2 
 src/menu/components/group/normal-group/options.jsx  |   93 ++++++
 src/menu/pastecontroller/index.jsx                  |  233 ++-------------
 src/menu/versions/index.jsx                         |   10 
 /dev/null                                           |   11 
 src/menu/components/group/paste/index.scss          |    4 
 src/menu/components/tabs/paste/index.scss           |    4 
 src/views/mobdesign/index.jsx                       |    2 
 src/menu/components/tabs/antv-tabs/index.jsx        |    4 
 src/menu/components/group/normal-group/index.jsx    |   24 +
 src/menu/popview/index.jsx                          |    2 
 src/views/menudesign/index.jsx                      |    2 
 src/menu/components/tabs/paste/index.jsx            |  146 +++++++++
 20 files changed, 661 insertions(+), 231 deletions(-)

diff --git a/src/menu/components/form/normal-form/index.jsx b/src/menu/components/form/normal-form/index.jsx
index 860f126..58f180c 100644
--- a/src/menu/components/form/normal-form/index.jsx
+++ b/src/menu/components/form/normal-form/index.jsx
@@ -650,7 +650,7 @@
             <NormalForm title="琛ㄥ崟璁剧疆" width={800} update={this.updateWrap} getForms={this.getWrapForms}>
               <Icon type="edit" style={{color: '#1890ff'}} title="缂栬緫"/>
             </NormalForm>
-            <CopyComponent type="propcard" card={card}/>
+            <CopyComponent type="stepform" card={card}/>
             <PasteComponent config={card} options={['form']} updateConfig={this.pasteForm} />
             <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle} type="font-colors" />
             <UserComponent config={card}/>
diff --git a/src/menu/components/form/tab-form/index.jsx b/src/menu/components/form/tab-form/index.jsx
index 5397c8c..ce0f66c 100644
--- a/src/menu/components/form/tab-form/index.jsx
+++ b/src/menu/components/form/tab-form/index.jsx
@@ -642,7 +642,7 @@
             <NormalForm title="琛ㄥ崟璁剧疆" width={800} update={this.updateWrap} getForms={this.getWrapForms}>
               <Icon type="edit" style={{color: '#1890ff'}} title="缂栬緫"/>
             </NormalForm>
-            <CopyComponent type="propcard" card={card}/>
+            <CopyComponent type="tabform" card={card}/>
             <PasteComponent config={card} options={['form']} updateConfig={this.pasteForm} />
             <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle} type="font-colors" />
             <UserComponent config={card}/>
diff --git a/src/menu/components/group/groupcomponents/index.jsx b/src/menu/components/group/groupcomponents/index.jsx
index 2c3213c..1efe235 100644
--- a/src/menu/components/group/groupcomponents/index.jsx
+++ b/src/menu/components/group/groupcomponents/index.jsx
@@ -59,7 +59,7 @@
     drop(item) {
       if (item.hasOwnProperty('originalIndex') || item.added) {
         return
-      } else if (['login', 'navbar', 'topbar', 'tabs', 'search', 'group'].includes(item.component)) {
+      } else if (['login', 'navbar', 'topbar', 'tabs', 'search', 'group', 'menubar'].includes(item.component)) {
         return
       }
 
diff --git a/src/menu/components/group/groupsetting/index.jsx b/src/menu/components/group/groupsetting/index.jsx
deleted file mode 100644
index fc8bca0..0000000
--- a/src/menu/components/group/groupsetting/index.jsx
+++ /dev/null
@@ -1,81 +0,0 @@
-import React, {Component} from 'react'
-import PropTypes from 'prop-types'
-import { is, fromJS } from 'immutable'
-import { Icon, Modal } from 'antd'
-
-import zhCN from '@/locales/zh-CN/model.js'
-import enUS from '@/locales/en-US/model.js'
-import SettingForm from './settingform'
-import './index.scss'
-
-class DataSource extends Component {
-  static propTpyes = {
-    config: PropTypes.any,
-    updateConfig: PropTypes.func
-  }
-
-  state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
-    visible: false,
-    setting: null
-  }
-
-  UNSAFE_componentWillMount () {
-    const { config } = this.props
-
-    this.setState({setting: fromJS(config.setting).toJS()})
-  }
-
-  shouldComponentUpdate (nextProps, nextState) {
-    return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
-  }
-
-  editDataSource = () => {
-    this.setState({
-      visible: true
-    })
-  }
-
-  verifySubmit = () => {
-    const { config } = this.props
-
-    this.verifyRef.handleConfirm().then(res => {
-
-      this.setState({
-        setting: res,
-        visible: false
-      })
-      this.props.updateConfig({...config, setting: res})
-    })
-  }
-
-  render () {
-    const { visible, dict, setting } = this.state
-
-    return (
-      <div className="model-menu-setting-wrap">
-        <Icon type="edit" title="缂栬緫" onClick={() => this.editDataSource()} />
-        <Modal
-          wrapClassName="popview-modal"
-          title={'鏍囩椤甸厤缃�'}
-          visible={visible}
-          width={700}
-          maskClosable={false}
-          okText={dict['model.submit']}
-          onOk={this.verifySubmit}
-          onCancel={() => { this.setState({ visible: false }) }}
-          destroyOnClose
-        >
-          <SettingForm
-            dict={dict}
-            setting={setting}
-            inputSubmit={this.verifySubmit}
-            wrappedComponentRef={(inst) => this.verifyRef = inst}
-          />
-        </Modal>
-      </div>
-    )
-  }
-}
-
-export default DataSource
\ No newline at end of file
diff --git a/src/menu/components/group/groupsetting/index.scss b/src/menu/components/group/groupsetting/index.scss
deleted file mode 100644
index 04372e6..0000000
--- a/src/menu/components/group/groupsetting/index.scss
+++ /dev/null
@@ -1,7 +0,0 @@
-.model-menu-setting-wrap {
-  display: inline-block;
-
-  >.anticon-edit {
-    color: #1890ff;
-  }
-}
\ No newline at end of file
diff --git a/src/menu/components/group/groupsetting/settingform/index.jsx b/src/menu/components/group/groupsetting/settingform/index.jsx
deleted file mode 100644
index e706af1..0000000
--- a/src/menu/components/group/groupsetting/settingform/index.jsx
+++ /dev/null
@@ -1,185 +0,0 @@
-import React, {Component} from 'react'
-import PropTypes from 'prop-types'
-import { Form, Row, Col, Input, Tooltip, Icon, InputNumber, Select, Radio } from 'antd'
-
-import './index.scss'
-
-class SettingForm extends Component {
-  static propTpyes = {
-    dict: PropTypes.object,       // 瀛楀吀椤�
-    setting: PropTypes.object,    // 鏁版嵁婧愰厤缃�
-    inputSubmit: PropTypes.func   // 鍥炶溅浜嬩欢
-  }
-
-  state = {
-    roleList: [],
-    appType: sessionStorage.getItem('appType'),
-    print: this.props.setting.print || 'false'
-  }
-
-  UNSAFE_componentWillMount () {
-    let roleList = sessionStorage.getItem('sysRoles')
-    if (roleList) {
-      try {
-        roleList = JSON.parse(roleList)
-      } catch (e) {
-        roleList = []
-      }
-    } else {
-      roleList = []
-    }
-
-    this.setState({roleList})
-  }
-
-  handleConfirm = () => {
-    // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭�
-    return new Promise((resolve, reject) => {
-      this.props.form.validateFieldsAndScroll((err, values) => {
-        if (!err) {
-          resolve(values)
-        } else {
-          reject(err)
-        }
-      })
-    })
-  }
-
-  handleSubmit = (e) => {
-    e.preventDefault()
-
-    if (this.props.inputSubmit) {
-      this.props.inputSubmit()
-    }
-  }
-
-  render() {
-    const { setting, dict } = this.props
-    const { getFieldDecorator } = this.props.form
-    const { roleList, print, appType } = this.state
-
-    const formItemLayout = {
-      labelCol: {
-        xs: { span: 24 },
-        sm: { span: 8 }
-      },
-      wrapperCol: {
-        xs: { span: 24 },
-        sm: { span: 16 }
-      }
-    }
-
-    return (
-      <div className="model-menu-setting-form">
-        <Form {...formItemLayout}>
-          <Row gutter={24}>
-            <Col span={12}>
-              <Form.Item label={
-                <Tooltip placement="topLeft" title="鐢ㄤ簬缁勪欢闂寸殑鍖哄垎銆�">
-                  <Icon type="question-circle" />
-                  缁勪欢鍚嶇О
-                </Tooltip>
-              }>
-                {getFieldDecorator('name', {
-                  initialValue: setting.name,
-                  rules: [
-                    {
-                      required: true,
-                      message: this.props.dict['form.required.input'] + '缁勪欢鍚嶇О!'
-                    }
-                  ]
-                })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit}/>)}
-              </Form.Item>
-            </Col>
-            <Col span={12}>
-              <Form.Item label={
-                <Tooltip placement="topLeft" title="鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��">
-                  <Icon type="question-circle" />
-                  瀹藉害
-                </Tooltip>
-              }>
-                {getFieldDecorator('width', {
-                  initialValue: setting.width || 24,
-                  rules: [
-                    {
-                      required: true,
-                      message: this.props.dict['form.required.input'] + '瀹藉害!'
-                    }
-                  ]
-                })(<InputNumber min={1} max={24} precision={0} onPressEnter={this.handleSubmit}/>)}
-              </Form.Item>
-            </Col>
-            {appType !== 'mob' ? <Col span={12}>
-              <Form.Item label="鎵撳嵃鎸夐挳">
-                {getFieldDecorator('print', {
-                  initialValue: print
-                })(
-                  <Radio.Group style={{whiteSpace: 'nowrap'}} onChange={(e) => {this.setState({print: e.target.value})}}>
-                    <Radio key="true" value="true"> 鏄剧ず </Radio>
-                    <Radio key="false" value="false"> 闅愯棌 </Radio>
-                  </Radio.Group>
-                )}
-              </Form.Item>
-            </Col> : null}
-            {print === 'true' && appType !== 'mob' ? <Col span={12}>
-              <Form.Item label="鎵撳嵃灏哄">
-                {getFieldDecorator('pageSize', {
-                  initialValue: setting.pageSize || 'A4',
-                  rules: [
-                    {
-                      required: true,
-                      message: '璇烽�夋嫨鎵撳嵃灏哄!'
-                    }
-                  ]
-                })(
-                  <Select>
-                    <Select.Option value="A3">A3</Select.Option>
-                    <Select.Option value="A4">A4</Select.Option>
-                    <Select.Option value="A5">A5</Select.Option>
-                  </Select>
-                )}
-              </Form.Item>
-            </Col> : null}
-            {print === 'true' && appType !== 'mob' ? <Col span={12}>
-              <Form.Item label="鎵撳嵃甯冨眬">
-                {getFieldDecorator('pageLayout', {
-                  initialValue: setting.pageLayout || 'vertical',
-                  rules: [
-                    {
-                      required: true,
-                      message: dict['mob.required.select'] + '鎵撳嵃甯冨眬!'
-                    }
-                  ]
-                })(
-                  <Radio.Group>
-                    <Radio value="vertical">绾靛悜</Radio>
-                    <Radio value="horizontal">妯悜</Radio>
-                  </Radio.Group>
-                )}
-              </Form.Item>
-            </Col> : null}
-            <Col span={12}>
-              <Form.Item label="榛戝悕鍗�">
-                {getFieldDecorator('blacklist', {
-                  initialValue: setting.blacklist || []
-                })(
-                  <Select
-                    showSearch
-                    mode="multiple"
-                    filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
-                  >
-                    {roleList.map(option =>
-                      <Select.Option key={option.uuid} value={option.value}>{option.text}</Select.Option>
-                    )}
-                  </Select>
-                )}
-              </Form.Item>
-            </Col>
-          </Row>
-        </Form>
-      </div>
-    )
-  }
-}
-
-export default Form.create()(SettingForm)
\ No newline at end of file
diff --git a/src/menu/components/group/groupsetting/settingform/index.scss b/src/menu/components/group/groupsetting/settingform/index.scss
deleted file mode 100644
index 159130b..0000000
--- a/src/menu/components/group/groupsetting/settingform/index.scss
+++ /dev/null
@@ -1,11 +0,0 @@
-.model-menu-setting-form {
-  position: relative;
-
-  .anticon-question-circle {
-    color: #c49f47;
-    margin-right: 3px;
-  }
-  .ant-input-number {
-    width: 100%;
-  }
-}
\ No newline at end of file
diff --git a/src/menu/components/group/normal-group/index.jsx b/src/menu/components/group/normal-group/index.jsx
index ac34bbd..41dc6ed 100644
--- a/src/menu/components/group/normal-group/index.jsx
+++ b/src/menu/components/group/normal-group/index.jsx
@@ -7,13 +7,14 @@
 import asyncComponent from '@/utils/asyncComponent'
 import asyncIconComponent from '@/utils/asyncIconComponent'
 import { resetStyle } from '@/utils/utils-custom.js'
+import getSettingForm from './options'
 import zhCN from '@/locales/zh-CN/model.js'
 import enUS from '@/locales/en-US/model.js'
 import './index.scss'
 
-const SettingComponent = asyncIconComponent(() => import('../groupsetting'))
+const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
 const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
-const PasteController = asyncIconComponent(() => import('@/menu/pastecontroller'))
+const PasteComponent = asyncIconComponent(() => import('../paste'))
 const GroupComponents = asyncComponent(() => import('../groupcomponents'))
 
 class NormalGroup extends Component {
@@ -146,10 +147,23 @@
   insert = (item) => {
     let group = fromJS(this.state.group).toJS()
 
+    item.floor = group.floor || 1
+    item.parentId = group.parentId
+
     group.components.push(item)
 
     this.setState({group})
     this.props.updateConfig(group)
+  }
+
+  getWrapForms = () => {
+    const { setting } = this.state.group
+
+    return getSettingForm(setting)
+  }
+
+  updateWrap = (res) => {
+    this.updateComponent({...this.state.group, setting: res})
   }
 
   clickComponent = (e) => {
@@ -172,9 +186,11 @@
       <div className={'menu-group-edit-box' + (paddingTop ? ' padding' : '')} style={_style} onClick={this.clickComponent} id={group.uuid}>
         <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
           <div className="mk-popover-control">
-            <SettingComponent config={group} updateConfig={this.updateComponent} />
+            <NormalForm title="鍒嗙粍璁剧疆" width={700} update={this.updateWrap} getForms={this.getWrapForms}>
+              <Icon type="edit" style={{color: '#1890ff'}} title="缂栬緫"/>
+            </NormalForm>
             <CopyComponent type="tabs" card={group}/>
-            <PasteController type="tab" Tab={group} insert={this.insert} />
+            <PasteComponent insert={this.insert} />
             <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle} type="font-colors" />
             <Icon className="close" title="delete" type="delete" onClick={() => this.props.deletecomponent(group.uuid)} />
           </div>
diff --git a/src/menu/components/group/normal-group/options.jsx b/src/menu/components/group/normal-group/options.jsx
new file mode 100644
index 0000000..fcaca1a
--- /dev/null
+++ b/src/menu/components/group/normal-group/options.jsx
@@ -0,0 +1,93 @@
+/**
+ * @description Wrap琛ㄥ崟閰嶇疆淇℃伅
+ */
+export default function (setting) {
+  let roleList = sessionStorage.getItem('sysRoles')
+  let appType = sessionStorage.getItem('appType')
+
+  if (roleList) {
+    try {
+      roleList = JSON.parse(roleList)
+    } catch (e) {
+      roleList = []
+    }
+  } else {
+    roleList = []
+  }
+
+  const settingForm = [
+    {
+      type: 'text',
+      field: 'name',
+      label: '缁勪欢鍚嶇О',
+      initval: setting.name || '',
+      tooltip: '鐢ㄤ簬缁勪欢闂寸殑鍖哄垎銆�',
+      required: true
+    },
+    {
+      type: 'number',
+      field: 'width',
+      label: '瀹藉害',
+      initval: setting.width || 24,
+      tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��',
+      min: 1,
+      max: 24,
+      precision: 0,
+      required: true
+    },
+    {
+      type: 'radio',
+      field: 'print',
+      label: '鎵撳嵃鎸夐挳',
+      initval: setting.print || 'false',
+      required: false,
+      options: [
+        {value: 'true', label: '鏄剧ず'},
+        {value: 'false', label: '闅愯棌'},
+      ],
+      controlFields: [
+        {field: 'pageSize', values: ['true']},
+        {field: 'pageLayout', values: ['true']},
+        {field: 'syncModule', values: ['true']},
+        {field: 'checkAll', values: ['true']},
+      ],
+      forbid: appType === 'mob'
+    },
+    {
+      type: 'radio',
+      field: 'pageSize',
+      label: '鎵撳嵃灏哄',
+      initval: setting.pageSize || 'A4',
+      required: true,
+      options: [
+        {value: 'A3', label: 'A3'},
+        {value: 'A4', label: 'A4'},
+        {value: 'A5', label: 'A5'},
+      ],
+      forbid: appType === 'mob'
+    },
+    {
+      type: 'radio',
+      field: 'pageLayout',
+      label: '鎵撳嵃甯冨眬',
+      initval: setting.pageLayout || 'vertical',
+      required: true,
+      options: [
+        {value: 'vertical', label: '绾靛悜'},
+        {value: 'horizontal', label: '妯悜'},
+      ],
+      forbid: appType === 'mob'
+    },
+    {
+      type: 'multiselect',
+      field: 'blacklist',
+      label: '榛戝悕鍗�',
+      initval: setting.blacklist || [],
+      required: false,
+      options: roleList,
+      forbid: !!appType
+    },
+  ]
+
+  return settingForm
+} 
\ No newline at end of file
diff --git a/src/menu/components/group/paste/index.jsx b/src/menu/components/group/paste/index.jsx
new file mode 100644
index 0000000..e17c39f
--- /dev/null
+++ b/src/menu/components/group/paste/index.jsx
@@ -0,0 +1,101 @@
+import React, {Component} from 'react'
+import PropTypes from 'prop-types'
+import { Icon, Modal, notification } from 'antd'
+
+import MenuUtils from '@/utils/utils-custom.js'
+import MKEmitter from '@/utils/events.js'
+import asyncComponent from '@/utils/asyncComponent'
+import './index.scss'
+
+const PasteForm = asyncComponent(() => import('@/templates/zshare/pasteform'))
+
+class PasteGroup extends Component {
+  static propTpyes = {
+    insert: PropTypes.func
+  }
+
+  state = {
+    visible: false
+  }
+
+  handleMenuClick = () => {
+    this.setState({visible: true})
+  }
+
+  pasteSubmit = () => {
+    let options = ['datacard', 'propcard', 'balcony', 'stepform', 'tabform', 'normaltable', 'tablecard', 'line', 'bar', 'pie', 'dashboard', 'scatter']
+    let types = {
+      login: '鐧诲綍',
+      navbar: '瀵艰埅鏍�',
+      topbar: '瀵艰埅鏍�',
+      tabs: '鏍囩椤�',
+      search: '鎼滅储',
+      mainsearch: '鎼滅储',
+      group: '鍒嗙粍',
+      menubar: '鑿滃崟'
+    }
+
+    this.pasteFormRef.handleConfirm().then(res => {
+      if (res.copyType && types[res.copyType]) {
+        notification.warning({
+          top: 92,
+          message: '鍒嗙粍涓笉鍙坊鍔犮��' + types[res.copyType] + '銆嬬粍浠讹紒',
+          duration: 5
+        })
+        return
+      } else if (!options.includes(res.copyType)) {
+        notification.warning({
+          top: 92,
+          message: '閰嶇疆淇℃伅鏍煎紡閿欒锛�',
+          duration: 5
+        })
+        return
+      }
+
+      let copyBtns = new Map()
+
+      res = MenuUtils.resetComponentConfig(res, copyBtns)
+
+      delete res.copyType
+      
+      this.props.insert(res)
+
+      copyBtns = [...copyBtns.values()]
+
+      if (copyBtns.length > 0) {
+        MKEmitter.emit('copyButtons', copyBtns)
+      }
+
+      this.setState({visible: false})
+
+      notification.success({
+        top: 92,
+        message: '绮樿创鎴愬姛锛�',
+        duration: 2
+      })
+    })
+  }
+
+  render() {
+    const { visible } = this.state
+
+    return (
+      <div style={{display: 'inline-block'}}>
+        <Icon type="snippets" style={{color: 'purple'}} onClick={() => {this.setState({visible: true})}} />
+        <Modal
+          title="绮樿创"
+          visible={visible}
+          width={600}
+          maskClosable={false}
+          onOk={this.pasteSubmit}
+          onCancel={() => {this.setState({visible: false})}}
+          destroyOnClose
+        >
+          <PasteForm wrappedComponentRef={(inst) => this.pasteFormRef = inst} inputSubmit={this.pasteSubmit}/>
+        </Modal>
+      </div>
+    )
+  }
+}
+
+export default PasteGroup
\ No newline at end of file
diff --git a/src/menu/components/group/paste/index.scss b/src/menu/components/group/paste/index.scss
new file mode 100644
index 0000000..384a820
--- /dev/null
+++ b/src/menu/components/group/paste/index.scss
@@ -0,0 +1,4 @@
+.menu-config-paste {
+  border-color: #40a9ff;
+  color: #40a9ff;
+}
\ No newline at end of file
diff --git a/src/menu/components/tabs/antv-tabs/index.jsx b/src/menu/components/tabs/antv-tabs/index.jsx
index 31c2f9c..ffa7b25 100644
--- a/src/menu/components/tabs/antv-tabs/index.jsx
+++ b/src/menu/components/tabs/antv-tabs/index.jsx
@@ -17,7 +17,7 @@
 
 const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
 const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
-const PasteController = asyncIconComponent(() => import('@/menu/pastecontroller'))
+const PasteComponent = asyncIconComponent(() => import('../paste'))
 const TabComponents = asyncComponent(() => import('../tabcomponents'))
 
 const { TabPane } = Tabs
@@ -370,7 +370,7 @@
                   <NormalForm title="鏍囩缂栬緫" width={600} update={this.updateTab} getForms={() => this.getTabForms(tab)}>
                     <Icon type="edit" style={{color: '#1890ff'}} title="缂栬緫"/>
                   </NormalForm>
-                  <PasteController type="tab" Tab={tab} insert={this.insert} />
+                  <PasteComponent Tab={tab} insert={this.insert} />
                   <Icon className="close" title="delete" type="close" onClick={() => this.delTab(tab)} />
                 </div>
               } trigger="hover">
diff --git a/src/menu/components/tabs/paste/index.jsx b/src/menu/components/tabs/paste/index.jsx
new file mode 100644
index 0000000..c51ac9f
--- /dev/null
+++ b/src/menu/components/tabs/paste/index.jsx
@@ -0,0 +1,146 @@
+import React, {Component} from 'react'
+import PropTypes from 'prop-types'
+import { Icon, Modal, notification } from 'antd'
+
+import MenuUtils from '@/utils/utils-custom.js'
+import MKEmitter from '@/utils/events.js'
+import asyncComponent from '@/utils/asyncComponent'
+import './index.scss'
+
+const PasteForm = asyncComponent(() => import('@/templates/zshare/pasteform'))
+
+class PasteGroup extends Component {
+  static propTpyes = {
+    Tab: PropTypes.any,         // 鏍囩
+    insert: PropTypes.func
+  }
+
+  state = {
+    visible: false
+  }
+
+  handleMenuClick = () => {
+    this.setState({visible: true})
+  }
+
+  resetconfig = (item, Tab, copyBtns) => {
+    item.floor = Tab.floor + 1
+    item.tabId = Tab.uuid
+    item.parentId = Tab.parentId
+    
+    if (item.type === 'tabs') {
+      item.uuid = MenuUtils.getuuid()
+      item.setting.name = item.setting.name + MenuUtils.getdataName().toUpperCase().substr(-4)
+      item.name = item.setting.name
+      
+      item.subtabs.forEach(tab => {
+        tab.uuid = MenuUtils.getuuid()
+        tab.parentId = item.uuid
+
+        if (item.floor >= 3) {
+          tab.components = tab.components.filter(cell => cell.type !== 'tabs')
+        }
+
+        tab.components = tab.components.map(cell => {
+          cell = this.resetconfig(cell, tab, copyBtns)
+          return cell
+        })
+      })
+    } else if (item.type === 'group') {
+      item.uuid = MenuUtils.getuuid()
+      item.setting.name = item.setting.name + MenuUtils.getdataName().toUpperCase().substr(-4)
+      item.name = item.setting.name
+
+      item.components = item.components.map(cell => {
+        cell.floor = Tab.floor + 1
+        cell.tabId = Tab.uuid
+        cell.parentId = Tab.parentId
+
+        cell = MenuUtils.resetComponentConfig(cell, copyBtns)
+
+        return cell
+      })
+    } else {
+      item = MenuUtils.resetComponentConfig(item, copyBtns)
+    }
+
+    return item
+  }
+
+  pasteSubmit = () => {
+    const { Tab } = this.props
+    let options = ['tabs', 'group', 'datacard', 'propcard', 'balcony', 'normaltable', 'mainsearch', 'stepform', 'tabform', 'tablecard', 'line', 'bar', 'pie', 'dashboard', 'scatter']
+    let types = {
+      login: '鐧诲綍',
+      navbar: '瀵艰埅鏍�',
+      topbar: '瀵艰埅鏍�'
+    }
+
+    if (sessionStorage.getItem('appType') === 'mob') {
+      options.push('menubar')
+    }
+
+    this.pasteFormRef.handleConfirm().then(res => {
+      if (res.copyType && types[res.copyType]) {
+        notification.warning({
+          top: 92,
+          message: '鍒嗙粍涓笉鍙坊鍔犮��' + types[res.copyType] + '銆嬬粍浠讹紒',
+          duration: 5
+        })
+        return
+      } else if (!options.includes(res.copyType)) {
+        notification.warning({
+          top: 92,
+          message: '閰嶇疆淇℃伅鏍煎紡閿欒锛�',
+          duration: 5
+        })
+        return
+      }
+
+      let copyBtns = new Map()
+
+      res = this.resetconfig(res, Tab, copyBtns)
+
+      delete res.copyType
+      
+      this.props.insert(res, Tab)
+
+      copyBtns = [...copyBtns.values()]
+
+      if (copyBtns.length > 0) {
+        MKEmitter.emit('copyButtons', copyBtns)
+      }
+
+      this.setState({visible: false})
+
+      notification.success({
+        top: 92,
+        message: '绮樿创鎴愬姛锛�',
+        duration: 2
+      })
+    })
+  }
+
+  render() {
+    const { visible } = this.state
+
+    return (
+      <div style={{display: 'inline-block'}}>
+        <Icon type="snippets" style={{color: 'purple'}} onClick={() => {this.setState({visible: true})}} />
+        <Modal
+          title="绮樿创"
+          visible={visible}
+          width={600}
+          maskClosable={false}
+          onOk={this.pasteSubmit}
+          onCancel={() => {this.setState({visible: false})}}
+          destroyOnClose
+        >
+          <PasteForm wrappedComponentRef={(inst) => this.pasteFormRef = inst} inputSubmit={this.pasteSubmit}/>
+        </Modal>
+      </div>
+    )
+  }
+}
+
+export default PasteGroup
\ No newline at end of file
diff --git a/src/menu/components/tabs/paste/index.scss b/src/menu/components/tabs/paste/index.scss
new file mode 100644
index 0000000..384a820
--- /dev/null
+++ b/src/menu/components/tabs/paste/index.scss
@@ -0,0 +1,4 @@
+.menu-config-paste {
+  border-color: #40a9ff;
+  color: #40a9ff;
+}
\ No newline at end of file
diff --git a/src/menu/pastecontroller/index.jsx b/src/menu/pastecontroller/index.jsx
index 2a7aebe..96179d1 100644
--- a/src/menu/pastecontroller/index.jsx
+++ b/src/menu/pastecontroller/index.jsx
@@ -1,9 +1,8 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
-import { fromJS } from 'immutable'
-import { Icon, Modal, Button, notification } from 'antd'
+import { Modal, Button, notification } from 'antd'
 
-import Utils from '@/utils/utils.js'
+import MenuUtils from '@/utils/utils-custom.js'
 import MKEmitter from '@/utils/events.js'
 import asyncComponent from '@/utils/asyncComponent'
 import './index.scss'
@@ -12,8 +11,6 @@
 
 class PasteController extends Component {
   static propTpyes = {
-    type: PropTypes.any,        // 缁勪欢绫诲瀷
-    Tab: PropTypes.any,         // 鏍囩锛屾坊鍔犺彍鍗曠粍浠舵椂涓虹┖
     insert: PropTypes.func
   }
 
@@ -25,220 +22,68 @@
     this.setState({visible: true})
   }
 
-  resetconfig = (item, Tab, isgroup, copyBtns) => {
-    item.uuid = Utils.getuuid()
-    item.floor = Tab ? (Tab.floor + 1) : 1
-
-    if (Tab && !isgroup) {
-      item.tabId = Tab.uuid
-      item.parentId = Tab.parentId
-    } else if (Tab) {
-      item.floor = Tab.floor || 1
-      item.parentId = Tab.parentId
-    }
-
-    if (item.dataName) {
-      item.dataName = Utils.getdataName()
-    }
-
+  resetconfig = (item, copyBtns) => {
+    let appType = sessionStorage.getItem('appType')
+    
     if (item.type === 'tabs') {
+      item.uuid = MenuUtils.getuuid()
+      item.setting.name = item.setting.name + MenuUtils.getdataName().toUpperCase().substr(-4)
+      item.name = item.setting.name
+
       item.subtabs.forEach(tab => {
-        tab.uuid = Utils.getuuid()
+        tab.uuid = MenuUtils.getuuid()
         tab.parentId = item.uuid
 
-        if (item.floor >= 3) {
-          tab.components = tab.components.filter(cell => cell.type !== 'tabs')
+        if (appType !== 'mob') {
+          tab.components = tab.components.filter(cell => cell.type !== 'menubar')
         }
 
         tab.components = tab.components.map(cell => {
-          cell = this.resetconfig(cell, tab, false, copyBtns)
+          cell.floor = tab.floor + 1
+          cell.tabId = tab.uuid
+          cell.parentId = tab.parentId
+
+          cell = this.resetconfig(cell, copyBtns)
           return cell
         })
       })
     } else if (item.type === 'group') {
+      item.uuid = MenuUtils.getuuid()
+      item.setting.name = item.setting.name + MenuUtils.getdataName().toUpperCase().substr(-4)
+      item.name = item.setting.name
+      if (appType !== 'mob') {
+        item.components = item.components.filter(cell => cell.type !== 'menubar')
+      }
       item.components = item.components.map(cell => {
-        cell = this.resetconfig(cell, item, true, copyBtns)
+        cell.floor = item.floor
+        cell.tabId = item.tabId || ''
+        cell.parentId = item.parentId || ''
+
+        cell = MenuUtils.resetComponentConfig(cell, copyBtns)
         return cell
       })
-    } else if (item.type === 'menubar') {
-      item.subMenus = item.subMenus.map(cell => {
-        cell.uuid = Utils.getuuid()
-        return cell
-      })
-    } else if (item.type === 'balcony') {
-      item.elements = item.elements.map(cell => {
-        cell.uuid = Utils.getuuid()
-        return cell
-      })
-    } else if (item.type === 'card' || (item.type === 'table' && item.subtype === 'tablecard')) {
-      item.subcards && item.subcards.forEach(card => {
-        card.uuid = Utils.getuuid()
-        if (card.elements) {
-          if (sessionStorage.getItem('editMenuType') === 'popview') {
-            card.elements = card.elements.filter(b => b.OpenType !== 'popview' && b.OpenType !== 'funcbutton')
-          }
-          card.elements = card.elements.map(cell => {
-            let _uuid = Utils.getuuid()
-            if (cell.OpenType === 'popview') {
-              let _cell = fromJS(cell).toJS()
-              _cell.$originUuid = _cell.uuid
-              _cell.uuid = _uuid
-              copyBtns.set(_uuid, _cell)
-            }
-            cell.uuid = _uuid
-            return cell
-          })
-        }
-        if (card.backElements) {
-          if (sessionStorage.getItem('editMenuType') === 'popview') {
-            card.elements = card.elements.filter(b => b.OpenType !== 'popview' && b.OpenType !== 'funcbutton')
-          }
-          card.backElements = card.backElements.map(cell => {
-            let _uuid = Utils.getuuid()
-            if (cell.OpenType === 'popview') {
-              let _cell = fromJS(cell).toJS()
-              _cell.$originUuid = _cell.uuid
-              _cell.uuid = _uuid
-              copyBtns.set(_uuid, _cell)
-            }
-            cell.uuid = _uuid
-            return cell
-          })
-        }
-      })
-    } else if (item.type === 'table' && item.subtype === 'normaltable' && item.cols) {
-      let loopCol = (col) => {
-        col.subcols = col.subcols.map(c => {
-          c.uuid = Utils.getuuid()
-
-          if (c.type === 'colspan' && c.subcols) {
-            c = loopCol(c)
-          } else if (c.type === 'custom' && c.elements) {
-            c.elements = c.elements.map(cell => {
-              cell.uuid = Utils.getuuid()
-              return cell
-            })
-          }
-          return c
-        })
-
-        return col
-      }
-
-      item.cols = item.cols.map(col => {
-        col.uuid = Utils.getuuid()
-
-        if (col.type === 'colspan' && col.subcols) {
-          col = loopCol(col)
-        } else if (col.type === 'custom' && col.elements) {
-          col.elements = col.elements.map(cell => {
-            cell.uuid = Utils.getuuid()
-            return cell
-          })
-        } else if (col.type === 'action' && col.elements) {
-          if (sessionStorage.getItem('editMenuType') === 'popview') {
-            col.elements = col.elements.filter(c => c.OpenType !== 'popview' && c.OpenType !== 'funcbutton')
-          }
-          col.elements = col.elements.map(cell => {
-            let _uuid = Utils.getuuid()
-            if (cell.OpenType === 'popview') {
-              let _cell = fromJS(cell).toJS()
-              _cell.$originUuid = _cell.uuid
-              _cell.uuid = _uuid
-              copyBtns.set(_uuid, _cell)
-            }
-            cell.uuid = _uuid
-            return cell
-          })
-        }
-        return col
-      })
-    } else if (item.type === 'form') {
-      item.subcards = item.subcards.map(cell => {
-        cell.uuid = Utils.getuuid()
-
-        cell.fields = cell.fields.map(m => {
-          m.uuid = Utils.getuuid()
-  
-          return m
-        })
-        return cell
-      })
-    }
-
-    if (item.btnlog) {
-      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
-          _cell.uuid = _uuid
-          copyBtns.set(_uuid, _cell)
-        }
-        cell.uuid = _uuid
-        return cell
-      })
-    }
-    if (item.search) {
-      item.search = item.search.map(cell => {
-        cell.uuid = Utils.getuuid()
-        return cell
-      })
-    }
-    if (item.columns) {
-      item.columns = item.columns.map(cell => {
-        cell.uuid = Utils.getuuid()
-        return cell
-      })
-    }
-    if (item.setting && item.setting.supModule) {
-      item.setting.supModule = ''
-    }
-    
-    if (item.wrap && item.wrap.doubleClick) {
-      item.wrap.doubleClick = oriUids[item.wrap.doubleClick] || ''
+    } else {
+      item = MenuUtils.resetComponentConfig(item, copyBtns)
     }
 
     return item
   }
 
   pasteSubmit = () => {
-    const { Tab } = this.props
-
-    let isgroup = Tab && Tab.type === 'group' ? true : false
-    let options = ['tabs', 'datacard', 'propcard', 'mainsearch', 'balcony', 'group', 'normaltable', 'tablecard', 'line', 'bar', 'pie', 'dashboard', 'scatter']
-
-    if (sessionStorage.getItem('appType') === 'mob') {
-      options.push('menubar')
-    }
-
-    if (isgroup) {
-      options = options.filter(item => !['tabs', 'mainsearch', 'group'].includes(item))
-    }
+    let options = ['tabs', 'menubar', 'datacard', 'propcard', 'mainsearch', 'stepform', 'tabform', 'balcony', 'group', 'normaltable', 'tablecard', 'line', 'bar', 'pie', 'dashboard', 'scatter']
 
     this.pasteFormRef.handleConfirm().then(res => {
-      if (!options.includes(res.copyType)) {
+      if (res.copyType === 'menubar' && sessionStorage.getItem('appType') !== 'mob') {
         notification.warning({
           top: 92,
-          message: '閰嶇疆淇℃伅鏍煎紡閿欒锛�',
+          message: '褰撳墠绯荤粺涓嶆敮鎸佽彍鍗曠粍浠讹紒',
           duration: 5
         })
         return
-      } else if (Tab && Tab.floor === 3 && res.type === 'tabs') {
+      } else if (!options.includes(res.copyType)) {
         notification.warning({
           top: 92,
-          message: '鏍囩椤垫渶澶氫负涓夐噸缁撴瀯锛�',
+          message: '閰嶇疆淇℃伅鏍煎紡閿欒锛�',
           duration: 5
         })
         return
@@ -246,11 +91,11 @@
 
       let copyBtns = new Map()
 
-      res = this.resetconfig(res, Tab, isgroup, copyBtns)
+      res = this.resetconfig(res, copyBtns)
 
       delete res.copyType
       
-      this.props.insert(res, Tab)
+      this.props.insert(res)
 
       copyBtns = [...copyBtns.values()]
 
@@ -269,13 +114,11 @@
   }
 
   render() {
-    const { type } = this.props
     const { visible } = this.state
 
     return (
       <div style={{display: 'inline-block'}}>
-        {type !== 'menu' ? <Icon type="snippets" style={{color: 'purple'}} onClick={() => {this.setState({visible: true})}} /> : null}
-        {type === 'menu' ? <Button className="menu-config-paste" icon="snippets" onClick={() => {this.setState({visible: true})}}>绮樿创</Button> : null}
+        <Button className="menu-config-paste" icon="snippets" onClick={() => {this.setState({visible: true})}}>绮樿创</Button>
         <Modal
           title="绮樿创"
           visible={visible}
diff --git a/src/menu/popview/index.jsx b/src/menu/popview/index.jsx
index 1e7c6a6..409c6aa 100644
--- a/src/menu/popview/index.jsx
+++ b/src/menu/popview/index.jsx
@@ -608,7 +608,7 @@
                   <Versions MenuId={MenuId} open_edition={config ? config.open_edition : ''} updateConfig={this.refreshConfig}/>
                   <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/>
                   <StyleCombControlButton menu={config} />
-                  <PasteController type="menu" Tab={null} insert={this.insert} />
+                  <PasteController insert={this.insert} />
                   {config ? <Switch className="big" checkedChildren={dict['mob.enable']} unCheckedChildren={dict['mob.disable']} checked={config.enabled} onChange={this.onEnabledChange} /> : null}
                   <Button type="primary" onClick={this.submitConfig} loading={menuloading}>{dict['mob.save']}</Button>
                   <Button type="default" onClick={this.closeView}>{dict['mob.return']}</Button>
diff --git a/src/menu/versions/index.jsx b/src/menu/versions/index.jsx
index e664702..ab7ae02 100644
--- a/src/menu/versions/index.jsx
+++ b/src/menu/versions/index.jsx
@@ -64,7 +64,7 @@
         notification.success({
           top: 92,
           message: '鎵ц鎴愬姛銆�',
-          duration: 2
+          duration: 1
         })
 
         if (updateConfig) {
@@ -72,7 +72,7 @@
         } else {
           setTimeout(() => {
             window.location.reload()
-          }, 2000)
+          }, 1000)
         }
       }
     })
@@ -110,7 +110,7 @@
         notification.success({
           top: 92,
           message: '鎵ц鎴愬姛銆�',
-          duration: 2
+          duration: 1
         })
         
         if (updateConfig) {
@@ -118,7 +118,7 @@
         } else {
           setTimeout(() => {
             window.location.reload()
-          }, 2000)
+          }, 1000)
         }
       }
     })
@@ -143,9 +143,9 @@
           <div className="header"><Icon type="question-circle"/>鐗堟湰鍒囨崲</div>
           <div className="detail">璇烽�夋嫨闇�瑕佸垏鎹㈢殑鐗堟湰锛屾垨鐐瑰嚮鍙栨秷鍏抽棴寮圭獥銆�</div>
           <div className="footer">
-            <Button key="cancel" onClick={() => { this.setState({ visible: false })}}>鍙栨秷</Button>
             <Button key="pre" type="primary" loading={preconfirming} onClick={this.preVersion}>涓婁竴鐗堟湰</Button>
             <Button key="next" type="primary" loading={nextconfirming} onClick={this.nextVersion}>涓嬩竴鐗堟湰</Button>
+            <Button key="cancel" onClick={() => { this.setState({ visible: false })}}>鍙栨秷</Button>
           </div>
         </Modal>
       </div>
diff --git a/src/menu/versions/index.scss b/src/menu/versions/index.scss
index 697754b..e4f4b2f 100644
--- a/src/menu/versions/index.scss
+++ b/src/menu/versions/index.scss
@@ -6,7 +6,7 @@
     display: none;
   }
   .header {
-    color: rgba(0,0,0,.85);
+    color: rgba(0, 0, 0, 0.85);
     font-weight: 500;
     font-size: 16px;
     .anticon {
@@ -18,7 +18,7 @@
   .detail {
     margin-top: 8px;
     margin-bottom: 24px;
-    color: rgba(0,0,0,.65);
+    color: rgba(0, 0, 0, 0.5);
     font-size: 14px;
   }
   .footer {
diff --git a/src/mob/components/tabs/antv-tabs/index.jsx b/src/mob/components/tabs/antv-tabs/index.jsx
index 6a26189..08bb481 100644
--- a/src/mob/components/tabs/antv-tabs/index.jsx
+++ b/src/mob/components/tabs/antv-tabs/index.jsx
@@ -17,8 +17,7 @@
 
 const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
 const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
-const PasteController = asyncIconComponent(() => import('@/menu/pastecontroller'))
-// const TabLabelComponent = asyncComponent(() => import('@/menu/components/tabs/tablabelform'))
+const PasteComponent = asyncIconComponent(() => import('@/menu/components/tabs/paste'))
 const TabComponents = asyncComponent(() => import('../tabcomponents'))
 
 const { TabPane } = Tabs
@@ -393,7 +392,7 @@
                   <NormalForm title="鏍囩缂栬緫" width={600} update={this.updateTab} getForms={() => this.getTabForms(tab)}>
                     <Icon type="edit" style={{color: '#1890ff'}} title="缂栬緫"/>
                   </NormalForm>
-                  <PasteController type="tab" Tab={tab} insert={this.insert} />
+                  <PasteComponent Tab={tab} insert={this.insert} />
                   <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeTabStyle} type="font-colors" />
                   <Icon className="close" title="delete" type="close" onClick={() => this.delTab(tab)} />
                 </div>
diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js
index 601ab7f..621c33c 100644
--- a/src/utils/utils-custom.js
+++ b/src/utils/utils-custom.js
@@ -327,7 +327,7 @@
   }
 
   /**
-   * @description 閲嶇疆鑿滃崟閰嶇疆
+   * @description 閲嶇疆鑿滃崟閰嶇疆锛岄〉闈㈡暣浣撳鍒�
    * @return {String}  components 閰嶇疆淇℃伅
    */
   static resetConfig = (components) => {
@@ -432,9 +432,14 @@
         item.btnlog = []
       }
   
+      let oriUids = {}
       if (item.action) {
         item.action = item.action.map(cell => {
-          cell.uuid = this.getuuid()
+          let _uuid = this.getuuid()
+
+          oriUids[cell.uuid] = _uuid
+          cell.uuid = _uuid
+
           return cell
         })
       }
@@ -467,10 +472,240 @@
           return cell
         })
       }
+
+      if (item.wrap && item.wrap.doubleClick) {
+        item.wrap.doubleClick = oriUids[item.wrap.doubleClick] || ''
+      }
   
       return item
     })
   }
+
+  /**
+   * @description 鏁版嵁婧愬悕绉帮紝鐢ㄤ簬缁熶竴鏌ヨ
+   * @return {String}  name
+   */
+  static getdataName () {
+    let name = []
+    let _options = 'abcdefghigklmnopqrstuvwxyz'
+    for (let i = 0; i < 6; i++) {
+      name.push(_options.substr(Math.floor(Math.random() * 26), 1))
+    }
+    name.splice(3, 0, new Date().getTime())
+    return name.join('')
+  }
+
+  /**
+  * @description 閲嶇疆缁勪欢閰嶇疆
+  * @return {String}  item 缁勪欢淇℃伅
+  */
+  static resetComponentConfig = (item, copyBtns) => {
+    if (item.type === 'navbar') {
+      return item
+    }
+
+    item.uuid = this.getuuid()
+    if (item.dataName) {
+      item.dataName = this.getdataName()
+    }
+
+    // 閲嶇疆缁勪欢鍚嶇О
+    let sign = this.getdataName().toUpperCase().substr(-4)
+    if (item.plot) { // 鍥捐〃
+      item.plot.name = item.plot.name + sign
+      item.name = item.plot.name
+    } else if (item.wrap) { // 閫氱敤
+      item.wrap.name = item.wrap.name + sign
+      item.name = item.wrap.name
+    } else if (item.setting) { // 鍒嗙粍銆佹爣绛鹃〉绛�
+      item.setting.name = item.setting.name + sign
+      item.name = item.setting.name
+    }
+
+    if (item.type === 'menubar') {
+      item.subMenus = item.subMenus.map(cell => {
+        cell.uuid = this.getuuid()
+        return cell
+      })
+    } else if (item.type === 'card' || item.type === 'carousel' || (item.type === 'table' && item.subtype === 'tablecard')) {
+      item.subcards.forEach(card => {
+        card.uuid = this.getuuid()
+        if (card.elements) {
+          if (sessionStorage.getItem('editMenuType') === 'popview') {
+            card.elements = card.elements.filter(b => b.OpenType !== 'popview' && b.OpenType !== 'funcbutton')
+          }
+          card.elements = card.elements.map(cell => {
+            let _uuid = this.getuuid()
+            if (cell.OpenType === 'popview' && copyBtns) {
+              let _cell = JSON.parse(JSON.stringify(cell))
+              _cell.$originUuid = _cell.uuid
+              _cell.uuid = _uuid
+              copyBtns.set(_uuid, _cell)
+            }
+            cell.uuid = _uuid
+            return cell
+          })
+        }
+        if (card.backElements) {
+          if (sessionStorage.getItem('editMenuType') === 'popview') {
+            card.elements = card.elements.filter(b => b.OpenType !== 'popview' && b.OpenType !== 'funcbutton')
+          }
+          card.backElements = card.backElements.map(cell => {
+            let _uuid = this.getuuid()
+            if (cell.OpenType === 'popview' && copyBtns) {
+              let _cell = JSON.parse(JSON.stringify(cell))
+              _cell.$originUuid = _cell.uuid
+              _cell.uuid = _uuid
+              copyBtns.set(_uuid, _cell)
+            }
+            cell.uuid = _uuid
+            return cell
+          })
+        }
+      })
+    } else if (item.type === 'balcony') {
+      if (item.elements) {
+        if (sessionStorage.getItem('editMenuType') === 'popview') {
+          item.elements = item.elements.filter(b => b.OpenType !== 'popview' && b.OpenType !== 'funcbutton')
+        }
+        item.elements = item.elements.map(cell => {
+          let _uuid = this.getuuid()
+          if (cell.OpenType === 'popview' && copyBtns) {
+            let _cell = JSON.parse(JSON.stringify(cell))
+            _cell.$originUuid = _cell.uuid
+            _cell.uuid = _uuid
+            copyBtns.set(_uuid, _cell)
+          }
+          cell.uuid = _uuid
+          return cell
+        })
+      }
+    } else if (item.type === 'table' && item.subtype === 'normaltable' && item.cols) {
+      let loopCol = (col) => {
+        col.subcols = col.subcols.map(c => {
+          c.uuid = this.getuuid()
+
+          if (c.type === 'colspan' && c.subcols) {
+            c = loopCol(c)
+          } else if (c.type === 'custom' && c.elements) {
+            c.elements = c.elements.map(cell => {
+              cell.uuid = this.getuuid()
+              return cell
+            })
+          }
+          return c
+        })
+
+        return col
+      }
+
+      item.cols = item.cols.map(col => {
+        col.uuid = this.getuuid()
+
+        if (col.type === 'colspan' && col.subcols) {
+          col = loopCol(col)
+        } else if (col.type === 'custom' && col.elements) {
+          col.elements = col.elements.map(cell => {
+            cell.uuid = this.getuuid()
+            return cell
+          })
+        } else if (col.type === 'action' && col.elements) {
+          if (sessionStorage.getItem('editMenuType') === 'popview') {
+            col.elements = col.elements.filter(c => c.OpenType !== 'popview' && c.OpenType !== 'funcbutton')
+          }
+          col.elements = col.elements.map(cell => {
+            let _uuid = this.getuuid()
+            if (cell.OpenType === 'popview' && copyBtns) {
+              let _cell = JSON.parse(JSON.stringify(cell))
+              _cell.$originUuid = _cell.uuid
+              _cell.uuid = _uuid
+              copyBtns.set(_uuid, _cell)
+            }
+            cell.uuid = _uuid
+            return cell
+          })
+        }
+        return col
+      })
+    } else if (item.type === 'form') {
+      item.subcards = item.subcards.map(cell => {
+        cell.uuid = this.getuuid()
+
+        cell.fields = cell.fields.map(m => {
+          m.uuid = this.getuuid()
+  
+          return m
+        })
+        return cell
+      })
+    }
+
+    if (item.btnlog) {
+      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 = this.getuuid()
+
+        oriUids[cell.uuid] = _uuid
+
+        if (cell.OpenType === 'popview' && copyBtns) {
+          let _cell = JSON.parse(JSON.stringify(cell))
+          _cell.$originUuid = _cell.uuid
+          _cell.uuid = _uuid
+          copyBtns.set(_uuid, _cell)
+        }
+
+        cell.uuid = _uuid
+
+        return cell
+      })
+    }
+    if (item.type === 'topbar') {
+      if (item.search && item.search.fields) {
+        item.search.fields = item.search.fields.map(cell => {
+          cell.uuid = this.getuuid()
+          return cell
+        })
+      }
+      if (item.search && item.search.groups) {
+        item.search.groups = item.search.groups.map(cell => {
+          cell.uuid = this.getuuid()
+          cell.fields = cell.fields.map(m => {
+            m.uuid = this.getuuid()
+            return m
+          })
+          return cell
+        })
+      }
+    } else if (item.search) {
+      item.search = item.search.map(cell => {
+        cell.uuid = this.getuuid()
+        return cell
+      })
+    }
+    if (item.columns) {
+      item.columns = item.columns.map(cell => {
+        cell.uuid = this.getuuid()
+        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
+  }
 }
 
 /**
diff --git a/src/views/menudesign/index.jsx b/src/views/menudesign/index.jsx
index e822d67..1fe7fc1 100644
--- a/src/views/menudesign/index.jsx
+++ b/src/views/menudesign/index.jsx
@@ -984,7 +984,7 @@
                     <SysInterface config={config} updateConfig={this.updateConfig}/>
                     <PictureController/>
                     <StyleCombControlButton menu={config} />
-                    <PasteController type="menu" Tab={null} insert={this.insert} />
+                    <PasteController insert={this.insert} />
                     <Switch className="big" checkedChildren={dict['mob.enable']} unCheckedChildren={dict['mob.disable']} checked={config && config.enabled} onChange={this.onEnabledChange} />
                     <Button type="primary" onClick={this.submitConfig} loading={menuloading}>{dict['mob.save']}</Button>
                     <Button type="default" onClick={this.closeView}>鍏抽棴</Button>
diff --git a/src/views/mobdesign/index.jsx b/src/views/mobdesign/index.jsx
index e7f9c69..63e0270 100644
--- a/src/views/mobdesign/index.jsx
+++ b/src/views/mobdesign/index.jsx
@@ -1351,7 +1351,7 @@
                 <Button type="primary" onClick={this.submitConfig} loading={menuloading}>{dict['mob.save']}</Button>
                 <Switch className="big" checkedChildren={dict['mob.enable']} unCheckedChildren={dict['mob.disable']} checked={config && config.enabled} onChange={this.onEnabledChange} />
                 <CreateView resetmenu={this.getAppMenus} />
-                <PasteController type="menu" Tab={null} insert={this.insert} />
+                <PasteController insert={this.insert} />
                 <StyleCombControlButton menu={config} />
                 <SysInterface config={config} updateConfig={this.updateConfig}/>
                 <PictureController/>
diff --git a/src/views/pcdesign/index.jsx b/src/views/pcdesign/index.jsx
index e96c650..716f2f6 100644
--- a/src/views/pcdesign/index.jsx
+++ b/src/views/pcdesign/index.jsx
@@ -1589,7 +1589,7 @@
                 <Button type="primary" onClick={this.submitConfig} loading={menuloading}>{dict['mob.save']}</Button>
                 <Switch className="big" checkedChildren={dict['mob.enable']} unCheckedChildren={dict['mob.disable']} checked={config && config.enabled} onChange={this.onEnabledChange} />
                 <CreateView resetmenu={this.getAppMenus} />
-                <PasteController type="menu" Tab={null} insert={this.insert} />
+                <PasteController insert={this.insert} />
                 <StyleCombControlButton menu={config} />
                 <SysInterface config={config} updateConfig={this.updateConfig}/>
                 <PictureController/>

--
Gitblit v1.8.0