|
@@ -171,7 +171,7 @@
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button @click.native="addSubProject = false">取消</el-button>
|
|
<el-button @click.native="addSubProject = false">取消</el-button>
|
|
- <el-button type="primary" @click="submitInsertSubProject" :loading="addLoading">提交</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="submitInsertSubProject" :loading="addLoading">提交456</el-button>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
@@ -1009,54 +1009,56 @@ import { error } from 'dingtalk-jsapi';
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- submitInsert() {
|
|
|
|
- this.$refs.form1.validate(valid => {
|
|
|
|
- if (valid) {
|
|
|
|
- this.addLoading = true;
|
|
|
|
- let formData = new FormData();
|
|
|
|
- formData.append("name", this.addForm.name);
|
|
|
|
- if(this.addForm.id != null) {
|
|
|
|
- formData.append("id", this.addForm.id);
|
|
|
|
- }
|
|
|
|
- if(this.addForm.userId.length != 0) {
|
|
|
|
- for(var j in this.addForm.userId) {
|
|
|
|
- formData.append("userId", this.addForm.userId[j]);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if(this.addForm.inchargerId != null) {
|
|
|
|
- formData.append("inchargerId", this.addForm.inchargerId);
|
|
|
|
- }
|
|
|
|
- if(this.addForm.code != null) {
|
|
|
|
- formData.append("code", this.addForm.code);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.http.uploadFile(this.port.project.add,formData,
|
|
|
|
- res => {
|
|
|
|
- this.addLoading = false;
|
|
|
|
- if (res.code == "ok") {
|
|
|
|
- this.$message({
|
|
|
|
- message: this.addForm.id!=null?'修改':'创建'+"成功",
|
|
|
|
- type: "success"
|
|
|
|
- });
|
|
|
|
- this.addFormVisible = false;
|
|
|
|
- this.getList();
|
|
|
|
- } else {
|
|
|
|
- this.$message({
|
|
|
|
- message: res.msg,
|
|
|
|
- type: "error"
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- error => {
|
|
|
|
- this.addLoading = false;
|
|
|
|
- this.$message({
|
|
|
|
- message: error,
|
|
|
|
- type: "error"
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
|
|
+ // submitInsert() {
|
|
|
|
+ // console.log("111");
|
|
|
|
+ // this.$refs.form1.validate(valid => {
|
|
|
|
+ // if (valid) {
|
|
|
|
+ // this.addLoading = true;
|
|
|
|
+ // let formData = new FormData();
|
|
|
|
+ // formData.append("name", this.addForm.name);
|
|
|
|
+ // if(this.addForm.id != null) {
|
|
|
|
+ // formData.append("id", this.addForm.id);
|
|
|
|
+ // }
|
|
|
|
+ // if(this.addForm.userId.length != 0) {
|
|
|
|
+ // for(var j in this.addForm.userId) {
|
|
|
|
+ // formData.append("userId", this.addForm.userId[j]);
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // if(this.addForm.inchargerId != null) {
|
|
|
|
+ // formData.append("inchargerId", this.addForm.inchargerId);
|
|
|
|
+ // }
|
|
|
|
+ // if(this.addForm.code != null) {
|
|
|
|
+ // formData.append("code", this.addForm.code);
|
|
|
|
+ // }
|
|
|
|
+ // formData.delete("refTaskList")
|
|
|
|
+ // console.log('走了')
|
|
|
|
+ // this.http.uploadFile(this.port.project.add,formData,
|
|
|
|
+ // res => {
|
|
|
|
+ // this.addLoading = false;
|
|
|
|
+ // if (res.code == "ok") {
|
|
|
|
+ // this.$message({
|
|
|
|
+ // message: this.addForm.id!=null?'修改':'创建'+"成功",
|
|
|
|
+ // type: "success"
|
|
|
|
+ // });
|
|
|
|
+ // this.addFormVisible = false;
|
|
|
|
+ // this.getList();
|
|
|
|
+ // } else {
|
|
|
|
+ // this.$message({
|
|
|
|
+ // message: res.msg,
|
|
|
|
+ // type: "error"
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+ // },
|
|
|
|
+ // error => {
|
|
|
|
+ // this.addLoading = false;
|
|
|
|
+ // this.$message({
|
|
|
|
+ // message: error,
|
|
|
|
+ // type: "error"
|
|
|
|
+ // });
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+ // });
|
|
|
|
+ // },
|
|
|
|
|
|
// 删除
|
|
// 删除
|
|
deletePro(i, item) {
|
|
deletePro(i, item) {
|
|
@@ -1509,6 +1511,7 @@ import { error } from 'dingtalk-jsapi';
|
|
if (valid) {
|
|
if (valid) {
|
|
delete this.addForm.subTaskList;
|
|
delete this.addForm.subTaskList;
|
|
delete this.addForm.progress;
|
|
delete this.addForm.progress;
|
|
|
|
+ delete this.addForm.refTaskList;
|
|
this.addForm.executorListStr = JSON.stringify(this.addForm.executorListFront);
|
|
this.addForm.executorListStr = JSON.stringify(this.addForm.executorListFront);
|
|
this.http.post('/task/save',this.addForm,
|
|
this.http.post('/task/save',this.addForm,
|
|
res => {
|
|
res => {
|