ccf 3 лет назад
Родитель
Сommit
914ac0a019
1 измененных файлов с 7 добавлено и 2 удалено
  1. 7 2
      components/company/solution_add.vue

+ 7 - 2
components/company/solution_add.vue

@@ -336,7 +336,11 @@
       },
       /** 点击添加生成案例 **/
       async addSuccessInfo() {
-        this.drawer=true;
+        let bool=await this.saveDraft();
+        if(bool)
+        {
+          this.drawer=true;
+        }
       },
       /** 删除案例 **/
       deleteCase(item) {
@@ -460,6 +464,7 @@
             data.industry = Number(data.industry);
             data.tech_type = Number(data.tech_type);
             this.data = data;
+            this.lastId=data.id;
           }
         });
       },
@@ -544,7 +549,7 @@
         let res = await this.$axios.post(url, p);
         if (Number(res.data.status) === 1) {
           if (!isPublish) {
-            this.getDraftInfo(isPreview);
+            await this.getDraftInfo(isPreview);
             this.$message.success("保存草稿成功");
           } else {
             this.$message.success("提交成功");