fjl
fujunling
2023-07-18 2c6c24281d4c261b172d02a98df9524cffc0c276
Source/UBCS-WEB/src/components/Tree/attrCrud.vue
@@ -242,7 +242,7 @@
    </div>
    <el-table :data="ProData"
              style="width: 100%"
              height="280"
              height="750"
              @cell-click="handleCellClicks"
              @select="selectHandle"
              @selection-change="selectionChange"
@@ -374,6 +374,7 @@
      editingRows: null,
      editShows:"",
      attrFlag: false,
      referObject:{},
      //编码申请预览option
      applicationoption: {
        column: []
@@ -1391,6 +1392,7 @@
    //参照配置子组件
    echoReferConfig(val){
      console.log('val--',val)
      this.referObject=val
      this.$set(this.CurrentCell,'referConfig',JSON.stringify(val))
    },
@@ -1635,15 +1637,26 @@
    },
    //枚举注入保存
    enumAddHandle() {
      if (this.enumRow.length < 1) {
        this.$message.warning('请至少选择一条数据')
      } else {
        if(this.CurrentCell){
          this.$set(this.CurrentCell, 'enumString', JSON.stringify(this.enumRow));
      let hasError = false; // 添加一个变量
      this.tableData.forEach((item, index) => {
        if (item.key === '') {
          this.$message.warning(`第${index + 1}行的选项值不能为空`);
          hasError = true;
          return;
        } else if (item.value === '') {
          this.$message.warning(`第${index + 1}行的选项中文标签不能为空`);
          hasError = true;
          return;
        }
      });
        // 保存执行逻辑
      if (!hasError) {
        if (this.CurrentCell) {
          this.$set(this.CurrentCell, 'enumString', JSON.stringify(this.tableData));
          this.enumVisible = false;
        }else {
          this.$set(this.attrSelectList[0], 'enumString', JSON.stringify(this.enumRow));
          this.tableData=[]
        } else {
          this.$set(this.attrSelectList[0], 'enumString', JSON.stringify(this.tableData));
          this.tableData=[];
          this.enumVisible = false;
        }
      }