瀏覽代碼

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) {