未验证 提交 c1496d8a 编写于 作者: T Tandoy 提交者: GitHub

[Bug] [ui] fix cannot edit project (#6227)

* fix cannot edit project

* It has been fixed that when editing a project, if you do not modify the projectName, a project already exists error will be thrown.
上级 f4a2b6df
......@@ -296,7 +296,7 @@ public class ProjectServiceImpl extends BaseServiceImpl implements ProjectServic
return result;
}
Project tempProject = projectMapper.queryByName(projectName);
if (tempProject != null) {
if (tempProject != null && tempProject.getCode() != project.getCode()) {
putMsg(result, Status.PROJECT_ALREADY_EXISTS, projectName);
return result;
}
......
......@@ -92,7 +92,7 @@
// edit
if (this.item) {
param.projectId = this.item.id
param.projectCode = this.item.code
}
this.$refs.popover.spinnerLoading = true
......
......@@ -71,7 +71,7 @@ export default {
*/
updateProjects ({ state }, payload) {
return new Promise((resolve, reject) => {
io.put(`projects/${payload.projectId}`, payload, res => {
io.put(`projects/${payload.projectCode}`, payload, res => {
resolve(res)
}).catch(e => {
reject(e)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册