田源
2023-08-03 69c44007184b0c496affd99ae785c747bba3dd48
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -58,7 +58,7 @@
        </el-dialog>
        <!--        修改对话框-->
        <el-dialog :visible.sync="TreeEditFormVisible" append-to-body title="修改分类">
          <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList" :flag="'edit'" @MasterHandler="MasterHandler" :Editclose=" ()=>{TreeEditFormVisible=false}" :TreeFlag="TreeFlagCode" :nodeClickList="nodeClickList" @referTreeForm="referTreeForm" @flushed="flushed"></classifyTreeform>
          <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList" :flag="'edit'" @MasterHandler="MasterHandler" :Editclose=" ()=>{TreeEditFormVisible=false}" :TreeFlag="editTreeFLagCode" :nodeClickList="nodeClickList" @referTreeForm="referTreeForm" @flushed="flushed"></classifyTreeform>
        </el-dialog>
        <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata" :defaultExpandAll="false"
                   :option="Treeoption"
@@ -303,7 +303,11 @@
            <el-input style="width: 260px;margin-left: 15px" placeholder="输入值后进行模糊查询" v-model="SelectFInd"></el-input>
            <el-button size="small"  type="primary" plain @click="BtmSelectFindeHandler" style="margin-left: 20px">查询</el-button>
          </template>
          <avue-crud :data="BtmData" :option="masterOption" @select="btmSelect"></avue-crud>
          <avue-crud :data="BtmData" :option="masterOption" @row-click="btmSelect">
            <template slot="radio" slot-scope="{row}">
              <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{''}}</el-radio>
            </template>
          </avue-crud>
          <div style="height: 30px">
            <div style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px " >已设置的值为:[{{this.TreeAddform.btmTypeName}}]</div>
            <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" >
@@ -350,15 +354,18 @@
  inject: ["crudTreeData"],
  data() {
    return {
      masterRow:null,
      AddLoading:false,
      // 定义一个变量来保存树请求的数量
      requestCount:0,
      requestCount:null,
      //导入状态框
      ThemeImportVisible:false,
      selectRow:'',
      selectList:[],
      //树节点显示隐藏
      TreeFlagCode:false,
      TreeFlagCode:true,
      //修改节点显示隐藏
      editTreeFLagCode:false,
      //编码规则
      MasterdialogVisible:false,
      masterData:[],
@@ -387,10 +394,15 @@
        addBtn:false,
        index:true,
        border:true,
        selection:true,
        menu:false,
        height:380,
        column:[
          {
            label: '',
            prop: 'radio',
            width: 60,
            display: false
          },
          {
            label:'英文名称',
            prop:'id'
@@ -676,7 +688,7 @@
        this.$refs.tree.setCurrentKey(null)
        this.nodeClickList = {}
        this.TreeList=[]
        this.TreeFlagCode=false;
        this.TreeFlagCode=true;
      }
    }, true)
  },
@@ -953,9 +965,10 @@
    },
    //业务类型多选
    btmSelect(row){
      this.masterRow=row.$index;
      this.btmSelectList=row;
      this.btmName=row[0].name;
      this.btmOid=row[0].id;
      this.btmName=row.name;
      this.btmOid=row.id;
    },
    //业务类型接口
    btmdefaultRend(masterParameter){
@@ -986,8 +999,16 @@
        })
        //调用修改属性名方法
        this.ModifyProperties(this.CloneTreedata, 'name', 'label');
        console.log(this.CloneTreedata)
        this.CloneTreedata = this.CloneTreedata.map(item => {
          if (item.attributes.lcStatus === "Disabled") {
            item.label += '【停用】';
          }
          return item;
        });
      }).catch(res => {
        this.$message.error(res)
      })
    },
    //定义一个修改数据属性名的方法
@@ -1011,9 +1032,8 @@
        background: 'rgba(0, 0, 0, 0.3)'
      });
      try {
        if (this.nodeClickList !== "") {
          this.TreeFlag = true;
        }
        //新增表头名称
        this.TreeFlag=!this.nodeClickList
        await new Promise(resolve => setTimeout(resolve, 500));
        this.TreeAddFormVisible = true;
        loading.close();
@@ -1038,6 +1058,9 @@
          });
          this.getAttr();
          this.TreeAddFormVisible = false;
          //添加完成后右侧清空
          this.ProData=[];
          this.Formlist=[];
        })
        .catch((res) => {
          this.$message({
@@ -1193,11 +1216,9 @@
    //树点击事件
    async nodeClick(data) {
      console.log(data);
      if (data.parentId === "") {
        this.TreeFlagCode = true;
      }else {
        this.TreeFlagCode =false;
      }
      //操作新增和修改的业务类型隐藏
      this.TreeFlagCode = !data;
      this.editTreeFLagCode = !data.parentId;
      this.nodeClickList = data;
      this.selectRow = 0;
      try {
@@ -1221,6 +1242,7 @@
          await this.gridCode();
        } else {
          this.ProData = [];
          this.crudOid=''
        }
        this.TreeList = res3.data.data;
      } catch (error) {