|
@@ -56,14 +56,14 @@ const BasicForm = props => {
|
56
|
56
|
})
|
57
|
57
|
}
|
58
|
58
|
|
59
|
|
- // eslint-disable-next-line react-hooks/rules-of-hooks
|
60
|
|
- useEffect(() => {
|
61
|
|
- props.form.setFieldsValue({ isEnlist })
|
62
|
|
- if (dynamicId) {
|
63
|
|
- getDynamicData(dynamicId);
|
64
|
|
- }
|
65
|
|
- }, [])
|
66
|
|
-
|
|
59
|
+ // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
60
|
+ useEffect(() => {
|
|
61
|
+ props.form.setFieldsValue({ isEnlist })
|
|
62
|
+ if (dynamicId) {
|
|
63
|
+ getDynamicData(dynamicId);
|
|
64
|
+ }
|
|
65
|
+ }, [])
|
|
66
|
+
|
67
|
67
|
const handleSubmit = e => {
|
68
|
68
|
e.preventDefault();
|
69
|
69
|
props.form.validateFields((err, values) => {
|
|
@@ -78,7 +78,7 @@ const BasicForm = props => {
|
78
|
78
|
values.enlistStart = moment(enlistStart).format('YYYY-MM-DD HH:mm');
|
79
|
79
|
values.enlistEnd = moment(enlistEnd).format('YYYY-MM-DD HH:mm');
|
80
|
80
|
}
|
81
|
|
-
|
|
81
|
+
|
82
|
82
|
console.log('submit data --->', values)
|
83
|
83
|
if (dynamicId) {
|
84
|
84
|
values.dynamicId = dynamicId
|
|
@@ -111,97 +111,97 @@ const BasicForm = props => {
|
111
|
111
|
<>
|
112
|
112
|
<Form {...formItemLayout} onSubmit={handleSubmit}>
|
113
|
113
|
<Form.Item label="所属项目">
|
114
|
|
- {getFieldDecorator('buildingId', {
|
115
|
|
- rules: [
|
116
|
|
- {
|
117
|
|
- required: true,
|
118
|
|
- message: '请选择所属项目',
|
119
|
|
- },
|
120
|
|
- ],
|
121
|
|
- })(<BuildSelect disabled={disable}/>)}
|
|
114
|
+ {getFieldDecorator('buildingId', {
|
|
115
|
+ rules: [
|
|
116
|
+ {
|
|
117
|
+ required: true,
|
|
118
|
+ message: '请选择所属项目',
|
|
119
|
+ },
|
|
120
|
+ ],
|
|
121
|
+ })(<BuildSelect disabled={disable} />)}
|
122
|
122
|
</Form.Item>
|
123
|
123
|
<Form.Item label="活动封面图1" help="建议图片尺寸:750px*420px,比例16:9,格式:jpg,用于:首页推荐/活动列表">
|
124
|
124
|
{getFieldDecorator('listImgUrl', {
|
125
|
|
- rules: [
|
126
|
|
- {
|
127
|
|
- required: true,
|
128
|
|
- message: '请选择活动封面图1',
|
129
|
|
- },
|
130
|
|
- ],
|
131
|
|
- })(<ImageUploader />)}
|
|
125
|
+ rules: [
|
|
126
|
+ {
|
|
127
|
+ required: true,
|
|
128
|
+ message: '请选择活动封面图1',
|
|
129
|
+ },
|
|
130
|
+ ],
|
|
131
|
+ })(<ImageUploader />)}
|
132
|
132
|
</Form.Item>
|
133
|
133
|
<Form.Item label="活动封面图2" help="建议图片尺寸:750*250,比例3:1,格式:jpg,用于:项目详情页">
|
134
|
134
|
{getFieldDecorator('bannerListImg', {
|
135
|
|
- rules: [
|
136
|
|
- {
|
137
|
|
- required: true,
|
138
|
|
- message: '请选择活动封面图2',
|
139
|
|
- },
|
140
|
|
- ],
|
141
|
|
- })(<ImageUploader />)}
|
|
135
|
+ rules: [
|
|
136
|
+ {
|
|
137
|
+ required: true,
|
|
138
|
+ message: '请选择活动封面图2',
|
|
139
|
+ },
|
|
140
|
+ ],
|
|
141
|
+ })(<ImageUploader />)}
|
142
|
142
|
</Form.Item>
|
143
|
143
|
<Form.Item label="活动详情主图" help="建议图片尺寸:750*600px,比例5:4,格式:jpg,用于:普通活动详情">
|
144
|
144
|
{getFieldDecorator('imgUrl', {
|
145
|
|
- rules: [
|
146
|
|
- {
|
147
|
|
- required: true,
|
148
|
|
- message: '请选择活动详情主图',
|
149
|
|
- },
|
150
|
|
- ],
|
151
|
|
- })(<ImageUploader />)}
|
|
145
|
+ rules: [
|
|
146
|
+ {
|
|
147
|
+ required: true,
|
|
148
|
+ message: '请选择活动详情主图',
|
|
149
|
+ },
|
|
150
|
+ ],
|
|
151
|
+ })(<ImageUploader />)}
|
152
|
152
|
</Form.Item>
|
153
|
153
|
<Form.Item label="活动标题">
|
154
|
|
- {getFieldDecorator('title', {
|
155
|
|
- rules: [
|
156
|
|
- {
|
157
|
|
- required: true,
|
158
|
|
- message: '请输入活动标题',
|
159
|
|
- },
|
160
|
|
- ],
|
161
|
|
- })(<Input/>)}
|
|
154
|
+ {getFieldDecorator('title', {
|
|
155
|
+ rules: [
|
|
156
|
+ {
|
|
157
|
+ required: true,
|
|
158
|
+ message: '请输入活动标题',
|
|
159
|
+ },
|
|
160
|
+ ],
|
|
161
|
+ })(<Input />)}
|
162
|
162
|
</Form.Item>
|
163
|
163
|
<Form.Item label="活动时间">
|
164
|
|
- {getFieldDecorator('activityTime', {
|
165
|
|
- rules: [
|
166
|
|
- {
|
167
|
|
- required: true,
|
168
|
|
- message: '请选择活动时间',
|
169
|
|
- },
|
170
|
|
- ],
|
171
|
|
- })(<RangePicker format="YYYY-MM-DD HH:mm" disabled={activityStatus===0 ? true : false}/>)}
|
|
164
|
+ {getFieldDecorator('activityTime', {
|
|
165
|
+ rules: [
|
|
166
|
+ {
|
|
167
|
+ required: true,
|
|
168
|
+ message: '请选择活动时间',
|
|
169
|
+ },
|
|
170
|
+ ],
|
|
171
|
+ })(<RangePicker format="YYYY-MM-DD HH:mm" disabled={activityStatus === 0 ? true : false} />)}
|
172
|
172
|
</Form.Item>
|
173
|
173
|
<Form.Item label="活动地点">
|
174
|
|
- {getFieldDecorator('address', {
|
175
|
|
- rules: [
|
176
|
|
- {
|
177
|
|
- required: true,
|
178
|
|
- message: '请输入活动地点',
|
179
|
|
- },
|
180
|
|
- ],
|
181
|
|
- })(<Input disabled={activityStatus===0 ? true : false}/>)}
|
|
174
|
+ {getFieldDecorator('address', {
|
|
175
|
+ rules: [
|
|
176
|
+ {
|
|
177
|
+ required: true,
|
|
178
|
+ message: '请输入活动地点',
|
|
179
|
+ },
|
|
180
|
+ ],
|
|
181
|
+ })(<Input disabled={activityStatus === 0 ? true : false} />)}
|
182
|
182
|
</Form.Item>
|
183
|
|
- <Form.Item label="活动人数">
|
184
|
|
- {getFieldDecorator('personNum', {
|
185
|
|
- rules: [
|
186
|
|
- {
|
187
|
|
- required: true,
|
188
|
|
- message: '请输入活动人数',
|
189
|
|
- },
|
190
|
|
- ],
|
191
|
|
- })(<Input type="number" disabled={activityStatus===0 ? true : false}/>)}
|
|
183
|
+ <Form.Item label="活动人数" help="当前活动最多可报名人数">
|
|
184
|
+ {getFieldDecorator('personNum', {
|
|
185
|
+ rules: [
|
|
186
|
+ {
|
|
187
|
+ required: true,
|
|
188
|
+ message: '请输入活动人数',
|
|
189
|
+ },
|
|
190
|
+ ],
|
|
191
|
+ })(<Input type="number" disabled={activityStatus === 0 ? true : false} />)}
|
192
|
192
|
</Form.Item>
|
193
|
|
- <Form.Item label="最大报名人数">
|
194
|
|
- {getFieldDecorator('maxEnlistByPerson', {
|
195
|
|
- rules: [
|
196
|
|
- {
|
197
|
|
- required: true,
|
198
|
|
- message: '请输入最大报名人数',
|
199
|
|
- },
|
200
|
|
- ],
|
201
|
|
- })(<Input type="number" min={1} disabled={activityStatus===0 ? true : false}/>)}
|
|
193
|
+ <Form.Item label="用户携带人数" help="每个用户最多可携带参与活动的人数">
|
|
194
|
+ {getFieldDecorator('maxEnlistByPerson', {
|
|
195
|
+ rules: [
|
|
196
|
+ {
|
|
197
|
+ required: true,
|
|
198
|
+ message: '请输入用户携带人数',
|
|
199
|
+ },
|
|
200
|
+ ],
|
|
201
|
+ })(<Input type="number" min={1} disabled={activityStatus === 0 ? true : false} />)}
|
202
|
202
|
</Form.Item>
|
203
|
203
|
<Form.Item label="活动详情">
|
204
|
|
- {getFieldDecorator('desc')(<Wangedit />)}
|
|
204
|
+ {getFieldDecorator('desc')(<Wangedit />)}
|
205
|
205
|
</Form.Item>
|
206
|
206
|
<Form.Item label="报名时间">
|
207
|
207
|
{getFieldDecorator('signupTime', {
|
|
@@ -211,17 +211,17 @@ const BasicForm = props => {
|
211
|
211
|
message: '请选择报名时间',
|
212
|
212
|
},
|
213
|
213
|
],
|
214
|
|
- })(<RangePicker format="YYYY-MM-DD HH:mm" disabled={activityStatus===0 ? true : false}/>)}
|
215
|
|
- </Form.Item>
|
|
214
|
+ })(<RangePicker format="YYYY-MM-DD HH:mm" disabled={activityStatus === 0 ? true : false} />)}
|
|
215
|
+ </Form.Item>
|
216
|
216
|
<Form.Item label="权重">
|
217
|
|
- {getFieldDecorator('heavy', {
|
218
|
|
- rules: [
|
219
|
|
- {
|
220
|
|
- required: true,
|
221
|
|
- message: '请输入权重',
|
222
|
|
- },
|
223
|
|
- ],
|
224
|
|
- })(<Input type="number" style={{ width: 80}}/>)}<span style={{ marginLeft: 30, color:'grey'}}>数字越大越靠前</span>
|
|
217
|
+ {getFieldDecorator('heavy', {
|
|
218
|
+ rules: [
|
|
219
|
+ {
|
|
220
|
+ required: true,
|
|
221
|
+ message: '请输入权重',
|
|
222
|
+ },
|
|
223
|
+ ],
|
|
224
|
+ })(<Input type="number" style={{ width: 80 }} />)}<span style={{ marginLeft: 30, color: 'grey' }}>数字越大越靠前</span>
|
225
|
225
|
</Form.Item>
|
226
|
226
|
<Form.Item wrapperCol={{ span: 12, offset: 8 }}>
|
227
|
227
|
<Button type="primary" htmlType="submit">
|
|
@@ -272,7 +272,7 @@ const Edit = props => {
|
272
|
272
|
})
|
273
|
273
|
getMiniappName()
|
274
|
274
|
}, [])
|
275
|
|
- }else{
|
|
275
|
+ } else {
|
276
|
276
|
getMiniappName()
|
277
|
277
|
}
|
278
|
278
|
// 获取小程序名称
|
|
@@ -357,7 +357,7 @@ const Edit = props => {
|
357
|
357
|
<p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>活动海报图</p>
|
358
|
358
|
<ImageUploader value={imgValue} onChange={e => changeImg(e)} />
|
359
|
359
|
</div>
|
360
|
|
- <p style={{ fontSize: '0.5vw', color: '#A9A9A9', marginLeft: '230px', marginBottom: '30px'}}>建议图片尺寸:640*670px,比例64:67,格式:jpg,用于普通活动海报</p>
|
|
360
|
+ <p style={{ fontSize: '0.5vw', color: '#A9A9A9', marginLeft: '230px', marginBottom: '30px' }}>建议图片尺寸:640*670px,比例64:67,格式:jpg,用于普通活动海报</p>
|
361
|
361
|
<div style={{ display: 'flex', alignItems: 'center', width: '100%', marginBottom: '60px' }}>
|
362
|
362
|
<p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报标题</p>
|
363
|
363
|
<Input style={{ width: '20vw' }} value={inputValue} placeholder="请输入海报标题" onChange={e => changeInput(e.target.value)} />
|