From a7ddedc4c5d6cda66a83623d9d318437a19d8338 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 25 九月 2021 19:01:48 +0800
Subject: [PATCH] 2021-09-25

---
 src/components/tabview/index.jsx                                  |   23 ++++++++++-
 src/tabviews/custom/components/form/tab-form/index.jsx            |    2 
 src/tabviews/custom/components/card/table-card/index.jsx          |    2 
 src/components/header/index.scss                                  |    3 +
 src/tabviews/zshare/actionList/tabbutton/index.jsx                |    2 
 src/tabviews/custom/components/carousel/cardItem/index.jsx        |    2 
 src/tabviews/zshare/normalTable/index.jsx                         |    2 
 src/templates/sharecomponent/actioncomponent/actionform/index.jsx |   26 +++----------
 src/tabviews/custom/components/card/cardItem/index.jsx            |    2 
 src/tabviews/custom/components/chart/antv-pie/index.jsx           |    2 
 src/tabviews/custom/components/form/normal-form/index.jsx         |    2 
 src/templates/sharecomponent/fieldscomponent/index.jsx            |    3 +
 src/tabviews/custom/components/share/normalTable/index.jsx        |    2 
 src/tabviews/zshare/actionList/normalbutton/index.jsx             |    2 
 14 files changed, 41 insertions(+), 34 deletions(-)

diff --git a/src/components/header/index.scss b/src/components/header/index.scss
index 7c4e021..6ddedb5 100644
--- a/src/components/header/index.scss
+++ b/src/components/header/index.scss
@@ -169,6 +169,9 @@
     }
   }
 }
+.ant-dropdown.vertical-dropdown-menu {
+  z-index: 1100 !important;
+}
 
 .vertical-dropdown-menu, .vertical-dropdown-submenu {
   ul.ant-dropdown-menu {
diff --git a/src/components/tabview/index.jsx b/src/components/tabview/index.jsx
index a853921..3760c85 100644
--- a/src/components/tabview/index.jsx
+++ b/src/components/tabview/index.jsx
@@ -136,10 +136,27 @@
     }
   }
 
