From 010fdcf8abd58bde5c1106db8ed8448effc75b4b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 25 二月 2025 16:37:46 +0800
Subject: [PATCH] 2025-02-25

---
 src/menu/components/share/colsControl/index.jsx |   29 ++++++++++++++++++++---------
 1 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/src/menu/components/share/colsControl/index.jsx b/src/menu/components/share/colsControl/index.jsx
index 8b0ec42..29a113c 100644
--- a/src/menu/components/share/colsControl/index.jsx
+++ b/src/menu/components/share/colsControl/index.jsx
@@ -35,6 +35,9 @@
         title: '瀵规瘮鏂瑰紡',
         dataIndex: 'match',
         width: '18%',
+        render: text => {
+          return text === 'regexp' ? '姝e垯琛ㄨ揪寮�' : text
+        }
       },
       {
         title: '瀵规瘮鍊�',
@@ -164,8 +167,10 @@
 
     let cvalues = {}
     let cols = config.cols.map(item => {
-      let types = {custom: '鑷畾涔夊垪', colspan: '鍚堝苟鍒�'}
-      let label = types[item.type] ? `${item.label}锛�${types[item.type]}锛塦 : item.label
+      let label = item.label
+      if (item.type === 'colspan' && item.subcols && item.subcols.length > 0) {
+        label = `${item.label}锛�${item.subcols.map(cell => cell.label).join('銆�')}锛塦
+      }
 
       cvalues[item.uuid] = label
 
@@ -240,7 +245,7 @@
     _config.colsCtrls = colsCtrls
 
     if (this.customForm && this.customForm.state.editItem) {
-      const _this = this
+      const that = this
       let title = '瀛樺湪鏈繚瀛橀」锛岀‘瀹氬拷鐣ュ悧锛�'
       if (s.length > 0) {
         title = `瀛樺湪鏈繚瀛橀」锛屼笖绗� ${s.join('銆�')} 琛屼腑瀛楁鍦ㄦ悳绱㈡潯浠朵腑涓嶅瓨鍦紝纭畾蹇界暐鍚楋紵`
@@ -248,18 +253,18 @@
       confirm({
         title: title,
         onOk() {
-          _this.setState({ visible: false })
-          _this.props.onSubmit(_config)
+          that.setState({ visible: false })
+          that.props.onSubmit(_config)
         },
         onCancel() {}
       })
     } else if (s.length > 0) {
-      const _this = this
+      const that = this
       confirm({
         title: `绗� ${s.join('銆�')} 琛屼腑瀛楁鍦ㄦ悳绱㈡潯浠朵腑涓嶅瓨鍦紝纭畾蹇界暐鍚楋紵`,
         onOk() {
-          _this.setState({ visible: false })
-          _this.props.onSubmit(_config)
+          that.setState({ visible: false })
+          that.props.onSubmit(_config)
         },
         onCancel() {}
       })
@@ -272,10 +277,16 @@
   }
 
   render() {
+    const { config } = this.props
     const { colsCtrls, columns, visible, cols, searches } = this.state
 
+    let className = ''
+    if (config.colsCtrls && config.colsCtrls.length) {
+      className = 'cols-ctrls'
+    }
+
     return (
-      <div style={{display: 'inline-block'}}>
+      <div style={{display: 'inline-block'}} className={className}>
         <ApartmentOutlined style={{color: '#13c2c2'}} title="鏄剧ず鍒楁帶鍒�" onClick={this.resetMark} />
         <Modal
           wrapClassName="column-control-modal-wrap"

--
Gitblit v1.8.0