From cc1a76df575c18f0d0ee96e8658461efdce3a918 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 17 一月 2023 18:01:01 +0800
Subject: [PATCH] 2023-01-17
---
src/menu/components/share/markcomponent/markform/index.jsx | 23 ++++++++++++++---------
1 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/src/menu/components/share/markcomponent/markform/index.jsx b/src/menu/components/share/markcomponent/markform/index.jsx
index 5c437a6..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,21 +37,26 @@
}
}
+ 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: '璇烽�夋嫨瀵规瘮瀛楁!'
}
]
})(
- <Cascader options={columns} placeholder=""/>
+ <Cascader className="mark-type" options={columns} placeholder=""/>
)}
</Form.Item>
</Col>
@@ -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,11 +114,11 @@
rules: [
{
required: true,
- message: this.props.dict['form.required.select'] + '鏍囪鏂瑰紡!'
+ message: '璇烽�夋嫨鏍囪鏂瑰紡!'
}
]
})(
- <Cascader options={signs} placeholder=""/>
+ <Cascader popupClassName="mark-type" options={signs} placeholder=""/>
)}
</Form.Item>
</Col> : null}
--
Gitblit v1.8.0