feige
2024-10-18 ed96edec7c6dfd4944d0ee1c6d924c7cb808428c
ruoyi-ui/src/views/clanManager/clan/index.vue
@@ -203,6 +203,7 @@
      },
      personInfos:[],
      personInfos1:[],
     res: false,
      // 表单参数
      form: {
        clanId: undefined,
@@ -220,6 +221,17 @@
 
      }
    };
  },
  watch: {
            'form.clanName': function(newVal, oldVal){
            // alert(newVal)
            // alert(oldVal)
                if(newVal==oldVal||oldVal==undefined)
               this.res = false;
            else
               this.res = true;
            },
  },
  created() {
    this.getList();
@@ -475,6 +487,13 @@
    /** 提交按钮 */
    submitForm: function() {
      let _this = this
     //alert(this.res)
     if(this.res == false)
     {
        this.$modal.msgSuccess("家族名称没有修改,不能提交")
      return;
      }
      this.$refs["form"].validate(valid => {
        if (valid) {
         //alert(this.form.id)
@@ -483,6 +502,7 @@
           // this.form.menuIds = this.getMenuAllCheckedKeys();
            updateClan(this.form).then(response => {
            console.log(response)
           this.res = false;
           if(response.msg=="家族名称不能重复!")
            this.$modal.msgSuccess("家族名称不能重复")
            else{