田源
2024-08-15 bc90fb7e0c6c8313e7d5fcf3aba57e3a1f975c93
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue
@@ -347,13 +347,13 @@
                </el-form-item>
                <el-form-item v-if="!form.enumSwitch" label="运算符:">
                  <div>
                    <el-button size="mini" @click="operationHandler('>')"> > </el-button>
                    <el-button size="mini" @click="operationHandler('<')"> < </el-button>
                    <el-button size="mini" @click="operationHandler('>=')"> >= </el-button>
                    <el-button size="mini" @click="operationHandler('<=')"> <= </el-button>
                    <el-button size="mini" @click="operationHandler('=')"> = </el-button>
                    <el-button size="mini" @click="operationHandler('!=')"> != </el-button>
                    <el-button size="mini" @click="operationHandler('()')"> () </el-button>
                    <el-button size="mini" @click="operationHandler('>')"> ></el-button>
                    <el-button size="mini" @click="operationHandler('<')"> <</el-button>
                    <el-button size="mini" @click="operationHandler('>=')"> >=</el-button>
                    <el-button size="mini" @click="operationHandler('<=')"> <=</el-button>
                    <el-button size="mini" @click="operationHandler('=')"> =</el-button>
                    <el-button size="mini" @click="operationHandler('!=')"> !=</el-button>
                    <el-button size="mini" @click="operationHandler('()')"> ()</el-button>
                  </div>
                </el-form-item>
                <el-form-item :label="form.enumSwitch ? '当前枚举值:' : '当前值域:'" prop="rangeValue">
@@ -371,16 +371,16 @@
                </el-form-item>
                <el-form-item label="运算符:">
                  <div>
                    <el-button size="mini" @click="operationHandler('>')"> > </el-button>
                    <el-button size="mini" @click="operationHandler('<')"> < </el-button>
                    <el-button size="mini" @click="operationHandler('>=')"> >= </el-button>
                    <el-button size="mini" @click="operationHandler('<=')"> <= </el-button>
                    <el-button size="mini" @click="operationHandler('=')"> = </el-button>
                    <el-button size="mini" @click="operationHandler('!=')"> != </el-button>
                    <el-button size="mini" @click="operationHandler('()')"> () </el-button>
                    <el-button size="mini" @click="operationHandler('>')"> ></el-button>
                    <el-button size="mini" @click="operationHandler('<')"> <</el-button>
                    <el-button size="mini" @click="operationHandler('>=')"> >=</el-button>
                    <el-button size="mini" @click="operationHandler('<=')"> <=</el-button>
                    <el-button size="mini" @click="operationHandler('=')"> =</el-button>
                    <el-button size="mini" @click="operationHandler('!=')"> !=</el-button>
                    <el-button size="mini" @click="operationHandler('()')"> ()</el-button>
                  </div>
                </el-form-item>
                <el-form-item :label="form.enumSwitch ? '当前枚举值:' : '当前值域:'"  prop="rangeValue">
                <el-form-item :label="form.enumSwitch ? '当前枚举值:' : '当前值域:'" prop="rangeValue">
                  <textarea v-model="form.rangeValue"
                            style="width: 330px; height: 80px; border: 1px solid #DCDFE6; overflow: auto; text-align: left;resize: none;">
                  </textarea>
@@ -649,6 +649,7 @@
      ],
      upFileType: ['xls', 'xlsx'],
      fileUrl: 'api/attributeController/importAttributes',
      lastIndex: null
    }
  },
  computed: {
@@ -732,7 +733,17 @@
    // 点击行
    rowClickHandler(row) {
      this.$refs.userCrud.toggleRowSelection(row);
      func.rowClickHandler(
        row,
        this.$refs.userCrud,
        this.lastIndex,
        (newIndex) => {
          this.lastIndex = newIndex;
        },
        () => {
          this.selectList = [];
        }
      );
    },
    // 条数
@@ -1206,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;
        }
      });
    },
    // 导入