fix: 处理项目列表接口请求参数错误的bug

This commit is contained in:
wenbo.dong 2017-07-20 14:57:19 +08:00
parent c6a866975c
commit c2bb1e2a06
2 changed files with 4 additions and 3 deletions

View File

@ -53,13 +53,13 @@ const addProject = (data) => {
};
const updateProject = (data) => {
const { name, prd_host, basepath, desc, group_id } = data;
const { name, prd_host, basepath, desc, _id } = data;
const param = {
name,
prd_host,
basepath,
desc,
group_id
id: _id
};
return {
type: PROJECT_UPDATE,

View File

@ -78,12 +78,13 @@ class UpDateModal extends Component {
this.props.changeUpdateModal(false, -1);
}
// 确认修改
handleOk = (e) => {
e.preventDefault();
const { form, updateProject, changeUpdateModal, currGroup, projectList, handleUpdateIndex, fetchProjectList, changeTableLoading } = this.props;
form.validateFields((err, values) => {
if (!err) {
console.log(values);
console.log(projectList[handleUpdateIndex]);
let assignValue = Object.assign(projectList[handleUpdateIndex], values);
assignValue.prd_host = this.state.protocol + assignValue.prd_host;
assignValue.env = assignValue.envs.map((item) => {