Prechádzať zdrojové kódy

项目管理 项目列表 更新项目接口修改

DESKTOP-O04BTUJ\muzen 3 rokov pred
rodič
commit
98fa38c7cb
1 zmenil súbory, kde vykonal 19 pridanie a 2 odobranie
  1. 19 2
      src/views/project/list/detail.vue

+ 19 - 2
src/views/project/list/detail.vue

@@ -172,7 +172,7 @@ export default {
 
     // 新增 / 更新版本
     getChange() {
-      if (this.title === "新增") {
+      if (this.title !== '编辑') {
         updateAdd(this.addForm).then((res) => {
           if (res.code === 0) {
             this.$message.success("新增成功!");
@@ -189,6 +189,23 @@ export default {
           }
         });
       }
+      // if (this.title === "新增") {
+      //   updateAdd(this.addForm).then((res) => {
+      //     if (res.code === 0) {
+      //       this.$message.success("新增成功!");
+      //       this.dialogVisible = false;
+      //       this.getList();
+      //     }
+      //   });
+      // } else {
+      //   update(this.addForm).then((res) => {
+      //     if (res.code === 0) {
+      //       this.$message.success(`${this.title}成功!`);
+      //       this.dialogVisible = false;
+      //       this.getList();
+      //     }
+      //   });
+      // }
     },
 
     // 取消
@@ -241,7 +258,7 @@ export default {
   height: 23px;
   margin: 0;
 
-  p{
+  p {
     margin-top: 0;
   }
 }