张延森 3 years ago
parent
commit
9daba40654
1 changed files with 12 additions and 3 deletions
  1. 12
    3
      src/pages/building/Edit/Basic/index.jsx

+ 12
- 3
src/pages/building/Edit/Basic/index.jsx View File

1
 import React, { useState } from 'react'
1
 import React, { useState } from 'react'
2
+import { connect } from 'dva';
2
 import { Button, Spin, DatePicker, Form, Input, InputNumber, Radio, notification, Select,Switch} from 'antd'
3
 import { Button, Spin, DatePicker, Form, Input, InputNumber, Radio, notification, Select,Switch} from 'antd'
3
 import FileUpload from '@/components/XForm/FileUpload'
4
 import FileUpload from '@/components/XForm/FileUpload'
4
 import ImageUpload from '@/components/XForm/ImageUpload'
5
 import ImageUpload from '@/components/XForm/ImageUpload'
23
 const Item = Form.Item
24
 const Item = Form.Item
24
 
25
 
25
 const BuildingBasic = React.forwardRef((props, ref) => {
26
 const BuildingBasic = React.forwardRef((props, ref) => {
26
-  const { form, history,setMarketingCode } = props;
27
+  const { form, history, setMarketingCode, user } = props;
27
   const { getFieldDecorator, getFieldValue, setFieldsValue } = form;
28
   const { getFieldDecorator, getFieldValue, setFieldsValue } = form;
28
   const { query } = history.location;
29
   const { query } = history.location;
29
   const { id } = query;
30
   const { id } = query;
130
         <Item label="城市公司">
131
         <Item label="城市公司">
131
           {getFieldDecorator('institutionId')(
132
           {getFieldDecorator('institutionId')(
132
             <Select placeholder="所属城市公司" style={fullWidth}>
133
             <Select placeholder="所属城市公司" style={fullWidth}>
133
-
134
+              {
135
+                (user.institutionList || []).map((item) => (
136
+                  <Select.Option key={item.institutionId} value={item.institutionId}>
137
+                    {item.institutionName}
138
+                  </Select.Option>
139
+                ))
140
+              }
134
             </Select>
141
             </Select>
135
           )}
142
           )}
136
         </Item>
143
         </Item>
454
   )
461
   )
455
 })
462
 })
456
 
463
 
457
-export default Form.create()(BuildingBasic)
464
+export default connect(({ user }) => ({
465
+  user: user.currentUser,
466
+}))(Form.create()(BuildingBasic))