-  modifyTabs = (tab, type) => {
-    const { tabviews } = this.state
+  modifyTabs = (tab, type, fixed) => {
+    const { tabviews, activeId } = this.state
 
-    if (type === 'plus') {
+    if (type === 'plus' && fixed) {
+      let _tabs = tabviews.filter(item => item.MenuID !== tab.MenuID)
+      let index = _tabs.findIndex(item => item.MenuID === activeId)
+
+      this.setState({
+        tabviews: _tabs
+      }, () => {
+        if (index > -1) {
+          _tabs.splice(index + 1, 0, tab)
+        } else {
+          _tabs.push(tab)
+        }
+        this.setState({
+          tabviews: _tabs,
+          activeId: tab.MenuID
+        })
+      })
+    } else if (type === 'plus') {
       if (tabviews.findIndex(item => item.MenuID === tab.MenuID) > -1) {
         let _tabs = tabviews.filter(item => item.MenuID !== tab.MenuID)
         this.setState({
diff --git a/src/tabviews/custom/components/card/cardItem/index.jsx b/src/tabviews/custom/components/card/cardItem/index.jsx
index c8eedb5..5bb0f09 100644
--- a/src/tabviews/custom/components/card/cardItem/index.jsx
+++ b/src/tabviews/custom/components/card/cardItem/index.jsx
@@ -80,7 +80,7 @@
       if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
         MKEmitter.emit('modifyTabs', newtab, 'replace')
       } else {
-        MKEmitter.emit('modifyTabs', newtab, 'plus')
+        MKEmitter.emit('modifyTabs', newtab, 'plus', true)
       }
     } else if (card.setting.click === 'link') {
       let src = card.setting.linkurl
diff --git a/src/tabviews/custom/components/card/table-card/index.jsx b/src/tabviews/custom/components/card/table-card/index.jsx
index 5c8073b..60cb283 100644
--- a/src/tabviews/custom/components/card/table-card/index.jsx
+++ b/src/tabviews/custom/components/card/table-card/index.jsx
@@ -333,7 +333,7 @@
       if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
         MKEmitter.emit('modifyTabs', newtab, 'replace')
       } else {
-        MKEmitter.emit('modifyTabs', newtab, 'plus')
+        MKEmitter.emit('modifyTabs', newtab, 'plus', true)
       }
     } else if (card.setting.click === 'link') {
       let src = card.setting.linkurl
diff --git a/src/tabviews/custom/components/carousel/cardItem/index.jsx b/src/tabviews/custom/components/carousel/cardItem/index.jsx
index 6c02120..b5711fc 100644
--- a/src/tabviews/custom/components/carousel/cardItem/index.jsx
+++ b/src/tabviews/custom/components/carousel/cardItem/index.jsx
@@ -63,7 +63,7 @@
       if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
         MKEmitter.emit('modifyTabs', newtab, 'replace')
       } else {
-        MKEmitter.emit('modifyTabs', newtab, 'plus')
+        MKEmitter.emit('modifyTabs', newtab, 'plus', true)
       }
     } else if (card.setting.click === 'link') {
       let src = card.setting.linkurl
diff --git a/src/tabviews/custom/components/chart/antv-pie/index.jsx b/src/tabviews/custom/components/chart/antv-pie/index.jsx
index 64c224b..ade94bc 100644
--- a/src/tabviews/custom/components/chart/antv-pie/index.jsx
+++ b/src/tabviews/custom/components/chart/antv-pie/index.jsx
@@ -969,7 +969,7 @@
           if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
             MKEmitter.emit('modifyTabs', newtab, 'replace')
           } else {
-            MKEmitter.emit('modifyTabs', newtab, 'plus')
+            MKEmitter.emit('modifyTabs', newtab, 'plus', true)
           }
         } catch (e) {
           console.warn('鑿滃崟鎵撳紑澶辫触锛�')
diff --git a/src/tabviews/custom/components/form/normal-form/index.jsx b/src/tabviews/custom/components/form/normal-form/index.jsx
index 1ac0402..85fcccc 100644
--- a/src/tabviews/custom/components/form/normal-form/index.jsx
+++ b/src/tabviews/custom/components/form/normal-form/index.jsx
@@ -251,7 +251,7 @@
       if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
         MKEmitter.emit('modifyTabs', newtab, 'replace')
       } else {
-        MKEmitter.emit('modifyTabs', newtab, 'plus')
+        MKEmitter.emit('modifyTabs', newtab, 'plus', true)
       }
     }
   }
diff --git a/src/tabviews/custom/components/form/tab-form/index.jsx b/src/tabviews/custom/components/form/tab-form/index.jsx
index 503ad51..55a9f62 100644
--- a/src/tabviews/custom/components/form/tab-form/index.jsx
+++ b/src/tabviews/custom/components/form/tab-form/index.jsx
@@ -222,7 +222,7 @@
       if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
         MKEmitter.emit('modifyTabs', newtab, 'replace')
       } else {
-        MKEmitter.emit('modifyTabs', newtab, 'plus')
+        MKEmitter.emit('modifyTabs', newtab, 'plus', true)
       }
     }
   }
diff --git a/src/tabviews/custom/components/share/normalTable/index.jsx b/src/tabviews/custom/components/share/normalTable/index.jsx
index e56e977..800a973 100644
--- a/src/tabviews/custom/components/share/normalTable/index.jsx
+++ b/src/tabviews/custom/components/share/normalTable/index.jsx
@@ -585,7 +585,7 @@
       if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
         MKEmitter.emit('modifyTabs', tabmenu, 'replace')
       } else {
-        MKEmitter.emit('modifyTabs', tabmenu, 'plus')
+        MKEmitter.emit('modifyTabs', tabmenu, 'plus', true)
       }
     } else if (item.linkurl) {
       let src = item.linkurl
diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index 75b4a29..0aaf855 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -1409,7 +1409,7 @@
       if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
         MKEmitter.emit('modifyTabs', newtab, 'replace')
       } else {
-        MKEmitter.emit('modifyTabs', newtab, 'plus')
+        MKEmitter.emit('modifyTabs', newtab, 'plus', true)
       }
     }
   }
