Преглед на файлове

Merge branch '社区机构介绍新增问题' of sckj/mz-cloud into master

Shawn преди 1 година
родител
ревизия
ae7d6252dc
променени са 1 файла, в които са добавени 15 реда и са изтрити 5 реда
  1. 15 5
      ruoyi-ui/src/views/organization/jggl/sqJcxx/index.vue

+ 15 - 5
ruoyi-ui/src/views/organization/jggl/sqJcxx/index.vue

@@ -1648,6 +1648,7 @@ export default {
           id:null,
           jgid:null,
           jgjs:null,
+          zt:null,
         }
         this.form = {
           id: null,
@@ -1820,8 +1821,11 @@ export default {
         this.reset()
         this.loading = true
         getJgjs(id).then(response => {
-          if(response.data!=null){
-            this.form2=response.data
+          if(response.data!=null) {
+            this.form2 = response.data;
+            this.form2.zt="1";
+          }else{
+            this.form2.zt="0";
           }
         })
         let getData=getSqJcxx;
@@ -1905,11 +1909,17 @@ export default {
               szxzqh: szxzqh
             }
 
-            if(this.form2.id!=null){
-              updateJgjs(this.form2)
+            if(this.form2.zt!="0"){
+              delJgjs(this.form2.jgid).then(response =>{
+                this.form2.jgid=this.form.id;
+                addJgjs(this.form2);
+                this.form2.zt="1";
+              });
+              // updateJgjs(this.form2);
             }else{
               this.form2.jgid=this.form.id;
-              addJgjs(this.form2)
+              addJgjs(this.form2);
+              this.form2.zt="1";
             }
 
             if (this.form.id != null) {