From 54e14bff397221b5b0d64720f77217f4d34ebf98 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期五, 14 七月 2023 09:50:53 +0800
Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs

---
 Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue |   64 ++++++++++++++-----------------
 1 files changed, 29 insertions(+), 35 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue b/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
index 236d931..87bf1ca 100644
--- a/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
+++ b/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
@@ -122,6 +122,7 @@
       simOid:"",
       btmName:"",
       btmOid:"",
+      btmId:"",
       masterInput:'',
       MasterSearchSelects:"",
       masterData:[],
@@ -237,7 +238,7 @@
           },
           {
             label:"缂栫爜瑙勫垯",
-            prop:"coderuleoidName",
+            prop:"codeRuleOidName",
             labelWidth:128,
             disabled: true,
           },
@@ -307,7 +308,7 @@
             },
             {
               label:"缂栫爜瑙勫垯",
-              prop:"coderuleoidName",
+              prop:"codeRuleOidName",
               labelWidth:128,
               focus:this.CodeFoucus,
               readonly: true,
@@ -333,36 +334,33 @@
     }
   },
   watch:{
-    nodeClickList:{
-      handler(newval,oldval){
-        console.log('newVal',newval,oldval)
-      },
-      deep:true,
-      immediate:true
-    },
-    TreeFlag:{
-      handler(newval,oldval){
-        console.log('鏍戠姸鎬�',newval,oldval)
-      },
-      deep:true,
-      immediate:true
-    }
   },
   created() {
   },
   methods: {
     submits(form,done){
-      TreeEditSave(this.loneTreeNewForm).then(res=>{
-        this.$message.success('淇敼鎴愬姛');
-        this.Editclose()
-        this.$emit('referTreeForm');
-        this.$emit('flushed');
-        done()
-      })
+      if(this.TreeFlag){
+        TreeEditSave(this.loneTreeNewForm).then(res=>{
+          this.$message.success('淇敼鎴愬姛');
+          this.Editclose()
+          this.$emit('referTreeForm');
+          this.$emit('flushed');
+          done()
+        })
+      }else {
+        this.loneTreeNewForm.btmTypeName='';
+        this.loneTreeNewForm.btmTypeId='';
+        TreeEditSave(this.loneTreeNewForm).then(res=>{
+          this.$message.success('淇敼鎴愬姛');
+          this.Editclose()
+          this.$emit('referTreeForm');
+          this.$emit('flushed');
+          done()
+        })
+      }
     },
     error(err) {
-      this.$message.success('璇锋煡鐪嬫帶鍒跺彴');
-      console.log(err)
+      this.$message.success(err);
     },
     //缂栫爜瑙勫垯鏌ヨ
     SelectFindeHandler(){
@@ -396,10 +394,9 @@
       }else {
         this.MasterdialogVisible=false;
         this.masterSelectList=[]
-        this.$set(this.loneTreeNewForm,'coderuleoidName',this.masterName)
-        this.$set(this.loneTreeNewForm,'coderuleoid',this.masterOid)
+        this.$set(this.loneTreeNewForm,'codeRuleOidName',this.masterName)
+        this.$set(this.loneTreeNewForm,'codeRuleOid',this.masterOid)
         this.$emit('MasterHandler',this.loneTreeNewForm)
-        // console.log(this.loneTreeNewForm)
       }
     },
     //缂栫爜澶氶��
@@ -407,7 +404,6 @@
       this.masterSelectList=row;
       this.masterName=row[0].name;
       this.masterOid=row[0].oid;
-      // console.log('oid',this.oid)
     },
     //缂栫爜鎺ュ彛
     MasterdefaultRend(masterParameter){
@@ -437,7 +433,6 @@
         this.$set(this.loneTreeNewForm,'codekeyattrrepeatoidName',this.KeyName)
         this.$set(this.loneTreeNewForm,'codekeyattrrepeatoid',this.KeyOid)
         this.$emit('MasterHandler',this.loneTreeNewForm)
-        console.log(this.loneTreeNewForm)
       }
     },
     //鍏抽敭灞炴�ф煡璇�
@@ -454,8 +449,8 @@
           'conditionMap[name]':this.SelectFInd
         }
         this.KeydefaultRend(masterParameter)
-        this.SelectValue=""
-        this.SelectFInd=""
+        this.SelectValue="";
+        this.SelectFInd="";
       }
     },
     //鍏抽敭灞炴�ф帴鍙�
@@ -516,7 +511,6 @@
       this.simSelectList=row;
       this.simName=row[0].name;
       this.simOid=row[0].oid;
-      console.log('oid',this.oid)
     },
     //鐩镐技椤归」鎺ュ彛
     simdefaultRend(){
@@ -543,7 +537,7 @@
         this.BtmdialogVisible=false;
         this.btmSelectList=[]
         this.$set(this.loneTreeNewForm,'btmTypeName',this.btmName ||this.btmOid)
-        this.$set(this.loneTreeNewForm,'btmTypeid',this.btmOid)
+        this.$set(this.loneTreeNewForm,'btmTypeId',this.btmId)
         this.$emit('MasterHandler',this.loneTreeNewForm)
       }
     },
@@ -570,11 +564,11 @@
       this.btmSelectList=row;
       this.btmName=row[0].name;
       this.btmOid=row[0].oid;
+      this.btmId=row[0].id;
     },
     //涓氬姟绫诲瀷鎺ュ彛
     btmdefaultRend(masterParameter){
       referDataGrid({valueField:'id',isMuti:'false',...masterParameter}).then(res=>{
-        // console.log(res)
         this.BtmData=res.data.data.records
       })
     }

--
Gitblit v1.9.3