From a3ac1b4636cf446804bb1947d6a5d2dd6c3bc030 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 13 十二月 2020 17:16:54 +0800
Subject: [PATCH] 2020-12-13

---
 src/tabviews/zshare/actionList/tabbutton/index.jsx                             |    9 +-
 src/tabviews/zshare/actionList/popupbutton/index.jsx                           |    9 +-
 src/tabviews/zshare/normalTable/index.jsx                                      |   43 ++++++----
 src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx |   26 +++++-
 src/tabviews/zshare/actionList/excelInbutton/index.jsx                         |    9 +-
 src/tabviews/zshare/actionList/printbutton/index.jsx                           |    9 +-
 src/tabviews/zshare/actionList/exceloutbutton/index.jsx                        |    5 
 src/tabviews/zshare/actionList/index.jsx                                       |    8 ++
 src/tabviews/custom/index.jsx                                                  |   25 ++++--
 src/tabviews/custom/components/share/normalTable/index.jsx                     |   22 ++++-
 src/tabviews/zshare/actionList/newpagebutton/index.jsx                         |    9 +-
 src/menu/components/table/normal-table/wrapsetting/settingform/index.jsx       |   20 ++++
 src/templates/sharecomponent/settingcomponent/settingform/index.jsx            |    2 
 src/tabviews/zshare/actionList/normalbutton/index.jsx                          |    9 +-
 src/tabviews/zshare/actionList/changeuserbutton/index.jsx                      |    9 +-
 15 files changed, 147 insertions(+), 67 deletions(-)

diff --git a/src/menu/components/table/normal-table/wrapsetting/settingform/index.jsx b/src/menu/components/table/normal-table/wrapsetting/settingform/index.jsx
index 801edc3..2ff1c50 100644
--- a/src/menu/components/table/normal-table/wrapsetting/settingform/index.jsx
+++ b/src/menu/components/table/normal-table/wrapsetting/settingform/index.jsx
@@ -54,7 +54,7 @@
   }
 
   render() {
-    const { wrap, MenuType } = this.props
+    const { wrap, MenuType, config } = this.props
     const { getFieldDecorator } = this.props.form
     const { roleList } = this.state
 
@@ -134,6 +134,24 @@
                 )}
               </Form.Item>
             </Col>
+            <Col span={12}>
+              <Form.Item label={
+                <Tooltip placement="topLeft" title="鍙屽嚮琛ㄦ牸涓锛岃Е鍙戠殑鎸夐挳銆�">
+                  <Icon type="question-circle" />
+                  鍙屽嚮浜嬩欢
+                </Tooltip>
+              }>
+                {getFieldDecorator('doubleClick', {
+                  initialValue: wrap.doubleClick || ''
+                })(
+                  <Select allowClear>
+                    {config.action.map(option =>
+                      <Select.Option key={option.uuid} value={option.uuid}>{option.label}</Select.Option>
+                    )}
+                  </Select>
+                )}
+              </Form.Item>
+            </Col>
             {MenuType !== 'billPrint' ? <Col span={12}>
               <Form.Item label="榛戝悕鍗�">
                 {getFieldDecorator('blacklist', {
diff --git a/src/tabviews/custom/components/share/normalTable/index.jsx b/src/tabviews/custom/components/share/normalTable/index.jsx
index e203f3d..b227d1d 100644
--- a/src/tabviews/custom/components/share/normalTable/index.jsx
+++ b/src/tabviews/custom/components/share/normalTable/index.jsx
@@ -22,7 +22,7 @@
   }
 
   render() {
-    let { lineMarks, data, className, ...resProps } = this.props
+    let { lineMarks, onDoubleClick, data, className, ...resProps } = this.props
     let style = {}
 
     if (lineMarks && lineMarks.length > 0) {
@@ -89,7 +89,7 @@
       })
     }
 
-    return <tr {...resProps} className={className} style={style}/>
+    return <tr {...resProps} onDoubleClick={onDoubleClick} className={className} style={style}/>
   }
 }
 
