From 32973f90869ff466401759c23681fc06fa65c71a Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 10 六月 2025 23:06:50 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/menu/components/table/normal-table/columns/editColumn/index.jsx |  112 +++++++++++++++++++++++++++++---------------------------
 1 files changed, 58 insertions(+), 54 deletions(-)

diff --git a/src/menu/components/table/normal-table/columns/editColumn/index.jsx b/src/menu/components/table/normal-table/columns/editColumn/index.jsx
index df3913f..9ec8a74 100644
--- a/src/menu/components/table/normal-table/columns/editColumn/index.jsx
+++ b/src/menu/components/table/normal-table/columns/editColumn/index.jsx
@@ -12,14 +12,15 @@
 const columnTypeOptions = {
   text: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'textFormat', 'blacklist', 'perspective', 'rowspan'],
   number: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'blacklist', 'perspective', 'sum', 'rowspan'],
-  link: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'joint', 'Width', 'blacklist', 'nameField'],
+  link: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'blacklist', 'nameField'],
   textarea: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'blacklist'],
-  picture: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'blacklist', 'scale', 'lenWidRadio', 'backgroundSize', 'span'],
+  picture: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'blacklist', 'scale', 'lenWidRadio', 'backgroundSize', 'span', 'lostTip'],
   video: ['label', 'field', 'type', 'Align', 'Hide', 'startTime', 'Width', 'blacklist', 'aspectRatio'],
   colspan: ['label', 'type', 'Align', 'Hide', 'blacklist'],
-  custom: ['label', 'type', 'Align', 'Width', 'blacklist'],
+  custom: ['label', 'type', 'Align', 'Width', 'blacklist', 'IsSort'],
   action: ['label', 'type', 'Align', 'Width'],
   formula: ['label', 'type', 'Align', 'Hide', 'Width', 'prefix', 'postfix', 'eval', 'formula', 'blacklist'],
+  extend: ['label', 'field', 'type', 'Align', 'Width', 'colUnit', 'shift', 'quota', 'supField'],
   index: ['label', 'type', 'Align', 'Width']
 }
 
@@ -89,14 +90,33 @@
 
     if (this.record.type === 'text' || this.record.type === 'number') {
       if (this.record.perspective === 'linkmenu') {
-        _options.push('linkmenu', 'linkfields', 'open')
+        _options.push('linkmenu', 'open')
       } else if (this.record.perspective === 'linkurl') {
-        _options.push('linkurl', 'linkfields', 'open')
+        _options.push('linkurl', 'open')
+      }
+    } else if (this.record.type === 'formula') {
+      if (this.record.eval === 'true') {
+        _options.push('decimal')
+      }
+      if (this.record.eval !== 'func') {
+        _options.push('evalchars')
+      }
+    } else if (this.record.type === 'custom' && this.record.IsSort === 'true') {
+      _options.push('sortField')
+    } else if (this.record.type === 'extend') {
+      if (this.record.colUnit === 'day') {
+        _options.push('dayFormat')
+      } else {
+        _options.push('hourFormat')
       }
     }
