ludc
2024-08-15 b19fab639f82d33776e58b541c17a17be75325e7
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue
@@ -737,8 +737,12 @@
        row,
        this.$refs.userCrud,
        this.lastIndex,
        (newIndex) => { this.lastIndex = newIndex; },
        () => { this.selectList = []; }
        (newIndex) => {
          this.lastIndex = newIndex;
        },
        () => {
          this.selectList = [];
        }
      );
    },
@@ -1213,38 +1217,44 @@
        linkTypeName: "",
        rangeValue: ""
      };
      if (this.dialogTitle === 'add') {
        this.form.range = this.form.rangeValue.replace(/\n/g, ';');
        if (this.form.attributeSelectType === 'business') {
          this.form.btmTypeId = this.form.referValue;
        } else {
          this.form.linkTypeName = this.form.referValue;
        }
        addAttribute(this.form).then(res => {
          if (res.data.code === 200) {
            this.$message.success(res.data.obj);
            this.getTableList();
            this.form = form;
            this.addVisible = false;
      this.$refs.form.validate((valid) => {
        if (valid) {
          if (this.dialogTitle === 'add') {
            this.form.range = this.form.rangeValue.replace(/\n/g, ';');
            if (this.form.attributeSelectType === 'business') {
              this.form.btmTypeId = this.form.referValue;
            } else {
              this.form.linkTypeName = this.form.referValue;
            }
            addAttribute(this.form).then(res => {
              if (res.data.code === 200) {
                this.$message.success(res.data.obj);
                this.getTableList();
                this.form = form;
                this.addVisible = false;
              }
            })
          }
        })
      }
      if (this.dialogTitle === 'edit') {
        this.form.range = this.form.rangeValue.replace(/\n/g, ';');
        if (this.form.attributeSelectType === 'business') {
          this.form.btmTypeId = this.form.referValue;
        } else {
          this.form.linkTypeName = this.form.referValue;
        }
        updateAttribute(this.form).then(res => {
          if (res.data.code === 200) {
            this.$message.success(res.data.obj);
            this.getTableList();
            this.form = form;
            this.addVisible = false;
          if (this.dialogTitle === 'edit') {
            this.form.range = this.form.rangeValue.replace(/\n/g, ';');
            if (this.form.attributeSelectType === 'business') {
              this.form.btmTypeId = this.form.referValue;
            } else {
              this.form.linkTypeName = this.form.referValue;
            }
            updateAttribute(this.form).then(res => {
              if (res.data.code === 200) {
                this.$message.success(res.data.obj);
                this.getTableList();
                this.form = form;
                this.addVisible = false;
              }
            })
          }
        })
      }
        } else {
          return false;
        }
      });
    },
    // 导入