fix: 处理冲突文件

This commit is contained in:
wenbo.dong 2017-07-20 20:24:06 +08:00
parent 0a167b24d0
commit 0fcd2486d7
6 changed files with 22 additions and 35 deletions

View File

@ -1,4 +1,3 @@
import LoginRedux from './reducer/Login/Login_redux.js'
import login from './reducer/Login/login.js'
import group from './reducer/group/group.js'
import project from './reducer/group/project.js'
@ -10,7 +9,6 @@ import user from './reducer/user/user.js'
export default {
group,
login,
LoginRedux,
Interface,
user,
project,

View File

@ -63,7 +63,7 @@ class Login extends Component {
<FormItem>
<Button type="primary" htmlType="submit" className="login-form-button">登录</Button>
</FormItem>
<Button id="qsso-login" type="primary" className="login-form-button" onClick={() => QSSO.attach('qsso-login','/user/login_by_token')}>QSSO登录</Button>
<Button id="qsso-login" type="primary" className="login-form-button" onClick={() => window.QSSO.attach('qsso-login','/user/login_by_token')}>QSSO登录</Button>
</Form>
)

View File

@ -14,22 +14,28 @@ const Option = Select.Option;
import './ProjectList.scss'
// 确认删除项目
const deleteConfirm = (id, handleDelete, currGroupId, handleFetchList) => {
const test = () => {
handleDelete(id).then((res) => {
// 确认删除项目 handleDelete, currGroup._id, fetchProjectList
const deleteConfirm = (id, props) => {
const { delProject, currGroup, fetchProjectList } = props;
const handle = () => {
delProject(id).then((res) => {
console.log(res);
console.log(handleFetchList, currGroupId);
handleFetchList(currGroupId).then((res) => {
console.log(res);
});
console.log(fetchProjectList, currGroup._id);
if (res.payload.data.errcode == 0) {
message.success('删除成功!')
fetchProjectList(currGroup._id).then((res) => {
console.log(res);
});
} else {
message.error(res.payload.data.errmsg);
}
});
}
return test;
return handle;
};
const getColumns = (data, props) => {
const { handleDelete, currGroup, fetchProjectList, changeUpdateModal, userInfo } = props;
const { changeUpdateModal, userInfo } = props;
return [{
title: '项目名称',
dataIndex: 'name',
@ -44,7 +50,7 @@ const getColumns = (data, props) => {
render: (text, record, index) => {
// data是projectList的列表值
// 根据序号找到对应项的uid根据uid获取对应项目的创建人
return <span>{userInfo[data[index].uid].username}</span>;
return <span>{userInfo[data[index].uid] ? userInfo[data[index].uid].username : ''}</span>;
}
}, {
title: '创建时间',
@ -60,7 +66,7 @@ const getColumns = (data, props) => {
<span>
<a onClick={() => changeUpdateModal(true, index)}>修改</a>
<span className="ant-divider" />
<Popconfirm title="你确定要删除项目吗?" onConfirm={deleteConfirm(id, handleDelete, currGroup._id, fetchProjectList)} okText="删除" cancelText="取消">
<Popconfirm title="你确定要删除项目吗?" onConfirm={deleteConfirm(id, props)} okText="删除" cancelText="取消">
<a href="#">删除</a>
</Popconfirm>
</span>

View File

@ -174,8 +174,9 @@ class UpDateModal extends Component {
return item.host + ',' + item.name;
})
}
initFormValues.prd_host = projectList[handleUpdateIndex].prd_host.split('\/\/')[1];
initFormValues.prd_protocol = projectList[handleUpdateIndex].prd_host.split('\/\/')[0] + '\/\/';
initFormValues.prd_host = projectList[handleUpdateIndex].prd_host;
initFormValues.prd_protocol = projectList[handleUpdateIndex].protocol + '\/\/';
console.log(projectList);
}
getFieldDecorator('envs', { initialValue: envMessage });

View File

@ -1,9 +0,0 @@
export default function (state = 3, action) {
const count = state
switch (action.type) {
case 'increasec':
return count + 1
default:
return state
}
}

View File

@ -1,9 +0,0 @@
export default function (state = 3, action) {
const count = state
switch (action.type) {
case 'increasec':
return count + 1
default:
return state
}
}