-    
-    if (this.record.type === 'formula' && this.record.eval === 'true') {
-      _options.push('decimal')
+
+    if (this.record.Hide !== 'true') {
+      if (['number', 'formula'].includes(this.record.type)) {
+        _options.push('noValue')
+      } else if (this.record.type === 'text' && ['YYYY-MM-DD', 'YYYY-MM-DD HH:mm:ss'].includes(this.record.textFormat)) {
+        _options.push('noValue')
+      }
     }
 
     return _options
@@ -106,6 +126,10 @@
     this.record[key] = value
 
     if (key === 'type') {
+      if (['link', 'textarea', 'picture', 'custom'].includes(value)) {
+        this.record.IsSort = 'false'
+      }
+      
       let _options = this.getOptions()
 
       let _field = ''
@@ -125,7 +149,7 @@
           return item
         })
       }, () => {
-        if (value === 'link' || value === 'textarea' || value === 'picture') {
+        if (['link', 'textarea', 'picture', 'custom'].includes(value)) {
           this.props.form.setFieldsValue({IsSort: 'false'})
         } else if (value === 'text' || value === 'number') {
           this.props.form.setFieldsValue({perspective: ''})
@@ -174,7 +198,7 @@
       }
     } else if (key === 'format' && value === 'percent') {
       this.props.form.setFieldsValue({postfix: '%'})
-    } else if (['perspective', 'eval'].includes(key)) {
+    } else if (['perspective', 'eval', 'IsSort', 'textFormat', 'colUnit'].includes(key)) {
       let _options = this.getOptions()
 
       this.setState({
@@ -198,22 +222,26 @@
     formlist.forEach((item, index) => {
       if (item.hidden || item.forbid) return
 
+      let label = item.label
+      if (item.tooltip) {
+        if (item.toolWidth) {
+          label = <Tooltip placement="topLeft" overlayStyle={{maxWidth: item.toolWidth}} title={<div onClick={(e) => e.stopPropagation()}>{item.tooltip}</div>}><QuestionCircleOutlined className="mk-form-tip" />{item.label}</Tooltip>
+        } else {
+          label = <Tooltip placement="topLeft" title={<div onClick={(e) => e.stopPropagation()}>{item.tooltip}</div>}><QuestionCircleOutlined className="mk-form-tip" />{item.label}</Tooltip>
+        }
+      }
+
       if (item.type === 'text') {
-        let rules = []
+        let rules = item.rules || []
         if (item.key !== 'linkurl') {
-          rules = [{
+          rules.push({
             max: formRule.input.max,
             message: formRule.input.message
-          }]
+          })
         }
         fields.push(
           <Col span={12} key={index}>
-            <Form.Item label={item.tooltip ?
-              <Tooltip placement="topLeft" title={item.tooltip}>
-                <QuestionCircleOutlined className="mk-form-tip" />
-                {item.label}
-              </Tooltip> : item.label
-            }>
+            <Form.Item label={label}>
               {getFieldDecorator(item.key, {
                 initialValue: item.initVal || '',
                 rules: [
@@ -230,12 +258,7 @@
       } else if (item.type === 'number') {
         fields.push(
           <Col span={12} key={index}>
-            <Form.Item label={item.tooltip ?
-              <Tooltip placement="topLeft" title={item.tooltip}>
-                <QuestionCircleOutlined className="mk-form-tip" />
-                {item.label}
-              </Tooltip> : item.label
-            }>
+            <Form.Item label={label}>
               {getFieldDecorator(item.key, {
                 initialValue: item.initVal,
                 rules: [
@@ -252,7 +275,7 @@
       } else if (item.type === 'select') {
         fields.push(
           <Col span={12} key={index}>
-            <Form.Item label={item.label}>
+            <Form.Item label={label}>
               {getFieldDecorator(item.key, {
                 initialValue: item.initVal || '',
                 rules: [
@@ -281,12 +304,7 @@
       } else if (item.type === 'radio') {
         fields.push(
           <Col span={12} key={index}>
-            <Form.Item label={item.tooltip ?
-              <Tooltip placement="topLeft" title={item.tooltip}>
-                <QuestionCircleOutlined className="mk-form-tip" />
-                {item.label}
-              </Tooltip> : item.label
-            }>
+            <Form.Item label={label}>
               {getFieldDecorator(item.key, {
                 initialValue: item.initVal,
                 rules: [
@@ -308,12 +326,7 @@
       } else if (item.type === 'checkbox') {
         fields.push(
           <Col span={12} key={index}>
-            <Form.Item label={item.tooltip ?
-              <Tooltip placement="topLeft" title={item.tooltip}>
-                <QuestionCircleOutlined className="mk-form-tip" />
-                {item.label}
-              </Tooltip> : item.label
-            }>
+            <Form.Item label={label}>
               {getFieldDecorator(item.key, {
                 initialValue: item.initVal
               })(
@@ -327,7 +340,7 @@
       } else if (item.type === 'multiselect') { // 澶氶��
         fields.push(
           <Col span={12} key={index}>
-            <Form.Item label={item.label}>
+            <Form.Item label={label}>
               {getFieldDecorator(item.key, {
                 initialValue: item.initVal || []
               })(
@@ -344,10 +357,10 @@
             </Form.Item>
           </Col>
         )
-      } else if (item.type === 'cascader') { // 澶氶��
+      } else if (item.type === 'cascader') {
         fields.push(
           <Col span={12} key={index}>
-            <Form.Item label={item.label}>
+            <Form.Item label={label}>
               {getFieldDecorator(item.key, {
                 initialValue: item.initVal || [],
                 rules: [
@@ -370,12 +383,7 @@
         if (item.key === 'formula') {
           fields.push(
             <Col span={24} className="textarea" key={index}>
-              <Form.Item label={item.tooltip ?
-                <Tooltip placement="topLeft" title={item.tooltip}>
-                  <QuestionCircleOutlined className="mk-form-tip" />
-                  {item.label}
-                </Tooltip> : item.label
-              }>
+              <Form.Item label={label}>
                 {getFieldDecorator(item.key, {
                   initialValue: item.initVal || '',
                   rules: [
@@ -394,12 +402,7 @@
         } else {
           fields.push(
             <Col span={24} key={index} className="textarea">
-              <Form.Item label={item.tooltip ?
-                <Tooltip placement="topLeft" title={item.tooltip}>
-                  <QuestionCircleOutlined className="mk-form-tip" />
-                  {item.label}
-                </Tooltip> : item.label
-              }>
+              <Form.Item label={label}>
                 {getFieldDecorator(item.key, {
                   initialValue: item.initVal || '',
                   rules: [
@@ -424,7 +427,7 @@
     this.props.form.validateFieldsAndScroll((err, values) => {
       if (!err) {
         // eslint-disable-next-line
-        if (values.type === 'formula' && values.eval !== 'false' && /^[\u4E00-\u9FA50-9a-zA-Z_\s@\+\-\*\/]*$/ig.test(values.formula) && /[\+\-\*\/]/ig.test(values.formula)) {
+        if (values.type === 'formula' && values.eval === 'true' && /^[\u4E00-\u9FA50-9a-zA-Z_\s@\+\-\*\/]*$/ig.test(values.formula) && /[\+\-\*\/]/ig.test(values.formula)) {
           let cols = []
           fields.forEach(col => {
             if (/^(Int|Decimal)/ig.test(col.datatype)) {
@@ -465,6 +468,7 @@
       <div style={{display: 'inline-block'}}>
         <Modal
           title="鏄剧ず鍒楃紪杈�"
+          wrapClassName="mk-scroll-modal"
           visible={visible}
           width={850}
           maskClosable={false}

--
Gitblit v1.8.0