|
@@ -28,40 +28,10 @@ const WebsiteChangeFrom = Form.create()(React.createClass({
|
|
|
});
|
|
|
}.bind(this));
|
|
|
},
|
|
|
- getDepartmentList() {
|
|
|
- this.setState({
|
|
|
- loading: true
|
|
|
- });
|
|
|
- $.ajax({
|
|
|
- method: "post",
|
|
|
- dataType: "json",
|
|
|
- crossDomain: false,
|
|
|
- url: globalConfig.context + "/api/user/getDepartment",
|
|
|
- data: {
|
|
|
- uid: this.props.data.uid,
|
|
|
- },
|
|
|
- success: function (data) {
|
|
|
- if (data.error.length || !data.data) {
|
|
|
- message.warning(data.error[0].message);
|
|
|
- return;
|
|
|
- };
|
|
|
- for (var item in data.data) {
|
|
|
- this.state.departmentOption.push(
|
|
|
- <Select.Option value={item} key={item}>{data.data[item]}</Select.Option>
|
|
|
- )
|
|
|
- };
|
|
|
- }.bind(this),
|
|
|
- }).always(function () {
|
|
|
- this.setState({
|
|
|
- loading: false
|
|
|
- });
|
|
|
- }.bind(this));
|
|
|
- },
|
|
|
getInitialState() {
|
|
|
return {
|
|
|
loading: false,
|
|
|
stateOption: [],
|
|
|
- departmentOption: [],
|
|
|
introduce: '',
|
|
|
projectCheck: 0,
|
|
|
subsidy: 0,
|
|
@@ -76,7 +46,6 @@ const WebsiteChangeFrom = Form.create()(React.createClass({
|
|
|
)
|
|
|
});
|
|
|
this.loadData();
|
|
|
- this.getDepartmentList();
|
|
|
},
|
|
|
handleSubmit(e) {
|
|
|
e.preventDefault();
|
|
@@ -160,7 +129,7 @@ const WebsiteChangeFrom = Form.create()(React.createClass({
|
|
|
{getFieldDecorator('department', {
|
|
|
initialValue: theData.department
|
|
|
})(
|
|
|
- <Select>{this.state.departmentOption}</Select>
|
|
|
+ <Input />
|
|
|
)}
|
|
|
</FormItem>
|
|
|
</div>
|