From da34633b25d16359cd91a656acad5e811f9972b7 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 14 三月 2023 18:09:54 +0800
Subject: [PATCH] 2023-03-14

---
 src/menu/components/table/edit-table/columns/editColumn/index.jsx |   34 +++++++++++++++++-----------------
 1 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/menu/components/table/edit-table/columns/editColumn/index.jsx b/src/menu/components/table/edit-table/columns/editColumn/index.jsx
index 102006c..e445b43 100644
--- a/src/menu/components/table/edit-table/columns/editColumn/index.jsx
+++ b/src/menu/components/table/edit-table/columns/editColumn/index.jsx
@@ -17,6 +17,7 @@
   number: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'editable', 'initval', 'sum', 'blacklist'],
   textarea: ['label', 'field', 'type', 'Align', 'Hide', 'Width', 'prefix', 'initval', 'postfix', 'blacklist'],
   custom: ['label', 'type', 'Align', 'Hide', 'Width', 'blacklist'],
+  colspan: ['label', 'type', 'Align', 'Hide', 'blacklist'],
   action: ['label', 'type', 'Align', 'Width'],
   formula: ['label', 'type', 'Align', 'Hide', 'Width', 'prefix', 'postfix', 'eval', 'formula', 'blacklist'],
   index: ['label', 'type', 'Align', 'Width']
@@ -85,9 +86,7 @@
 
   editColumn = (column) => {
     let fields = fromJS(this.props.fields).toJS().map(item => {
-      if (item.label.toLowerCase() !== item.field.toLowerCase()) {
-        item.text = item.label + '锛�' + item.field + '锛�'
-      }
+      item.text = `${item.field}锛�${item.label}锛塦
       return item
     })
 
@@ -133,7 +132,7 @@
           return item
         })
       }, () => {
-        if (value === 'action') {
+        if (value === 'action' || value === 'colspan') {
           this.props.form.setFieldsValue({Align: 'center'})
         }
       })
@@ -216,7 +215,11 @@
 
     let resource = this.props.form.getFieldValue('dataSource') || ''
 
-    resource = `select '' as ${field},'鍏ㄩ儴' as ${text} union all \n${resource}`
+    if (field === text) {
+      resource = `select '' as ${field} union all \n${resource}`
+    } else {
+      resource = `select '' as ${field},'鍏ㄩ儴' as ${text} union all \n${resource}`
+    }
 
     this.props.form.setFieldsValue({dataSource: resource})
   }
@@ -347,21 +350,18 @@
   }
 
   handleSubmit = () => {
-    const { columns, column } = this.props
+    // const { columns } = this.props
     // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭�
     this.props.form.validateFieldsAndScroll((err, values) => {
       if (!err) {
-        values.uuid = column.uuid
-        values.marks = column.marks || []
-        
-        if (values.field && columns.filter(col => col.field && col.uuid !== values.uuid && col.field === values.field).length > 0) {
-          notification.warning({
-            top: 92,
-            message: '瀛楁宸叉坊鍔狅紒',
-            duration: 5
-          })
-          return
-        }
+        // if (values.field && columns.filter(col => col.field && col.uuid !== values.uuid && col.field === values.field).length > 0) {
+        //   notification.warning({
+        //     top: 92,
+        //     message: '瀛楁宸叉坊鍔狅紒',
+        //     duration: 5
+        //   })
+        //   return
+        // }
         this.setState({visible: false, formlist: null})
         this.props.submitCol(values)
 

--
Gitblit v1.8.0