From 1963b0ec9aaf1cea0580cbacda886fd185d3170c Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 21 七月 2022 14:53:57 +0800
Subject: [PATCH] 2022-07-21

---
 src/tabviews/custom/components/table/edit-table/index.jsx   |    8 +--
 src/views/interface/workspace/request/index.jsx             |    4 +-
 src/tabviews/zshare/topSearch/index.scss                    |   13 ++++++
 src/tabviews/zshare/topSearch/index.jsx                     |   17 +++++---
 src/tabviews/zshare/topSearch/advanceform/index.scss        |   12 ++++++
 src/tabviews/custom/components/table/normal-table/index.jsx |   12 ++---
 src/menu/components/search/main-search/dragsearch/card.jsx  |    2 
 src/menu/components/search/main-search/index.scss           |   19 +++++++++
 src/menu/components/search/main-search/options.jsx          |    2 
 src/templates/sharecomponent/searchcomponent/index.scss     |    1 
 10 files changed, 65 insertions(+), 25 deletions(-)

diff --git a/src/menu/components/search/main-search/dragsearch/card.jsx b/src/menu/components/search/main-search/dragsearch/card.jsx
index 534bd47..5473be7 100644
--- a/src/menu/components/search/main-search/dragsearch/card.jsx
+++ b/src/menu/components/search/main-search/dragsearch/card.jsx
@@ -113,7 +113,7 @@
         <CloseOutlined className="close" onClick={() => delCard(id)} />
       </div>
     } trigger="hover">
-      <div className={'page-card ' + card.labelShow + ' ' + card.type} style={{ opacity: opacity}}>
+      <div className={'page-card ' + (card.labelShow === 'false' ? 'label-hide ' : '') + card.type + (card.advanced === 'true' ? ' advanced' : '')} style={{ opacity: opacity}}>
         <div ref={node => drag(drop(node))}>
           <Form.Item
             labelCol={{xs: { span: 24 }, sm: { span: 8 }}}
diff --git a/src/menu/components/search/main-search/index.scss b/src/menu/components/search/main-search/index.scss
index 85f779d..d68899b 100644
--- a/src/menu/components/search/main-search/index.scss
+++ b/src/menu/components/search/main-search/index.scss
@@ -56,6 +56,18 @@
           padding: 4px 20px 4px 5px;
           font-size: 13px;
         }
+        .check-card-edit-box {
+          .no-margin-bottom {
+            margin-bottom: 0px;
+          }
+          .card-cell {
+            padding: 4px 6px;
+          }
+          .card-color-cell {
+            padding: 4px 6px;
+            min-height: 32px;
+          }
+        }
       }
     }
     .ant-form-item::after {
@@ -76,7 +88,7 @@
       z-index: 2;
     }
   }
-  .page-card.false {
+  .page-card.label-hide {
     .ant-form-item-label {
       display: none;
     }
@@ -84,6 +96,11 @@
       width: 100%;
     }
   }
