Selaa lähdekoodia

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/estateagents-admin-manager into dev

weiximei 5 vuotta sitten
vanhempi
commit
bc3aaf0cd3

+ 57
- 105
src/components/Cards/PosterCard.jsx Näytä tiedosto

@@ -1,7 +1,8 @@
1 1
 import React, { useState, useEffect } from 'react';
2
-import { Card, Checkbox, Button } from 'antd';
2
+import { Card, Checkbox, Button,Upload } from 'antd';
3 3
 import apis from '../../services/apis';
4 4
 import request from '../../utils/request'
5
+import { uploaderProps } from '../../utils/upload';
5 6
 
6 7
 const { Meta } = Card;
7 8
 
@@ -13,13 +14,39 @@ const { Meta } = Card;
13 14
  */
14 15
 const PosterCard = (props) => {
15 16
   const [ data, setData ] = useState([])
17
+  const [indexOneUrl, setIndexOneUrl] = useState('')
18
+  const [indexTwoUrl, setIndexTwoUrl] = useState('')
19
+  const [indexThreeUrl, setIndexThreeUrl] = useState('')
20
+  let resultData = []
16 21
 
17 22
   useEffect(() => {  
18 23
   },[])
19 24
 
20
- 
25
+  const handleUploadIndexOneSucess = url => {
26
+    console.log(url,"第一张图上传回调");
27
+    setIndexOneUrl(url)
28
+    resultData[0] = url
29
+    resultData[1] = indexTwoUrl
30
+    resultData[2] = indexThreeUrl
31
+    props.onChange(resultData)
32
+  }
33
+
34
+  const handleUploadIndexTwoSucess = url => {
35
+    console.log(url,"第二张图上传回调");
36
+    setIndexTwoUrl(url)
37
+    resultData[0] = indexOneUrl
38
+    resultData[1] = url
39
+    resultData[2] = indexThreeUrl
40
+    props.onChange(resultData)
41
+  }
21 42
 
22
-  const onChange = (template) => (e) => {
43
+  const handleUploadIndexThreeSucess = url => {
44
+    console.log(url,"第三张图上传回调");
45
+    setIndexThreeUrl(url)
46
+    resultData[0] = indexOneUrl
47
+    resultData[1] = indexTwoUrl
48
+    resultData[2] = url
49
+    props.onChange(resultData)
23 50
   }
24 51
 
25 52
   return (
@@ -28,40 +55,8 @@ const PosterCard = (props) => {
28 55
     <div style={{ display: 'flex' }}>
29 56
       <div style={{ width: '420px', height: '900px', display: 'inline-block', marginTop: '30px' }}>
30 57
         <div style={{ width: '375px', height: '700px', backgroundColor: '#fff', boxShadow: '0px 0px 16px 6px rgba(0,0,0,0.15)', position: 'relative', margin: '0 auto' }}>
31
-          <img style={{ width: '100%', height: '300px' }} alt="" />
32
-          <div style={{ display: 'flex', alignItems: 'center', marginTop: '-24px' }}>
33
-            <img style={{ width: '70px', height: '70px', border: '4px solid #fff', borderRadius: '35px', marginLeft: '16px' }} alt="" />
34
-            <span style={{ color: '#222', fontWeight: '600', margin: '24px 10px 0 14px', fontSize: '17px' }}>喵喵</span>
35
-            <span style={{ color: '#999', marginTop: '25px', fontSize: '17px' }}>邀您参与</span>
36
-            <span style={{ color: '#999', margin: '25px 0 0 60px', fontSize: '17px' }}>2019.09.21</span>
37
-          </div>
38
-          <p style={{
39
-            margin: '10px 20px',
40
-            fontSize: '20px',
41
-            color: '#222',
42
-            fontWeight: '600',
43
-            display: '-webkit-box',
44
-            lineClamp: '3',
45
-            height: '60px',
46
-            WebkitLineClamp: '2',
47
-            WebkitBoxOrient: 'vertical',
48
-            overflow: 'hidden',
49
-            textOverflow: 'ellipsis'
50
-          }}>海报标题</p>
51
-
52
-          <img style={{ width: '30px', marginLeft: '20px' }} alt="" />
53
-          <p style={{
54
-            margin: '16px 20px 28px 20px',
55
-            fontSize: '17px',
56
-            color: '#999',
57
-            display: '-webkit-box',
58
-            lineClamp: '3',
59
-            height: '72px',
60
-            WebkitLineClamp: '3',
61
-            WebkitBoxOrient: 'vertical',
62
-            overflow: 'hidden',
63
-            textOverflow: 'ellipsis'
64
-          }}>海报描述</p>
58
+          <img style={{ width: '100%', height: '300px' }} src={indexOneUrl} alt="" />
59
+           
65 60
           <div style={{ backgroundColor: '#f1f1f1', padding: '22px 30px', boxShadow: '0px 6px 12px -4px #dcdcdc', position: 'relative' }}>
66 61
             <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>长按识别小程序码</p>
67 62
             <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>进入<span style={{ margin: '0 5px', fontSize: '18px', color: '#333', fontWeight: '600' }}>置业V顾问</span>报名活动</p>
@@ -69,46 +64,21 @@ const PosterCard = (props) => {
69 64
           </div>
70 65
         </div>
71 66
         <p style={{ textAlign: 'center', fontSize: '19px', color: '#666', marginTop: '30px' }}>生成海报分享给朋友</p>
67
+        <Upload showUploadList={false}
68
+        {...uploaderProps}
69
+        onSuccess={handleUploadIndexOneSucess}>
70
+          <Button>
71
+            上传图片
72
+          </Button>
73
+        </Upload>
72 74
       </div>
73 75
     </div>
74 76
 
75 77
     <div style={{ display: 'flex' }}>
76 78
       <div style={{ width: '420px', height: '900px', display: 'inline-block', marginTop: '30px' }}>
77 79
         <div style={{ width: '375px', height: '700px', backgroundColor: '#fff', boxShadow: '0px 0px 16px 6px rgba(0,0,0,0.15)', position: 'relative', margin: '0 auto' }}>
78
-          <img style={{ width: '100%', height: '300px' }} alt="" />
79
-          <div style={{ display: 'flex', alignItems: 'center', marginTop: '-24px' }}>
80
-            <img style={{ width: '70px', height: '70px', border: '4px solid #fff', borderRadius: '35px', marginLeft: '16px' }} alt="" />
81
-            <span style={{ color: '#222', fontWeight: '600', margin: '24px 10px 0 14px', fontSize: '17px' }}>喵喵</span>
82
-            <span style={{ color: '#999', marginTop: '25px', fontSize: '17px' }}>邀您参与</span>
83
-            <span style={{ color: '#999', margin: '25px 0 0 60px', fontSize: '17px' }}>2019.09.21</span>
84
-          </div>
85
-          <p style={{
86
-            margin: '10px 20px',
87
-            fontSize: '20px',
88
-            color: '#222',
89
-            fontWeight: '600',
90
-            display: '-webkit-box',
91
-            lineClamp: '3',
92
-            height: '60px',
93
-            WebkitLineClamp: '2',
94
-            WebkitBoxOrient: 'vertical',
95
-            overflow: 'hidden',
96
-            textOverflow: 'ellipsis'
97
-          }}>海报标题</p>
98
-
99
-          <img style={{ width: '30px', marginLeft: '20px' }} alt="" />
100
-          <p style={{
101
-            margin: '16px 20px 28px 20px',
102
-            fontSize: '17px',
103
-            color: '#999',
104
-            display: '-webkit-box',
105
-            lineClamp: '3',
106
-            height: '72px',
107
-            WebkitLineClamp: '3',
108
-            WebkitBoxOrient: 'vertical',
109
-            overflow: 'hidden',
110
-            textOverflow: 'ellipsis'
111
-          }}>海报描述</p>
80
+          <img style={{ width: '100%', height: '300px' }} src={indexTwoUrl} alt="" />
81
+           
112 82
           <div style={{ backgroundColor: '#f1f1f1', padding: '22px 30px', boxShadow: '0px 6px 12px -4px #dcdcdc', position: 'relative' }}>
113 83
             <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>长按识别小程序码</p>
114 84
             <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>进入<span style={{ margin: '0 5px', fontSize: '18px', color: '#333', fontWeight: '600' }}>置业V顾问</span>报名活动</p>
@@ -116,46 +86,21 @@ const PosterCard = (props) => {
116 86
           </div>
117 87
         </div>
118 88
         <p style={{ textAlign: 'center', fontSize: '19px', color: '#666', marginTop: '30px' }}>生成海报分享给朋友</p>
89
+        <Upload showUploadList={false}
90
+        {...uploaderProps}
91
+        onSuccess={handleUploadIndexTwoSucess}>
92
+          <Button>
93
+            上传图片
94
+          </Button>
95
+        </Upload>
119 96
       </div>
120 97
     </div>
121 98
     
122 99
     <div style={{ display: 'flex' }}>
123 100
       <div style={{ width: '420px', height: '900px', display: 'inline-block', marginTop: '30px' }}>
124 101
         <div style={{ width: '375px', height: '700px', backgroundColor: '#fff', boxShadow: '0px 0px 16px 6px rgba(0,0,0,0.15)', position: 'relative', margin: '0 auto' }}>
125
-          <img style={{ width: '100%', height: '300px' }} alt="" />
126
-          <div style={{ display: 'flex', alignItems: 'center', marginTop: '-24px' }}>
127
-            <img style={{ width: '70px', height: '70px', border: '4px solid #fff', borderRadius: '35px', marginLeft: '16px' }} alt="" />
128
-            <span style={{ color: '#222', fontWeight: '600', margin: '24px 10px 0 14px', fontSize: '17px' }}>喵喵</span>
129
-            <span style={{ color: '#999', marginTop: '25px', fontSize: '17px' }}>邀您参与</span>
130
-            <span style={{ color: '#999', margin: '25px 0 0 60px', fontSize: '17px' }}>2019.09.21</span>
131
-          </div>
132
-          <p style={{
133
-            margin: '10px 20px',
134
-            fontSize: '20px',
135
-            color: '#222',
136
-            fontWeight: '600',
137
-            display: '-webkit-box',
138
-            lineClamp: '3',
139
-            height: '60px',
140
-            WebkitLineClamp: '2',
141
-            WebkitBoxOrient: 'vertical',
142
-            overflow: 'hidden',
143
-            textOverflow: 'ellipsis'
144
-          }}>海报标题</p>
145
-
146
-          <img style={{ width: '30px', marginLeft: '20px' }} alt="" />
147
-          <p style={{
148
-            margin: '16px 20px 28px 20px',
149
-            fontSize: '17px',
150
-            color: '#999',
151
-            display: '-webkit-box',
152
-            lineClamp: '3',
153
-            height: '72px',
154
-            WebkitLineClamp: '3',
155
-            WebkitBoxOrient: 'vertical',
156
-            overflow: 'hidden',
157
-            textOverflow: 'ellipsis'
158
-          }}>海报描述</p>
102
+          <img style={{ width: '100%', height: '300px' }} src={indexThreeUrl} alt="" />
103
+           
159 104
           <div style={{ backgroundColor: '#f1f1f1', padding: '22px 30px', boxShadow: '0px 6px 12px -4px #dcdcdc', position: 'relative' }}>
160 105
             <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>长按识别小程序码</p>
161 106
             <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>进入<span style={{ margin: '0 5px', fontSize: '18px', color: '#333', fontWeight: '600' }}>置业V顾问</span>报名活动</p>
@@ -163,6 +108,13 @@ const PosterCard = (props) => {
163 108
           </div>
164 109
         </div>
165 110
         <p style={{ textAlign: 'center', fontSize: '19px', color: '#666', marginTop: '30px' }}>生成海报分享给朋友</p>
111
+        <Upload showUploadList={false}
112
+        {...uploaderProps}
113
+        onSuccess={handleUploadIndexThreeSucess}>
114
+          <Button>
115
+            上传图片
116
+          </Button>
117
+        </Upload>
166 118
       </div>
167 119
     </div>
168 120
   </div>

+ 5
- 64
src/pages/activity/editActivity.jsx Näytä tiedosto

@@ -306,71 +306,12 @@ const Edit = props => {
306 306
       }
307 307
     }
308 308
 
309
-    return <div>
310
-      <PosterCard/>
311
-      <div style={{ display: 'flex' }}>
312
-        <div style={{ width: '420px', height: '900px', display: 'inline-block', marginTop: '30px' }}>
313
-          <div style={{ width: '375px', height: '700px', backgroundColor: '#fff', boxShadow: '0px 0px 16px 6px rgba(0,0,0,0.15)', position: 'relative', margin: '0 auto' }}>
314
-            <img style={{ width: '100%', height: '300px' }} src={imgValue ? imgValue : poster1} alt="" />
315
-            <div style={{ display: 'flex', alignItems: 'center', marginTop: '-24px' }}>
316
-              <img style={{ width: '70px', height: '70px', border: '4px solid #fff', borderRadius: '35px', marginLeft: '16px' }} src={touxiang} alt="" />
317
-              <span style={{ color: '#222', fontWeight: '600', margin: '24px 10px 0 14px', fontSize: '17px' }}>喵喵</span>
318
-              <span style={{ color: '#999', marginTop: '25px', fontSize: '17px' }}>邀您参与</span>
319
-              <span style={{ color: '#999', margin: '25px 0 0 60px', fontSize: '17px' }}>2019.09.21</span>
320
-            </div>
321
-            <p style={{
322
-              margin: '10px 20px',
323
-              fontSize: '20px',
324
-              color: '#222',
325
-              fontWeight: '600',
326
-              display: '-webkit-box',
327
-              lineClamp: '3',
328
-              height: '60px',
329
-              WebkitLineClamp: '2',
330
-              WebkitBoxOrient: 'vertical',
331
-              overflow: 'hidden',
332
-              textOverflow: 'ellipsis'
333
-            }}>{inputValue ? inputValue : '海报标题'}</p>
334
-
335
-            <img src={yinhao} style={{ width: '30px', marginLeft: '20px' }} alt="" />
336
-            <p style={{
337
-              margin: '16px 20px 28px 20px',
338
-              fontSize: '17px',
339
-              color: '#999',
340
-              display: '-webkit-box',
341
-              lineClamp: '3',
342
-              height: '72px',
343
-              WebkitLineClamp: '3',
344
-              WebkitBoxOrient: 'vertical',
345
-              overflow: 'hidden',
346
-              textOverflow: 'ellipsis'
347
-            }}>{textAreaValue ? textAreaValue : '海报描述'}</p>
348
-            <div style={{ backgroundColor: '#f1f1f1', padding: '22px 30px', boxShadow: '0px 6px 12px -4px #dcdcdc', position: 'relative' }}>
349
-              <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>长按识别小程序码</p>
350
-              <p style={{ margin: '0', fontSize: '18px', color: '#888' }}>进入<span style={{ margin: '0 5px', fontSize: '18px', color: '#333', fontWeight: '600' }}>{miniappName || '置业V顾问'}</span>报名活动</p>
351
-              <img style={{ width: '80px', position: 'absolute', right: '30px', top: '10px' }} src={xiaochengxu} alt="" />
352
-            </div>
353
-          </div>
354
-          <p style={{ textAlign: 'center', fontSize: '19px', color: '#666', marginTop: '30px' }}>海报模板</p>
355
-        </div>
356
-
357
-        <div >
358
-          <div style={{ display: 'flex', width: '100%', margin: '60px 0' }}>
359
-            <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>活动海报图</p>
360
-            <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
361
-          </div>
362
-          <p style={{ fontSize: '0.5vw', color: '#A9A9A9', marginLeft: '230px', marginBottom: '30px'}}>建议图片尺寸:640*670px,比例64:67,格式:jpg,用于普通活动海报</p>
363
-          <div style={{ display: 'flex', alignItems: 'center', width: '100%', marginBottom: '60px' }}>
364
-            <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报标题</p>
365
-            <Input style={{ width: '20vw' }} value={inputValue} placeholder="请输入海报标题" onChange={e => changeInput(e.target.value)} />
366
-          </div>
367
-          <div style={{ display: 'flex', margin: '10px 0 40px 0', width: '100%' }}>
368
-            <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报描述</p>
369
-            <TextArea rows={5} value={textAreaValue} onChange={e => changeTextArea(e.target.value)} />
370
-          </div>
309
+    const changePoster = e => {
310
+      console.log(e,"返回出来的数据")
311
+    }
371 312
 
372
-        </div>
373
-      </div>
313
+    return <div>
314
+      <PosterCard onChange={changePoster}/>
374 315
       <Button type="primary" onClick={submitPoster} style={{ margin: '40px 40px 40px 30vw' }}> 确定</Button>
375 316
       <Button onClick={() => cancelPage()}>
376 317
         取消

+ 50
- 23
src/pages/building/list/add/components/base.jsx Näytä tiedosto

@@ -125,7 +125,7 @@ function AddBuilding(props) {
125 125
   }
126 126
 
127 127
   /**
128
-   * 把 xxx,xxx,xxx  这样的格式转换成 [{ tagName: xxx, delete: true }, { tagName: xxx, delete: true }]
128
+   * 把 xxx,xxx,xxx  这样的格式转换成 [{ tagName: xxx, delete: true, automatic: false }, { tagName: xxx, delete: true, automatic: false }]
129 129
    * @param {*} str
130 130
    * @return 如果返回 str 为空 或者 非 string,则返回 str 本身,否则返回转换成功的数组
131 131
    */
@@ -139,11 +139,11 @@ function AddBuilding(props) {
139 139
   }
140 140
 
141 141
   /**
142
-   * 把 [xxx,xxx,xxx]  这样的格式转换成 [{ tagName: xxx, delete: true }, { tagName: xxx, delete: true }]
142
+   * 把 [xxx,xxx,xxx]  这样的格式转换成 [{ tagName: xxx, delete: true, automatic: false }, { tagName: xxx, delete: true, automatic: false }]
143 143
    * @param {*} arr
144 144
    */
145 145
   function arrayTransition(arr) {
146
-    return arr.map(x => ({ tagName: x, delete: true }))
146
+    return arr.map(x => ({ tagName: x, delete: true, automatic: false }))
147 147
   }
148 148
 
149 149
   function handleSubmit(e) {
@@ -181,22 +181,22 @@ function AddBuilding(props) {
181 181
     }
182 182
 
183 183
     if (data.buildingTransport) {
184
-      data.buildingTransport = data.buildingTransport.filter(f => f.delete === true).map(x => x.tagName).join(',')
184
+      data.buildingTransport = tagFilter(data.buildingTransport, 'Transport')
185 185
     }
186 186
     if (data.buildingMall) {
187
-      data.buildingMall = data.buildingMall.filter(f => f.delete === true).map(x => x.tagName).join(',')
187
+      data.buildingMall = tagFilter(data.buildingMall, 'Mall')
188 188
     }
189 189
     if (data.buildingEdu) {
190
-      data.buildingEdu = data.buildingEdu.filter(f => f.delete === true).map(x => x.tagName).join(',')
190
+      data.buildingEdu = tagFilter(data.buildingEdu, 'Edu')
191 191
     }
192 192
     if (data.buildingHospital) {
193
-      data.buildingHospital = data.buildingHospital.filter(f => f.delete === true).map(x => x.tagName).join(',')
193
+      data.buildingHospital = tagFilter(data.buildingHospital, 'Hospital')
194 194
     }
195 195
     if (data.buildingBank) {
196
-      data.buildingBank = data.buildingBank.filter(f => f.delete === true).map(x => x.tagName).join(',')
196
+      data.buildingBank = tagFilter(data.buildingBank, 'Bank')
197 197
     }
198 198
     if (data.buildingRestaurant) {
199
-      data.buildingRestaurant = data.buildingRestaurant.filter(f => f.delete === true).map(x => x.tagName).join(',')
199
+      data.buildingRestaurant = tagFilter(data.buildingRestaurant, 'Restaurant')
200 200
     }
201 201
 
202 202
     const api = data.buildingId === undefined ? apis.building.addBuilding : apis.building.updateBuilding
@@ -209,6 +209,33 @@ function AddBuilding(props) {
209 209
     })
210 210
   }
211 211
 
212
+  /**
213
+   * 过滤 tag
214
+   * @param {*} tags 
215
+   */
216
+  function tagFilter(tags, keyType) {
217
+    console.log(tags)
218
+    if (!tags) {
219
+      return null
220
+    }
221
+
222
+    // 过滤 tag 更新 useState()
223
+
224
+    // 获取地图周边
225
+    const automaticTag = tags.filter(f => f.automatic === true).map(x => x.tagName)
226
+    const determineTag = poi.map(p => {
227
+      if (p.key === keyType) {
228
+        if (typeof p.data === 'string') {
229
+          p.data = JSON.parse(p.data).filter(f => automaticTag.includes(f.name))
230
+        }
231
+      }
232
+      return p
233
+    })
234
+
235
+    setPoi(determineTag)
236
+    return tags.filter(f => f.automatic === false).map(x => x.tagName).join(',')
237
+  }
238
+
212 239
   // 视频文件上传前 回调
213 240
   function fileUploadBeforeUpload(file, fileList) {
214 241
     // console.log('视频文件上传前 回调: ', file, fileList)
@@ -274,7 +301,7 @@ function AddBuilding(props) {
274 301
   }
275 302
 
276 303
   function setFormMapScopeTagValue(keyType, item) {
277
-    const tag = item.data.map(t => ({ tagName: t.name, delete: false }))
304
+    const tag = item.data.map(t => ({ tagName: t.name, delete: true, automatic: true }))
278 305
     switch (keyType) {
279 306
       case POI_TYPES_KETY.Transport:
280 307
         const buildingTransportValue = (stringHandleTag(buildingData.buildingTransport) || [])
@@ -345,8 +372,8 @@ function AddBuilding(props) {
345 372
               ],
346 373
             })(<Input />)}
347 374
           </Form.Item>
348
-          <Form.Item label="项目动态" >
349
-            {getFieldDecorator('dynamic')(<Input />)}
375
+          <Form.Item label="项目说明" >
376
+            {getFieldDecorator('dynamic')(<Input placeholder="项目动态等,不超过15个字" maxLength = "15"/>)}
350 377
           </Form.Item>
351 378
           <Form.Item label="物业类型" >
352 379
             {getFieldDecorator('propertyType')(
@@ -377,7 +404,7 @@ function AddBuilding(props) {
377 404
               </Select>,
378 405
             )}
379 406
           </Form.Item>
380
-          <Form.Item label="项目视频" help="视频仅支持mp4格式,建议图片尺寸:750*600,比例5:4,用于楼盘详情">
407
+          <Form.Item label="项目视频" help="视频仅支持mp4格式,建议尺寸:750*600,比例5:4,用于楼盘详情">
381 408
             {getFieldDecorator('videoUrl')(
382 409
               // disabled={fileUploadDisabled}
383 410
               <FileUpload accept=".mp4" beforeUpload={fileUploadBeforeUpload} label="上传视频" size={1} />,
@@ -417,9 +444,9 @@ function AddBuilding(props) {
417 444
           <Form.Item label="排序" >
418 445
             {getFieldDecorator('orderNo')(<Input />)}
419 446
           </Form.Item>
420
-          <Form.Item label="优惠信息" >
447
+          {/* <Form.Item label="优惠信息" >
421 448
             {getFieldDecorator('discount')(<Input />)}
422
-          </Form.Item>
449
+          </Form.Item> */}
423 450
           <Form.Item label="首页推荐" >
424 451
             {getFieldDecorator('isMain', {
425 452
               initialValue: 1,
@@ -437,11 +464,11 @@ function AddBuilding(props) {
437 464
               <SelectCity />,
438 465
             )}
439 466
           </Form.Item>
440
-          <Form.Item label="楼盘区域" >
467
+          {/* <Form.Item label="楼盘区域" >
441 468
             {getFieldDecorator('buildingArea', {
442 469
               rules: [{ required: true, message: '请输入楼盘区域' }],
443 470
             })(<Input />)}
444
-          </Form.Item>
471
+          </Form.Item> */}
445 472
           <Form.Item label="项目地址" >
446 473
             {getFieldDecorator('address', {
447 474
               rules: [{ required: true, message: '请输入项目地址' }],
@@ -518,13 +545,13 @@ function AddBuilding(props) {
518 545
           <Form.Item label="装修标准" >
519 546
             {getFieldDecorator('decoration')(<Input />)}
520 547
           </Form.Item>
521
-          <Form.Item label="交房时间" >
548
+          {/* <Form.Item label="交房时间" >
522 549
             {getFieldDecorator('receivedDate')(<DatePicker />)}
523
-          </Form.Item>
524
-          <Form.Item label="产权年限" >
550
+          </Form.Item> */}
551
+          {/* <Form.Item label="产权年限" >
525 552
             {getFieldDecorator('rightsYear')(<InputNumber />)}
526
-          </Form.Item>
527
-          <Form.Item label="预售许可证" >
553
+          </Form.Item> */}
554
+          {/* <Form.Item label="预售许可证" >
528 555
             {getFieldDecorator('preSalePermit')(
529 556
               <ImageUpload />,
530 557
             )}
@@ -533,7 +560,7 @@ function AddBuilding(props) {
533 560
             {getFieldDecorator('remark')(
534 561
               <Wangedit />,
535 562
             )}
536
-          </Form.Item>
563
+          </Form.Item> */}
537 564
           <Form.Item style={{ width: '400px', margin: 'auto', display: 'flex', justifyContent: 'space-between' }}>
538 565
             <Button type="primary" htmlType="submit">
539 566
                 确定

+ 2
- 1
src/pages/building/list/add/components/modalImage.jsx Näytä tiedosto

@@ -206,7 +206,8 @@ class ModalImage extends React.Component {
206 206
               </Form.Item>
207 207
               <Form.Item label="套内面积" help="单位 ㎡">
208 208
                 {getFieldDecorator('insideArea', {
209
-                  rules: [{ required: true, message: '请填写套内面积' },
209
+                  rules: [
210
+                    // { required: true, message: '请填写套内面积' },
210 211
                           {
211 212
                             pattern: new RegExp('^[0-9]*$'),
212 213
                             message: '只允许输入数字',

+ 6
- 2
src/pages/building/list/add/components/tags.jsx Näytä tiedosto

@@ -1,6 +1,11 @@
1 1
 import React from 'react'
2 2
 import { Tag, Input, Tooltip, Icon } from 'antd';
3 3
 
4
+/**
5
+ * 数据格式:[{ tagName: inputValue, delete: true, automatic: false }]
6
+ * @param delete 是否删除
7
+ * @param automatic 是否自动数据(比如获取地图数据就是自动的true,手动输入的是手动false)
8
+ */
4 9
 class EditableTagGroup extends React.Component {
5 10
   state = {
6 11
     inputVisible: false,
@@ -46,8 +51,7 @@ class EditableTagGroup extends React.Component {
46 51
     const tagList = tags.map(x => x.tagName)
47 52
     if (inputValue && tagList.indexOf(inputValue) === -1) {
48 53
       // 如果有新的值,就把这个值追加到 tags 原本值的后面,在通过onChange事件传递出去
49
-      console.log(tags.concat([{ tagName: inputValue, delete: true }]))
50
-      this.toggleOnChange(tags.concat([{ tagName: inputValue, delete: true }]))
54
+      this.toggleOnChange(tags.concat([{ tagName: inputValue, delete: true, automatic: false }]))
51 55
     }
52 56
 
53 57
     this.setState({

+ 10
- 10
src/pages/staff/list/editStaff.jsx Näytä tiedosto

@@ -187,16 +187,16 @@ const Edit = (props) => {
187 187
     //   </Select>,
188 188
     //   value: userData.taTags,
189 189
     // },
190
-    {
191
-      label: '地址',
192
-      name: 'address',
193
-      type: FieldTypes.Text,
194
-      placeholder: '请输入地址',
195
-      value: userData.address,
196
-      rules: [
197
-        { required: true, message: '请输入地址' },
198
-      ]
199
-    },
190
+    // {
191
+    //   label: '地址',
192
+    //   name: 'address',
193
+    //   type: FieldTypes.Text,
194
+    //   placeholder: '请输入地址',
195
+    //   value: userData.address,
196
+    //   rules: [
197
+    //     { required: true, message: '请输入地址' },
198
+    //   ]
199
+    // },
200 200
     {
201 201
       label: '授权项目',
202 202
       name: 'buildingId',