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/share/markcomponent/markform/index.jsx |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/menu/components/share/markcomponent/markform/index.jsx b/src/menu/components/share/markcomponent/markform/index.jsx
index 560f22d..f4adc4d 100644
--- a/src/menu/components/share/markcomponent/markform/index.jsx
+++ b/src/menu/components/share/markcomponent/markform/index.jsx
@@ -8,7 +8,7 @@
 
 class UniqueForm extends Component {
   static propTpyes = {
-    dict: PropTypes.object,         // 瀛楀吀椤�
+    field: PropTypes.any,
     columns: PropTypes.array,       // 鍒楀悕闆嗗悎
     signs: PropTypes.array,         // 鏍囪绫诲瀷
     markChange: PropTypes.func      // 淇敼鍑芥暟
@@ -24,7 +24,7 @@
   }
 
   render() {
-    const { columns, signs } = this.props
+    const { columns, signs, field } = this.props
     const { getFieldDecorator } = this.props.form
     const formItemLayout = {
       labelCol: {
@@ -37,17 +37,22 @@
       }
     }
 
+    let initVal = []
+    if (field) {
+      initVal = [field, 'static']
+    }
+
     return (
       <Form {...formItemLayout} className="normal-table-mark-form">
         <Row gutter={24}>
           <Col span={6}>
             <Form.Item label={'瀵规瘮瀛楁'}>
               {getFieldDecorator('field', {
-                initialValue: [],
+                initialValue: initVal,
                 rules: [
                   {
                     required: true,
-                    message: this.props.dict['form.required.select'] + '瀵规瘮瀛楁!'
+                    message: '璇烽�夋嫨瀵规瘮瀛楁!'
                   }
                 ]
               })(
@@ -62,7 +67,7 @@
                 rules: [
                   {
                     required: true,
-                    message: this.props.dict['form.required.select'] + '瀵规瘮鏂瑰紡!'
+                    message: '璇烽�夋嫨瀵规瘮鏂瑰紡!'
                   }
                 ]
               })(
@@ -94,7 +99,7 @@
                 rules: [
                   {
                     required: true,
-                    message: this.props.dict['form.required.select'] + '棰滆壊!'
+                    message: '璇烽�夋嫨棰滆壊!'
                   }
                 ]
               })(
@@ -109,7 +114,7 @@
                 rules: [
                   {
                     required: true,
-                    message: this.props.dict['form.required.select'] + '鏍囪鏂瑰紡!'
+                    message: '璇烽�夋嫨鏍囪鏂瑰紡!'
                   }
                 ]
               })(

--
Gitblit v1.8.0