+  .page-card.advanced {
+    .ant-form-item-label label {
+      color: orange;
+    }
+  }
   .mk-search-item-wrap.action {
     .ant-form-item-label, .ant-form-item-control-wrapper {
       display: inline-block;
diff --git a/src/menu/components/search/main-search/options.jsx b/src/menu/components/search/main-search/options.jsx
index 8f39286..e72fbb2 100644
--- a/src/menu/components/search/main-search/options.jsx
+++ b/src/menu/components/search/main-search/options.jsx
@@ -94,7 +94,7 @@
       tooltip: '鎼滅储鎸夐挳璺濆乏渚х殑鐧惧垎姣旓紝鍙傜収鎼滅储鏉′欢鐨勫悕绉板搴︺��',
       min: 0,
       max: 100,
-      precision: 10,
+      precision: 1,
       required: true
     },
     {
diff --git a/src/tabviews/custom/components/table/edit-table/index.jsx b/src/tabviews/custom/components/table/edit-table/index.jsx
index 2075ffd..abbf68e 100644
--- a/src/tabviews/custom/components/table/edit-table/index.jsx
+++ b/src/tabviews/custom/components/table/edit-table/index.jsx
@@ -29,7 +29,6 @@
     BID: '',              // 涓婄骇ID
     BData: '',            // 涓婄骇缁勪欢琛屾暟鎹�
     config: {},           // 椤甸潰閰嶇疆淇℃伅锛屽寘鎷寜閽�佹悳绱€�佹樉绀哄垪銆佹爣绛剧瓑
-    searchlist: null,     // 鎼滅储鏉′欢
     actions: null,        // 鎸夐挳闆�
     columns: null,        // 鏄剧ず鍒�
     arr_field: '',        // 浣跨敤 sPC_Get_TableData 鏃剁殑鏌ヨ瀛楁闆�
@@ -150,7 +149,6 @@
       title: _config.wrap.title,
       config: _config,
       setting: setting,
-      searchlist: _config.search,
       actions: _config.action,
       columns: _columns,
       arr_field: _config.columns.map(col => col.field).join(','),
@@ -576,13 +574,13 @@
   }
 
   render() {
-    const { BID, setting, searchlist, actions, config, columns, BData, selectedData, lock } = this.state
+    const { BID, setting, actions, config, columns, BData, selectedData, lock } = this.state
 
     return (
       <div className="custom-edit-table" id={'anchor' + config.uuid} style={config.style}>
         <NormalHeader config={config}/>
-        {searchlist && searchlist.length ?
-          <MainSearch BID={BID} setting={config.wrap} searchlist={searchlist} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null
+        {config.search && config.search.length ?
+          <MainSearch BID={BID} config={config} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null
         }
         <MainAction
           BID={BID}
diff --git a/src/tabviews/custom/components/table/normal-table/index.jsx b/src/tabviews/custom/components/table/normal-table/index.jsx
index 1fbcb48..85e4fe5 100644
--- a/src/tabviews/custom/components/table/normal-table/index.jsx
+++ b/src/tabviews/custom/components/table/normal-table/index.jsx
@@ -32,7 +32,6 @@
     BID: '',              // 涓婄骇ID
     BData: '',            // 涓婄骇缁勪欢琛屾暟鎹�
     config: {},           // 椤甸潰閰嶇疆淇℃伅锛屽寘鎷寜閽�佹悳绱€�佹樉绀哄垪銆佹爣绛剧瓑
-    searchlist: null,     // 鎼滅储鏉′欢
     actions: null,        // 鎸夐挳闆�
     columns: null,        // 鏄剧ず鍒�
     arr_field: '',        // 浣跨敤 sPC_Get_TableData 鏃剁殑鏌ヨ瀛楁闆�
@@ -151,7 +150,6 @@
       data: _data,
       config: _config,
       setting: setting,
-      searchlist: _config.search,
       actions: _config.action,
       columns: _config.cols,
       arr_field: _config.columns.map(col => col.field).join(','),
@@ -625,7 +623,7 @@
   }
 
   render() {
-    const { BID, setting, searchlist, actions, config, columns, selectedData, BData, data } = this.state
+    const { BID, setting, actions, config, columns, selectedData, BData, data } = this.state
 
     let style = {...config.style}
     if (config.wrap.empty === 'hidden' && (!data || data.length === 0)) {
@@ -636,8 +634,8 @@
       <div className="custom-normal-table" id={'anchor' + config.uuid} style={style}>
         {config.wrap.collapse === 'true' ? <Collapse bordered={false} defaultActiveKey="1" expandIconPosition="right">
           <Panel forceRender={true} header={<NormalHeader config={config}/>} key="1">
-            {searchlist && searchlist.length ?
-              <MainSearch BID={BID} setting={config.wrap} searchlist={searchlist} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null
+            {config.search && config.search.length ?
+              <MainSearch BID={BID} config={config} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null
             }
             <MainAction
               BID={BID}
@@ -665,8 +663,8 @@
           </Panel>
         </Collapse> : <>
           <NormalHeader config={config}/>
-          {searchlist && searchlist.length ?
-            <MainSearch BID={BID} setting={config.wrap} searchlist={searchlist} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null
+          {config.search && config.search.length ?
+            <MainSearch BID={BID} config={config} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null
           }
           <MainAction
             BID={BID}
diff --git a/src/tabviews/zshare/topSearch/advanceform/index.scss b/src/tabviews/zshare/topSearch/advanceform/index.scss
index b3cdf80..b16452d 100644
--- a/src/tabviews/zshare/topSearch/advanceform/index.scss
+++ b/src/tabviews/zshare/topSearch/advanceform/index.scss
@@ -32,6 +32,18 @@
   .ant-calendar-picker-container {
     z-index: 10 !important;
   }
+  .check-card-form-box {
+    .no-margin-bottom {
+      margin-bottom: 0px;
+    }
+    .card-cell {
+      padding: 4px 6px;
+    }
+    .card-color-cell {
+      padding: 4px 6px;
+      min-height: 32px;
+    }
+  }
   .advance-button {
     position: absolute;
     left: 0;
diff --git a/src/tabviews/zshare/topSearch/index.jsx b/src/tabviews/zshare/topSearch/index.jsx
index 049729e..43ad250 100644
--- a/src/tabviews/zshare/topSearch/index.jsx
+++ b/src/tabviews/zshare/topSearch/index.jsx
@@ -63,6 +63,8 @@
       _setting.placement = setting.drawerPlacement || 'right'
       _setting.ratio = setting.searchRatio || 6
       _setting.labelwidth = setting.searchLwidth !== undefined ? setting.searchLwidth : 33.3
+      _setting.labelCol = {style: {width: _setting.labelwidth + '%'}}
+      _setting.wrapperCol = {style: {width: (100 - _setting.labelwidth) + '%'}}
       _setting.style = null
     } else if (config) {
       if (config.wrap) {
@@ -72,12 +74,16 @@
         _setting.placement = config.wrap.drawerPlacement || 'right'
         _setting.ratio = config.wrap.searchRatio || 6
         _setting.labelwidth = config.wrap.searchLwidth !== undefined ? config.wrap.searchLwidth : 33.3
-        _setting.style = null
+        _setting.labelCol = {style: {width: _setting.labelwidth + '%'}}
+        _setting.wrapperCol = {style: {width: (100 - _setting.labelwidth) + '%'}}
       }
+      _setting.style = null
       
       if (config.type === 'search') {
         _setting.float = config.wrap.float || 'left'
         _setting.style = config.style
+      } else if (config.type === 'table' && (config.subtype === 'normaltable' || config.subtype === 'editable')) {
+        _setting.float = 'left'
       } else {
         _setting.float = 'right'
         _setting.show = false
@@ -85,17 +91,14 @@
       }
     }
 
-    _setting.labelCol = {style: {width: _setting.labelwidth + '%'}}
-    _setting.wrapperCol = {style: {width: (100 - _setting.labelwidth) + '%'}}
-
-    if (_setting.advanceType === 'drawer') {
+    if (_setting.advanceType === 'drawer' && _setting.advWidth) {
       if (_setting.placement === 'top' || _setting.placement === 'bottom') {
         _setting.advHeight = _setting.advWidth > 100 ? _setting.advWidth + 'px' : _setting.advWidth + 'vh'
         _setting.advWidth = '100vw'
       } else {
         _setting.advWidth = _setting.advWidth > 100 ? _setting.advWidth + 'px' : _setting.advWidth + 'vw'
       }
-    } else if (_setting.advanceType === 'modal') {
+    } else if (_setting.advanceType === 'modal' && _setting.advWidth) {
       if (_setting.advWidth < 100) {
         _setting.advWidth = _setting.advWidth + 'vw'
       } else {
@@ -524,7 +527,7 @@
 
     if (setting.show || setting.showAdv) {
       fields.push(
-        <Col span={setting.searchRatio} style={{ whiteSpace: 'nowrap' }} className="mk-search-col search-button" key="actions">
+        <Col span={setting.ratio} style={{ whiteSpace: 'nowrap' }} className="mk-search-col search-button" key="actions">
           <Form.Item
             label={' '}
             colon={false}
diff --git a/src/tabviews/zshare/topSearch/index.scss b/src/tabviews/zshare/topSearch/index.scss
index 551a9fd..1d7e1bc 100644
--- a/src/tabviews/zshare/topSearch/index.scss
+++ b/src/tabviews/zshare/topSearch/index.scss
@@ -42,6 +42,18 @@
       content: '*';
     }
   }
+  .check-card-form-box {
+    .no-margin-bottom {
+      margin-bottom: 0px;
+    }
+    .card-cell {
+      padding: 4px 6px;
+    }
+    .card-color-cell {
+      padding: 4px 6px;
+      min-height: 32px;
+    }
+  }
   .search-button {
     min-height: 55px;
     .ant-btn-link, .ant-btn-link:hover, .ant-btn-link:active{
@@ -57,7 +69,6 @@
     }
     .anticon-down {
       transition: transform 0.3s;
-      // top: 3px!important;
       margin-left: 2px;
     }
     .visible {
diff --git a/src/templates/sharecomponent/searchcomponent/index.scss b/src/templates/sharecomponent/searchcomponent/index.scss
index 2d0f22c..29bbb21 100644
--- a/src/templates/sharecomponent/searchcomponent/index.scss
+++ b/src/templates/sharecomponent/searchcomponent/index.scss
@@ -71,6 +71,7 @@
             padding: 4px 6px;
           }
           .card-color-cell {
+            padding: 4px 6px;
             min-height: 32px;
           }
         }
diff --git a/src/views/interface/workspace/request/index.jsx b/src/views/interface/workspace/request/index.jsx
index 5c2536c..a0533b1 100644
--- a/src/views/interface/workspace/request/index.jsx
+++ b/src/views/interface/workspace/request/index.jsx
@@ -200,7 +200,7 @@
   }
 
   encryptParam (param) {
-    param.nonc = Utils.getuuid()
+    param.nonc = param.nonc || Utils.getuuid()
       
     let keys = Object.keys(param).sort()
     let values = ''
@@ -221,7 +221,7 @@
       }
     })
     param.sign = md5(values)
-    param.t = new Date().getTime()
+    param.t = param.t || new Date().getTime()
 
     return param
   }

--
Gitblit v1.8.0