@@ -205,7 +205,7 @@
       if (col.linkThdMenu || col.linkurl) {
         content = (
           <div>
-            <div className="link-menu" onDoubleClick={() => this.triggerLink(col, record)}></div>
+            <div className="link-menu" onDoubleClick={(e) => this.triggerLink(e, col, record)}></div>
             {content}
           </div>
         )
@@ -251,7 +251,7 @@
       if (col.linkThdMenu || col.linkurl) {
         content = (
           <div>
-            <div className="link-menu" onDoubleClick={() => this.triggerLink(col, record)}></div>
+            <div className="link-menu" onDoubleClick={(e) => this.triggerLink(e, col, record)}></div>
             {content}
           </div>
         )
@@ -508,8 +508,9 @@
   }
 
   // 瀛楁閫忚
-  triggerLink = (item, record) => {
+  triggerLink = (e, item, record) => {
     const { tabviews, MenuID } = this.props
+    e.stopPropagation()
 
     if (item.linkThdMenu) {
       let tabmenu = item.linkThdMenu
@@ -736,6 +737,14 @@
     })
   }
 
+  doubleClickLine = (record) => {
+    const { setting } = this.props
+
+    if (!setting.doubleClick) return
+
+    MKEmitter.emit('triggerBtnId', setting.doubleClick, [record])
+  }
+
   render() {
     const { setting, statFValue, lineMarks, data } = this.props
     const { selectedRowKeys, activeIndex, pickup } = this.state
@@ -803,7 +812,8 @@
               lineMarks,
               data: record,
               className: index === activeIndex ? ' mk-row-active ' : '',
-              onClick: () => {this.changeRow(record, index)}
+              onClick: () => {this.changeRow(record, index)},
+              onDoubleClick: () => {this.doubleClickLine(record)}
             }
           }}
           onChange={this.changeTable}
diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx
index 7297557..56c60aa 100644
--- a/src/tabviews/custom/index.jsx
+++ b/src/tabviews/custom/index.jsx
@@ -251,15 +251,6 @@
         })
       }
 
-      if (item.setting && item.setting.supModule) {
-        let pid = item.setting.supModule.slice(-1)[0]
-        if (pid && pid !== 'empty') {
-          item.setting.supModule = pid
-        } else {
-          item.setting.supModule = ''
-        }
-      }
-
       // 鏉冮檺杩囨护
       if (this.props.menuType !== 'HS') {
         if (item.action && item.action.length > 0) {
@@ -313,6 +304,22 @@
           })
         }
       }
+
+      if (item.setting && item.setting.supModule) {
+        let pid = item.setting.supModule.slice(-1)[0]
+        if (pid && pid !== 'empty') {
+          item.setting.supModule = pid
+        } else {
+          item.setting.supModule = ''
+        }
+      }
+      if (item.wrap && item.wrap.doubleClick) {
+        let index = item.action.findIndex((btn) => btn.uuid === item.wrap.doubleClick)
+        if (index === -1) {
+          item.wrap.doubleClick = ''
+        }
+      }
+      
       return true
     })
   }
