田源
2023-07-31 fbcf5ee613da2bb6426ae53cb965a0f7260c01f0
Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
@@ -45,7 +45,7 @@
      </el-button-group>
      <!-- 是否开启编辑     -->
    <el-button-group>
      <el-button size="small" plain  icon="el-icon-view"  v-if="(!checkStatus|| crudLCStatus=='Editing') && !editOpenFlag" @click="editOpen" >开启编辑</el-button>
      <el-button size="small" plain  icon="el-icon-view"  v-if="(!checkStatus|| crudLCStatus=='Editing') && !editOpenFlag && attrEditVisible == false && attrFlagChiledren==false" @click="editOpen" >开启编辑</el-button>
    </el-button-group>
    </div>
<!--    弹窗-->
@@ -207,7 +207,7 @@
      </el-dialog>
      <!--        全屏编辑-->
      <el-dialog :visible.sync="attrEditVisible" append-to-body fullscreen="true">
        <attrCrud :ProData="this.ProData" :attrFlagChiledren="this.attrFlag" :crudArrayFlag="this.crudArrayFlag"></attrCrud>
        <attrCrud :ProData="this.ProData" :attrFlagChiledren="this.attrFlag" :editOpenFlag="editOpenFlag" :crudArrayFlag="this.crudArrayFlag"></attrCrud>
      </el-dialog>
      <!--      组合规则-->
      <formula-editor :systemVariableTableData="systemVariableTableData"
@@ -251,7 +251,7 @@
    </div>
    <el-table :data="ProData"
              style="width: 100%"
              height="400"
              :height="this.editStyleFlag ? 450 : 900"
              @cell-click="handleCellClicks"
              @select="selectHandle"
              @selection-change="selectionChange"
@@ -371,6 +371,24 @@
      deep:true,
      immediate:true
    },
    Formlist:{
      handler(newval,oldval){
        if(newval.length === 0){
          this.crudArrayFlag=false
          return
        }
      }
    },
    ProData:{
      handler(newval,oldval){
        if(newval){
          this.loading=true;
          setTimeout(() => {
            this.loading=false
          }, 1000);
        }
      }
    },
    'injectOption.classifyInvokeAttr': function(newVal) {
      console.log('newVal',newVal)
      if (newVal === "name") {
@@ -391,6 +409,8 @@
  },
  data() {
    return {
      //全屏编辑高度状态
      edittStyleFlag:false,
      loading:false,
      referConfigText:"",
      referConfigVisble:false,
@@ -1448,11 +1468,14 @@
    //属性分组提交
    attrHandle() {
      console.log(this.attrSelectList)
      // this.$set(this.attrRow, 'attributeGroup', this.attrModel)
      // this.attrSelectList.attributeGroup=this.attrModel
      this.attrSelectList.forEach(item=>{
        item.attributeGroup=this.attrModel
      })
      if(this.CurrentCell){
        this.$set(this.CurrentCell, 'attributeGroup', this.attrModel)
      }else {
        this.$set(this.attrSelectList[0], 'attributeGroup', this.attrModel)
      }
      this.attrModel = "";
      this.attrVisible = false;
    },
@@ -1592,6 +1615,9 @@
    addsHandler() {
      batchAddSave(JSON.parse(JSON.stringify(this.ProData))).then(res => {
        this.$message.success('保存成功')
        this.editOpenFlag=false
      }).catch(()=>{
        this.$message.warning('保存失败,请查看控制台输出!')
      })
    },
@@ -1639,8 +1665,8 @@
         }else if(column.property == 'verifyRule'){
           this.RulesForm.expressionTextt=this.CurrentCell.verifyRule;
           this.rulesVisible=true;
           console.log(this.CurrentCell.verifyRule)
           console.log(this.RulesForm.expressionText)
         }else if(column.property == 'attributeGroup'){
           this.attrVisible = true;
         }
       }
    },
@@ -1875,6 +1901,8 @@
      if (this.crudArray.length < 1) {
        this.$message.warning('请选择一个模板')
      } else {
        this.editStyleFlag=!this.editStyleFlag;
        // this.editOpenFlag=true;
        this.attrEditVisible = true;
        this.attrFlag = true;
      }
@@ -1907,11 +1935,9 @@
    sortChange(val) {
      console.log(val)
    },
    //开启编辑
    editOpen(){
      this.editOpenFlag=true;
      console.log('不等于',this.checkStatus)
      console.log('等于',this.editOpenFlag)
      console.log('等于',this.crudLCStatus)
    }
  }
}