diff --git a/src/tabviews/zshare/actionList/tabbutton/index.jsx b/src/tabviews/zshare/actionList/tabbutton/index.jsx
index c3f65c5..ca9986b 100644
--- a/src/tabviews/zshare/actionList/tabbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/tabbutton/index.jsx
@@ -155,7 +155,7 @@
     if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
       MKEmitter.emit('modifyTabs', newtab, 'replace')
     } else {
-      MKEmitter.emit('modifyTabs', newtab, 'plus')
+      MKEmitter.emit('modifyTabs', newtab, 'plus', true)
     }
 
     MKEmitter.emit('openNewTab')
diff --git a/src/tabviews/zshare/normalTable/index.jsx b/src/tabviews/zshare/normalTable/index.jsx
index 9c9dc2f..af96ca2 100644
--- a/src/tabviews/zshare/normalTable/index.jsx
+++ b/src/tabviews/zshare/normalTable/index.jsx
@@ -272,7 +272,7 @@
       if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
         MKEmitter.emit('modifyTabs', tabmenu, 'replace')
       } else {
-        MKEmitter.emit('modifyTabs', tabmenu, 'plus')
+        MKEmitter.emit('modifyTabs', tabmenu, 'plus', true)
       }
     } else if (item.linkurl) {
       let src = item.linkurl
diff --git a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx
index 96d9c47..e5d20d3 100644
--- a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx
@@ -331,30 +331,16 @@
       }, () => {
         this.props.form.setFieldsValue(_fieldval)
       })
-    // } else if (key === 'tabType') {
-    //   let _tabs = this.props.tabs.filter(tab => tab.type === value)
-    //   let _fieldval = {}
-
-    //   this.setState({
-    //     formlist: this.state.formlist.map(item => {
-    //       if (item.key === 'linkTab') {
-    //         item.options = [
-    //           {
-    //             value: '',
-    //             text: '鏂板缓'
-    //           },
-    //           ..._tabs
-    //         ]
-    //       }
-    //       return item
-    //     })
-    //   }, () => {
-    //     this.props.form.setFieldsValue(_fieldval)
-    //   })
     } else if (key === 'funcType') {
       let _options = this.getOptions('funcbutton', this.state.interType, value, card.pageTemplate, card.tabTemplate, procMode, Ot)
       let _fieldval = {}
 
+      if (value === 'print') {
+        _fieldval.label = '鎵撳嵃'
+      } else if (value === 'closetab') {
+        _fieldval.label = '鍏抽棴'
+      }
+
       this.setState({
         funcType: value,
         formlist: this.state.formlist.map(item => {
diff --git a/src/templates/sharecomponent/fieldscomponent/index.jsx b/src/templates/sharecomponent/fieldscomponent/index.jsx
index 8f2a184..137071c 100644
--- a/src/templates/sharecomponent/fieldscomponent/index.jsx
+++ b/src/templates/sharecomponent/fieldscomponent/index.jsx
@@ -110,9 +110,11 @@
           if (cell.selected && cell.type === item.type) { // 鏁版嵁鏈慨鏀�
             items.push(item)
           } else if (cell.selected) { // 鏁版嵁绫诲瀷淇敼
+            item.initval = ''
             if (cell.type === 'select') {
               item.match = '='
             } else if (cell.type === 'daterange') {
+              item.initval = '[30, 0]'
               item.match = 'between'
             } else {
               cell.type = 'text'
@@ -120,7 +122,6 @@
             }
             
             item.type = cell.type
-            item.initval = ''
             items.push(item)
           }
           columnsMap.delete(item.field.toLowerCase())

--
Gitblit v1.8.0