diff --git a/src/tabviews/zshare/actionList/changeuserbutton/index.jsx b/src/tabviews/zshare/actionList/changeuserbutton/index.jsx
index 3abb379..a5735ca 100644
--- a/src/tabviews/zshare/actionList/changeuserbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/changeuserbutton/index.jsx
@@ -14,6 +14,7 @@
 class NewPageButton extends Component {
   static propTpyes = {
     show: PropTypes.any,              // 鎸夐挳鏄剧ず鏍峰紡鎺у埗
+    position: PropTypes.any,          // 鎸夐挳浣嶇疆锛屽伐鍏锋爮涓簍oolbar
     BID: PropTypes.string,            // 涓昏〃ID
     btn: PropTypes.object,            // 鎸夐挳
     selectedData: PropTypes.any,      // 瀛愯〃涓�夋嫨鏁版嵁
@@ -31,9 +32,9 @@
   }
 
   componentDidMount () {
-    const { show } = this.props
+    const { position } = this.props
 
-    if (show === 'actionList') {
+    if (position === 'toolbar') {
       MKEmitter.addListener('triggerBtnId', this.actionTrigger)
     }
   }
@@ -48,13 +49,13 @@
   /**
    * @description 瑙﹀彂鎸夐挳鎿嶄綔
    */
-  actionTrigger = (triggerId) => {
+  actionTrigger = (triggerId, record) => {
     const { setting, selectedData, btn } = this.props
     const { loading } = this.state
     
     if ((triggerId && btn.uuid !== triggerId) || loading) return
     
-    let data = selectedData || []
+    let data = record || selectedData || []
 
     if (data.length !== 1) {
       // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁
diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
index de8e379..3b18453 100644
--- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
@@ -17,6 +17,7 @@
 class ExcelInButton extends Component {
   static propTpyes = {
     show: PropTypes.any,              // 鏄剧ず鏍峰紡
+    position: PropTypes.any,          // 鎸夐挳浣嶇疆锛屽伐鍏锋爮涓簍oolbar
     BID: PropTypes.string,            // 涓昏〃ID
     selectedData: PropTypes.any,      // 瀛愯〃涓�夋嫨鏁版嵁
     Tab: PropTypes.any,               // 濡傛灉褰撳墠鍏冪礌涓烘爣绛炬椂锛宼ab涓烘爣绛句俊鎭�
@@ -36,9 +37,9 @@
   }
 
   componentDidMount () {
-    const { show } = this.props
+    const { position } = this.props
 
-    if (show === 'actionList') {
+    if (position === 'toolbar') {
       MKEmitter.addListener('triggerBtnId', this.actionTrigger)
     }
   }
@@ -68,7 +69,7 @@
   /**
    * @description 瑙﹀彂鎸夐挳鎿嶄綔
    */
-  actionTrigger = (triggerId) => {
+  actionTrigger = (triggerId, record) => {
     const { setting, Tab, BID, btn, selectedData } = this.props
     const { loading } = this.state
 
@@ -83,7 +84,7 @@
       return
     }
 
-    let data = selectedData || []
+    let data = record || selectedData || []
     
     if (btn.Ot === 'requiredSgl' && data.length !== 1) {
       // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁
diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
index 0aa6370..827ac3d 100644
--- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
@@ -17,6 +17,7 @@
 class ExcelOutButton extends Component {
   static propTpyes = {
     BID: PropTypes.string,            // 涓昏〃ID
+    position: PropTypes.any,          // 鎸夐挳浣嶇疆锛屽伐鍏锋爮涓簍oolbar
     show: PropTypes.any,              // 鏄剧ず鏍峰紡
     Tab: PropTypes.any,               // 濡傛灉褰撳墠鍏冪礌涓烘爣绛炬椂锛宼ab涓烘爣绛句俊鎭�
     btn: PropTypes.object,            // 鎸夐挳
@@ -37,9 +38,9 @@
   }
 
   componentDidMount () {
-    const { show } = this.props
+    const { position } = this.props
 
-    if (show === 'actionList') {
+    if (position === 'toolbar') {
       MKEmitter.addListener('triggerBtnId', this.actionTrigger)
     }
   }
diff --git a/src/tabviews/zshare/actionList/index.jsx b/src/tabviews/zshare/actionList/index.jsx
index 8e81116..0556b06 100644
--- a/src/tabviews/zshare/actionList/index.jsx
+++ b/src/tabviews/zshare/actionList/index.jsx
@@ -63,6 +63,7 @@
             BData={BData}
             setting={setting}
             columns={columns}
+            position="toolbar"
             ContainerId={ContainerId}
             selectedData={selectedData}
             updateStatus={this.updateStatus}
@@ -77,6 +78,7 @@
             Tab={Tab}
             btn={item}
             setting={setting}
+            position="toolbar"
             selectedData={selectedData}
             updateStatus={this.updateStatus}
           />
@@ -90,6 +92,7 @@
             Tab={Tab}
             btn={item}
             setting={setting}
+            position="toolbar"
             getexceloutparam={getexceloutparam}
             updateStatus={this.updateStatus}
           />
@@ -104,6 +107,7 @@
             btn={item}
             BData={BData}
             setting={setting}
+            position="toolbar"
             selectedData={selectedData}
             updateStatus={this.updateStatus}
           />
@@ -116,6 +120,7 @@
             btn={item}
             MenuID={MenuID}
             setting={setting}
+            position="toolbar"
             selectedData={selectedData}
             updateStatus={this.updateStatus}
           />
@@ -127,6 +132,7 @@
             show="actionList"
             btn={item}
             setting={setting}
+            position="toolbar"
             selectedData={selectedData}
             updateStatus={this.updateStatus}
           />
@@ -140,6 +146,7 @@
               BID={BID}
               btn={item}
               setting={setting}
+              position="toolbar"
               selectedData={selectedData}
               updateStatus={this.updateStatus}
             />
@@ -154,6 +161,7 @@
               btn={item}
               BData={BData}
               setting={setting}
+              position="toolbar"
               ContainerId={ContainerId}
               selectedData={selectedData}
               updateStatus={this.updateStatus}
diff --git a/src/tabviews/zshare/actionList/newpagebutton/index.jsx b/src/tabviews/zshare/actionList/newpagebutton/index.jsx
index af5cc5c..8d36d7f 100644
--- a/src/tabviews/zshare/actionList/newpagebutton/index.jsx
+++ b/src/tabviews/zshare/actionList/newpagebutton/index.jsx
@@ -13,6 +13,7 @@
 class NewPageButton extends Component {
   static propTpyes = {
     show: PropTypes.any,              // 鎸夐挳鏄剧ず鏍峰紡鎺у埗
+    position: PropTypes.any,          // 鎸夐挳浣嶇疆锛屽伐鍏锋爮涓簍oolbar
     btn: PropTypes.object,            // 鎸夐挳
     selectedData: PropTypes.any,      // 瀛愯〃涓�夋嫨鏁版嵁
     setting: PropTypes.any,           // 椤甸潰閫氱敤璁剧疆
@@ -29,9 +30,9 @@
   }
 
   componentDidMount () {
-    const { show } = this.props
+    const { position } = this.props
 
-    if (show === 'actionList') {
+    if (position === 'toolbar') {
       MKEmitter.addListener('triggerBtnId', this.actionTrigger)
     }
   }
@@ -46,13 +47,13 @@
   /**
    * @description 瑙﹀彂鎸夐挳鎿嶄綔
    */
-  actionTrigger = (triggerId) => {
+  actionTrigger = (triggerId, record) => {
     const { setting, btn, selectedData } = this.props
     const _this = this
 
     if (triggerId && btn.uuid !== triggerId) return
 
-    let data = selectedData || []
+    let data = record || selectedData || []
 
     if (btn.Ot === 'requiredSgl' && data.length !== 1) {
       // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁
diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index 0482cee..f303197 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -20,6 +20,7 @@
 class NormalButton extends Component {
   static propTpyes = {
     show: PropTypes.any,              // 鎸夐挳鏄剧ず鏍峰紡鎺у埗
+    position: PropTypes.any,          // 鎸夐挳浣嶇疆锛屽伐鍏锋爮涓簍oolbar
     BID: PropTypes.string,            // 涓昏〃ID
     BData: PropTypes.any,             // 涓昏〃鏁版嵁
     style: PropTypes.any,             // 鎸夐挳鏍峰紡
@@ -48,9 +49,9 @@
   }
 
   componentDidMount () {
-    const { show } = this.props
+    const { position } = this.props
 
-    if (show === 'actionList') {
+    if (position === 'toolbar') {
       MKEmitter.addListener('triggerBtnId', this.actionTrigger)
     }
   }
@@ -81,7 +82,7 @@
   /**
    * @description 瑙﹀彂鎸夐挳鎿嶄綔
    */
-  actionTrigger = (triggerId) => {
+  actionTrigger = (triggerId, record) => {
     const { setting, Tab, BID, btn, selectedData } = this.props
     const { loading } = this.state
 
@@ -97,7 +98,7 @@
     }
 
     let _this = this
-    let data = selectedData || []
+    let data = record || selectedData || []
 
     if (btn.Ot !== 'notRequired' && data.length === 0) {
       // 闇�瑕侀�夋嫨琛屾椂锛屾牎楠屾暟鎹�
diff --git a/src/tabviews/zshare/actionList/popupbutton/index.jsx b/src/tabviews/zshare/actionList/popupbutton/index.jsx
index a82689f..c29a385 100644
--- a/src/tabviews/zshare/actionList/popupbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/popupbutton/index.jsx
@@ -15,6 +15,7 @@
 class NormalButton extends Component {
   static propTpyes = {
     show: PropTypes.any,              // 鎸夐挳鏄剧ず鏍峰紡鎺у埗
+    position: PropTypes.any,          // 鎸夐挳浣嶇疆锛屽伐鍏锋爮涓簍oolbar
     BID: PropTypes.string,            // 涓昏〃ID
     BData: PropTypes.any,             // 涓昏〃鏁版嵁
     selectedData: PropTypes.any,      // 瀛愯〃涓�夋嫨鏁版嵁
@@ -38,9 +39,9 @@
   }
 
   componentDidMount () {
-    const { show } = this.props
+    const { position } = this.props
 
-    if (show === 'actionList') {
+    if (position === 'toolbar') {
       MKEmitter.addListener('triggerBtnId', this.actionTrigger)
     }
   }
@@ -55,7 +56,7 @@
   /**
    * @description 瑙﹀彂鎸夐挳鎿嶄綔
    */
-  actionTrigger = (triggerId) => {
+  actionTrigger = (triggerId, record) => {
     const { setting, Tab, BID, btn, selectedData } = this.props
     const { loading } = this.state
 
@@ -70,7 +71,7 @@
       return
     }
 
-    let data = selectedData || []
+    let data = record || selectedData || []
 
     if (btn.Ot === 'requiredSgl' && data.length !== 1) {
       // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁
diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx
index df11de2..2e13a61 100644
--- a/src/tabviews/zshare/actionList/printbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/printbutton/index.jsx
@@ -21,6 +21,7 @@
 class PrintButton extends Component {
   static propTpyes = {
     show: PropTypes.any,              // 鎸夐挳鏄剧ず鏍峰紡鎺у埗
+    position: PropTypes.any,          // 鎸夐挳浣嶇疆锛屽伐鍏锋爮涓簍oolbar
     BID: PropTypes.string,            // 涓昏〃ID
     BData: PropTypes.any,             // 涓昏〃鏁版嵁
     selectedData: PropTypes.any,      // 瀛愯〃涓�夋嫨鏁版嵁
@@ -47,9 +48,9 @@
   }
 
   componentDidMount () {
-    const { show } = this.props
+    const { position } = this.props
 
-    if (show === 'actionList') {
+    if (position === 'toolbar') {
       MKEmitter.addListener('triggerBtnId', this.actionTrigger)
     }
   }
@@ -79,7 +80,7 @@
   /**
    * @description 瑙﹀彂鎸夐挳鎿嶄綔
    */
-  actionTrigger = (triggerId) => {
+  actionTrigger = (triggerId, record) => {
     const { setting, Tab, BID, btn, selectedData } = this.props
     const { loading } = this.state
 
@@ -95,7 +96,7 @@
     }
 
     let _this = this
-    let data = selectedData || []
+    let data = record || selectedData || []
 
     if (btn.Ot !== 'notRequired' && data.length === 0) {
       // 闇�瑕侀�夋嫨琛屾椂锛屾牎楠屾暟鎹�
diff --git a/src/tabviews/zshare/actionList/tabbutton/index.jsx b/src/tabviews/zshare/actionList/tabbutton/index.jsx
index ce60d09..881a5b8 100644
--- a/src/tabviews/zshare/actionList/tabbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/tabbutton/index.jsx
@@ -13,6 +13,7 @@
 class TabButton extends Component {
   static propTpyes = {
     show: PropTypes.any,              // 鎸夐挳鏄剧ず鏍峰紡鎺у埗
+    position: PropTypes.any,          // 鎸夐挳浣嶇疆锛屽伐鍏锋爮涓簍oolbar
     MenuID: PropTypes.string,         // 鑿滃崟ID
     btn: PropTypes.object,            // 鎸夐挳
     selectedData: PropTypes.any,      // 瀛愯〃涓�夋嫨鏁版嵁
@@ -30,9 +31,9 @@
   }
 
   componentDidMount () {
-    const { show } = this.props
+    const { position } = this.props
 
-    if (show === 'actionList') {
+    if (position === 'toolbar') {
       MKEmitter.addListener('triggerBtnId', this.actionTrigger)
     }
   }
@@ -47,12 +48,12 @@
   /**
    * @description 瑙﹀彂鎸夐挳鎿嶄綔
    */
-  actionTrigger = (triggerId) => {
+  actionTrigger = (triggerId, record) => {
     const { setting, btn, tabviews, MenuID, selectedData } = this.props
 
     if (triggerId && btn.uuid !== triggerId) return
     
-    let data = selectedData || []
+    let data = record || selectedData || []
 
     if (btn.Ot === 'requiredSgl' && data.length !== 1) {
       // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁
diff --git a/src/tabviews/zshare/normalTable/index.jsx b/src/tabviews/zshare/normalTable/index.jsx
index 9c14916..bb65378 100644
--- a/src/tabviews/zshare/normalTable/index.jsx
+++ b/src/tabviews/zshare/normalTable/index.jsx
@@ -218,8 +218,10 @@
   }
 
   // 瀛楁閫忚
-  triggerLink = (item, record) => {
+  triggerLink = (e, item, record) => {
     const { tabviews, MenuID, setting } = this.props
+
+    e.stopPropagation()
 
     if (item.linkThdMenu) {
       let tabmenu = item.linkThdMenu
@@ -392,8 +394,8 @@
           return {
             children: (
               <div className={className}>
-                <div className="baseboard link-menu" onDoubleClick={() => this.triggerLink(item, record)}></div>
-                <div className="content link-menu" style={{ minWidth: (item.Width || 120) + 'px' }} onDoubleClick={() => this.triggerLink(item, record)}>
+                <div className="baseboard link-menu" onDoubleClick={(e) => this.triggerLink(e, item, record)}></div>
+                <div className="content link-menu" onDoubleClick={(e) => this.triggerLink(e, item, record)}>
                   {content}
                 </div>
               </div>
@@ -405,8 +407,8 @@
         }
         return (
           <div className={className}>
-            <div className="baseboard link-menu" onDoubleClick={() => this.triggerLink(item, record)}></div>
-            <div className="content link-menu" style={{ minWidth: (item.Width || 120) + 'px' }} onDoubleClick={() => this.triggerLink(item, record)}>
+            <div className="baseboard link-menu" onDoubleClick={(e) => this.triggerLink(e, item, record)}></div>
+            <div className="content link-menu" onDoubleClick={(e) => this.triggerLink(e, item, record)}>
               {content}
             </div>
           </div>
@@ -417,7 +419,7 @@
             children: (
               <div className={className}>
                 <div className="baseboard"></div>
-                <div className="content" style={{ minWidth: (item.Width || 120) + 'px' }}>
+                <div className="content">
                   {content}
                 </div>
               </div>
@@ -430,7 +432,7 @@
         return (
           <div className={className}>
             <div className="baseboard"></div>
-            <div className="content" style={{ minWidth: (item.Width || 120) + 'px' }}>
+            <div className="content">
               {content}
             </div>
           </div>
@@ -489,8 +491,8 @@
       if (item.linkThdMenu || item.linkurl) {
         return (
           <div className={className}>
-            <div className="baseboard link-menu" onDoubleClick={() => this.triggerLink(item, record)}></div>
-            <div className="content link-menu" style={{ minWidth: (item.Width || 120) + 'px' }} onDoubleClick={() => this.triggerLink(item, record)}>
+            <div className="baseboard link-menu" onDoubleClick={(e) => this.triggerLink(e, item, record)}></div>
+            <div className="content link-menu" onDoubleClick={(e) => this.triggerLink(e, item, record)}>
               {content}
             </div>
           </div>
@@ -499,7 +501,7 @@
         return (
           <div className={className}>
             <div className="baseboard"></div>
-            <div className="content" style={{ minWidth: (item.Width || 120) + 'px' }}>
+            <div className="content">
               {content}
             </div>
           </div>
@@ -516,7 +518,7 @@
 
       let maxHeight = item.maxHeight || 128
       return (
-        <div className="picture-col" style={{ minWidth: (item.Width || 120) + 'px' }}>
+        <div className="picture-col">
           {photos && photos.map((url, i) => {
             if (item.scale === 'true') {
               return <img style={{maxHeight: maxHeight}} className="image-scale" onClick={this.imgScale} key={`${i}`} src={url} alt=""/>
@@ -541,7 +543,7 @@
 
       return (
         <div>
-          <div className="content" style={{ minWidth: (item.Width || 120) + 'px' }}>
+          <div className="content">
             {content ? <Paragraph copyable ellipsis={{ rows: 3, expandable: true }}>{content}</Paragraph> : null }
           </div>
         </div>
@@ -579,14 +581,14 @@
 
       return (
         <div>
-          <div className="content" style={{ minWidth: (item.Width || 120) + 'px' }}>
+          <div className="content">
             {content ? <a href={_href} target="_blank" rel="noopener noreferrer">{content}</a> : null }
           </div>
         </div>
       )
     } else if (item.type === 'action') {
       return (
-        <div className="action-col" style={{ minWidth: (item.Width || 120) + 'px' }}>
+        <div className="action-col">
           {item.operations.map(btn => {
             if (['exec', 'prompt', 'pop'].includes(btn.OpenType)) {
               return (
@@ -790,7 +792,7 @@
 
       return (
         <div>
-          <div className="content" style={{ minWidth: (item.Width || 120) + 'px' }}>
+          <div className="content">
             {this.getCospanContent(ordertype, contents, images)}
           </div>
         </div>
@@ -1046,6 +1048,14 @@
     return data
   }
 
+  doubleClickLine = (record) => {
+    const { setting } = this.props
+
+    if (!setting.doubleClick) return
+
+    MKEmitter.emit('triggerBtnId', setting.doubleClick, [record])
+  }
+
   render() {
     const { setting, pickup, statFValue } = this.props
     const { selectedRowKeys, lineMarks, activeIndex } = this.state
@@ -1182,7 +1192,8 @@
           scroll={{ x: '100%', y: false }}
           onRow={(record, index) => {
             return {
-              onClick: () => {this.changeRow(record, index)}
+              onClick: () => {this.changeRow(record, index)},
+              onDoubleClick: () => {this.doubleClickLine(record)}
             }
           }}
           onChange={this.changeTable}
diff --git a/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx
index 7521f34..c1c0e77 100644
--- a/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx
+++ b/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx
@@ -11,7 +11,7 @@
 
 class SettingForm extends Component {
   static propTpyes = {
-    type: PropTypes.string,       // 鑿滃崟绫诲瀷锛宮ain鎴杝ubtable
+    config: PropTypes.object,     // 椤甸潰閰嶇疆
     dict: PropTypes.object,       // 瀛楀吀椤�
     menu: PropTypes.object,       // 鑿滃崟淇℃伅
     setting: PropTypes.object,    // 鏁版嵁婧愰厤缃�
@@ -174,7 +174,7 @@
   }
 
   render() {
-    const { setting, dict, menu, type, columns } = this.props
+    const { setting, dict, menu, config, columns } = this.props
     const { getFieldDecorator } = this.props.form
     const { interType, funcRules, funcTooltip } = this.state
 
@@ -400,7 +400,7 @@
                 </Radio.Group>)}
               </Form.Item>
             </Col>
-            {type === 'main' ? <Col span={12}>
+            {config.Template === 'CommonTable' ? <Col span={12}>
               <Form.Item label="鎸夐挳鍥哄畾">
                 {getFieldDecorator('actionfixed', {
                   initialValue: setting.actionfixed === 'true' || setting.actionfixed === true ? 'true' : 'false'
@@ -411,7 +411,7 @@
                 </Radio.Group>)}
               </Form.Item>
             </Col> : null}
-            {type === 'main' ? <Col span={12}>
+            {config.Template === 'CommonTable' ? <Col span={12}>
               <Form.Item label={
                 <Tooltip placement="topLeft" title={'鍚湁鍚堝苟鍒楁垨琛ㄦ牸鍑虹幇妯悜婊氬姩鏃朵細鏄剧ず寮傚父锛岃鎱庣敤锛�'}>
                   <Icon type="question-circle" />
@@ -438,6 +438,24 @@
                 </Radio.Group>)}
               </Form.Item>
             </Col>
+            <Col span={12}>
+              <Form.Item label={
+                <Tooltip placement="topLeft" title="鍙屽嚮琛ㄦ牸涓锛岃Е鍙戠殑鎸夐挳銆�">
+                  <Icon type="question-circle" />
+                  鍙屽嚮浜嬩欢
+                </Tooltip>
+              }>
+                {getFieldDecorator('doubleClick', {
+                  initialValue: setting.doubleClick || ''
+                })(
+                  <Select allowClear>
+                    {config.action.map(option =>
+                      <Select.Option key={option.uuid} value={option.uuid}>{option.label}</Select.Option>
+                    )}
+                  </Select>
+                )}
+              </Form.Item>
+            </Col>
           </Row>
         </Form>
       </div>
diff --git a/src/templates/sharecomponent/settingcomponent/settingform/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/index.jsx
index b102d60..913ca8d 100644
--- a/src/templates/sharecomponent/settingcomponent/settingform/index.jsx
+++ b/src/templates/sharecomponent/settingcomponent/settingform/index.jsx
@@ -382,9 +382,9 @@
         <Tabs activeKey={activeKey} className="verify-card-box" onChange={this.changeTab}>
           <TabPane tab="鏁版嵁婧�" key="setting">
             <DataSource
-              type={config.Template === 'CommonTable' ? 'main' : ''}
               menu={menu}
               dict={dict}
+              config={config}
               columns={columns}
               setting={setting}
               scripts={scripts}

--
Gitblit v1.8.0