|
@@ -362,12 +362,12 @@
|
|
|
|
|
|
<!-- 新增子项目弹出框 -->
|
|
<!-- 新增子项目弹出框 -->
|
|
<el-dialog title="新增/修改子项目" v-if="addSubProject" :visible.sync="addSubProject" :close-on-click-modal="false" customClass="customWidth" width="500px">
|
|
<el-dialog title="新增/修改子项目" v-if="addSubProject" :visible.sync="addSubProject" :close-on-click-modal="false" customClass="customWidth" width="500px">
|
|
- <el-form ref="form2" :model="addForm" :rules="rules" label-width="100px">
|
|
|
|
|
|
+ <el-form ref="form2" :model="temaddForm" :rules="rules" label-width="100px">
|
|
<el-form-item label="项目编号" prop="code">
|
|
<el-form-item label="项目编号" prop="code">
|
|
- <el-input v-model="addForm.code" placeholder="请输入项目编号" clearable></el-input>
|
|
|
|
|
|
+ <el-input v-model="temaddForm.code" placeholder="请输入项目编号" clearable></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="项目名称" prop="name">
|
|
<el-form-item label="项目名称" prop="name">
|
|
- <el-input v-model="addForm.name" placeholder="请输入项目名称" clearable></el-input>
|
|
|
|
|
|
+ <el-input v-model="temaddForm.name" placeholder="请输入项目名称" clearable></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -585,6 +585,7 @@ a {
|
|
id: '',
|
|
id: '',
|
|
code: ''
|
|
code: ''
|
|
},
|
|
},
|
|
|
|
+ temaddForm: {},
|
|
rules: {
|
|
rules: {
|
|
name: [{ required: true, message: "请输入名称", trigger: "blur" }]
|
|
name: [{ required: true, message: "请输入名称", trigger: "blur" }]
|
|
},
|
|
},
|
|
@@ -1337,11 +1338,10 @@ a {
|
|
this.getList();
|
|
this.getList();
|
|
},
|
|
},
|
|
addNewSubProject(subProject) {
|
|
addNewSubProject(subProject) {
|
|
- console.log("sub",subProject);
|
|
|
|
if (subProject == null) {
|
|
if (subProject == null) {
|
|
this.addForm = {projectId: this.currentProject.id, level:1}
|
|
this.addForm = {projectId: this.currentProject.id, level:1}
|
|
} else {
|
|
} else {
|
|
- this.addForm = subProject;
|
|
|
|
|
|
+ this.temaddForm = JSON.parse(JSON.stringify(subProject));
|
|
}
|
|
}
|
|
this.addSubProject = true;
|
|
this.addSubProject = true;
|
|
},
|
|
},
|
|
@@ -1355,7 +1355,6 @@ a {
|
|
res => {
|
|
res => {
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
this.subProjectList = res.data;
|
|
this.subProjectList = res.data;
|
|
- console.log("子项目 请求",res.data);
|
|
|
|
} else {
|
|
} else {
|
|
this.$message({
|
|
this.$message({
|
|
message: res.msg,
|
|
message: res.msg,
|
|
@@ -1635,7 +1634,7 @@ a {
|
|
submitInsertSubProject () {
|
|
submitInsertSubProject () {
|
|
this.$refs.form2.validate(valid => {
|
|
this.$refs.form2.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- this.http.post('/sub-project/saveOrUpdate',this.addForm,
|
|
|
|
|
|
+ this.http.post('/sub-project/saveOrUpdate',this.temaddForm,
|
|
res => {
|
|
res => {
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
this.$message({
|
|
this.$message({
|