lihang
2023-07-13 7ce592bb5a5b9e0dc78786e727f042b95ebc81c8
Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
@@ -122,6 +122,7 @@
      simOid:"",
      btmName:"",
      btmOid:"",
      btmId:"",
      masterInput:'',
      MasterSearchSelects:"",
      masterData:[],
@@ -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(){
@@ -399,7 +397,6 @@
        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)
      }
    },
    //关键属性查询
@@ -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
      })
    }