田源
2023-08-01 da327aebecb89925e1ccd3cef41dce51a150cb7f
Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
@@ -14,7 +14,7 @@
      </el-button-group>
      <el-button-group>
        <!--    保存-->
        <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && editOpenFlag" size="small" type="success" plain @click="addsHandler" icon="el-icon-check">保存</el-button>
        <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && editOpenFlag" size="small" type="success" plain @click.prevent="addsHandler" icon="el-icon-check">保存</el-button>
        <!--    预览排序-->
        <el-button size="small" @click="orderHandle" icon="el-icon-arrow-down">预览排序</el-button>
        <!--    删除-->
@@ -170,7 +170,7 @@
                 title="输入分组的名称">
        <el-form ref="form" label-width="70px">
          <el-form-item label="属性分组">
            <el-input v-model="attrModel"></el-input>
            <el-input v-model="attrModel" autofocus></el-input>
          </el-form-item>
          <div style="display: flex;justify-content: flex-end">
            <el-button size="small" type="primary" @click="attrHandle">提交</el-button>
@@ -218,7 +218,7 @@
      </el-dialog>
      <!--        全屏编辑-->
      <el-dialog :visible.sync="attrEditVisible" append-to-body fullscreen="true" :before-close="escEdit" >
        <attrCrud :ProData="this.ProData" :attrFlagChiledren="this.attrFlag" :editStyleFlag="editStyleFlag" :editOpenFlag="editOpenFlag" :crudArrayFlag="this.crudArrayFlag"></attrCrud>
        <attrCrud :ProData="this.ProData" :attrFlagChiledren="this.attrFlag" @editCloseChildren="editClose" :editStyleFlag="editStyleFlag" :editOpenFlag="editOpenFlag" :crudArrayFlag="this.crudArrayFlag"></attrCrud>
      </el-dialog>
      <!--      组合规则-->
      <formula-editor :systemVariableTableData="systemVariableTableData"
@@ -1677,15 +1677,16 @@
      this.attrRow = row;
    },
    //保存
    addsHandler() {
    addsHandler(event) {
      batchAddSave(JSON.parse(JSON.stringify(this.ProData))).then(res => {
        this.$message.success('保存成功')
        this.editOpenFlag=false
        this.editOpenFlag=false;
        // 调用父组件修改按钮状态
        this.$emit('editCloseChildren')
      }).catch(()=>{
        this.$message.warning('保存失败,请查看控制台输出!')
      })
    },
    //表格行编辑
    handleCellClicks(row, column) {
       if(this.editOpenFlag){
@@ -1706,14 +1707,16 @@
           // this.$refs.referConfigFormDialog.onloadAttrData();
         }else if(column.property == 'classifyInvokeText'){
           this.injectVisible=true;
           this.injectOption.classifyInvokeAttr=this.CurrentCell.classifyInvokeAttr;
           this.injectOption.classifyInvokeAttrName=this.CurrentCell.classifyInvokeAttrName;
           this.injectOption.classifyInvokeEditFlag=this.CurrentCell.classifyInvokeEditFlag;
           if(this.CurrentCell.classifyInvokeLevel == 'min'){
             this.injectOption.classifyInvokeLevel='min'
           }else {
             this.injectOption.classifyInvokeLevel='max'
             this.injectOption.classifyNumber=this.CurrentCell.classifyInvokeLevel;
           if (this.CurrentCell.classifyInvokeAttr != '') {
             this.injectOption = {
               classifyInvokeAttr: this.CurrentCell.classifyInvokeAttr,
               classifyInvokeAttrName: this.CurrentCell.classifyInvokeAttrName,
               classifyInvokeEditFlag: this.CurrentCell.classifyInvokeEditFlag,
               classifyInvokeLevel: this.CurrentCell.classifyInvokeLevel == 'min' ? 'min' : 'max',
               classifyNumber: this.CurrentCell.classifyInvokeLevel == 'min' ? '' : this.CurrentCell.classifyInvokeLevel
             };
           } else {
             this.injectHandleReset();
           }
         }else if(column.property == 'componentRule'){
           if(this.CurrentCell){
@@ -1907,7 +1910,8 @@
    },
    // 分类注入取消
    injectRemove() {
      this.injectVisible = false
      this.injectVisible = false;
      this.injectHandleReset()
    },
    //属性模板表格单元格点击事件
    //表格操作栏删除
@@ -1994,6 +1998,10 @@
    editOpen(){
      this.editOpenFlag=true;
    },
    //定义一个关闭编辑的方法供子组件使用
    editClose(){
      this.editOpenFlag=false;
    },
    //批量设置switch
    batchSetFlag(value){
      this.attrSelectList.forEach(item=>{