wangting
2023-08-07 db860f9c08a23fe916121a2c76001e05d2acee3e
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -26,7 +26,7 @@
        <!--        树节点添加对话框-->
        <el-dialog :title="this.TreeFlag ? '添加分类' :'添加主题库'" :before-close="TreeEscHandler" :visible.sync="TreeAddFormVisible"  v-loading="AddLoading" append-to-body
                   style="width: 1700px;margin: auto">
          <el-form :model="TreeAddform" :rules="rules">
          <el-form ref="myForm" :model="TreeAddform" :rules="rules">
            <el-form-item :label="this.TreeFlag ? '分类编号:' :'主题库编号:'" label-width="150px" style="display: inline-block" prop="id">
              <el-input v-model="TreeAddform.id" autocomplete="off" style="width: 170px"></el-input>
            </el-form-item>
@@ -231,7 +231,11 @@
            <el-input style="width: 260px;margin-left: 15px" placeholder="输入值后进行模糊查询" v-model="SelectFInd"></el-input>
            <el-button size="small"  type="primary" plain @click="SelectFindeHandler" style="margin-left: 20px">查询</el-button>
          </template>
          <avue-crud :data="masterData" :option="masterOption" @select="masterSelect"></avue-crud>
          <avue-crud :data="masterData" :option="masterOption" @row-click="masterSelect">
            <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.coderuleoidName ==''?'未设置值':this.TreeAddform.coderuleoidName}}]</div>
            <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" >
@@ -255,7 +259,11 @@
            <el-input style="width: 260px;margin-left: 15px" placeholder="输入值后进行模糊查询" v-model="SelectFInd"></el-input>
            <el-button size="small"  type="primary" plain @click="KeySelectFindeHandler" style="margin-left: 20px">查询</el-button>
          </template>
          <avue-crud :data="KeyData" :option="masterOption" @select="KeySelect"></avue-crud>
          <avue-crud :data="KeyData" :option="masterOption" @row-click="KeySelect">
            <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 #eeeeee;padding: 5px;margin-top: 5px;font-size: 14px " >已设置的值为:[{{this.TreeAddform.codeKeyAttrRepeatOidName ==''?'未设置值':this.TreeAddform.codekeyattrrepeatoidName}}]</div>
            <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" >
@@ -279,7 +287,11 @@
            <el-input style="width: 260px;margin-left: 15px" placeholder="输入值后进行模糊查询" v-model="SelectFInd"></el-input>
            <el-button size="small"  type="primary" plain @click="SimSelectFindeHandler" style="margin-left: 20px">查询</el-button>
          </template>
          <avue-crud :data="simData" :option="masterOption" @select="simSelect"></avue-crud>
          <avue-crud :data="simData" :option="masterOption" @row-click="simSelect">
            <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.codeResembleRuleOidName ==''?'未设置值':this.TreeAddform.codeResembleRuleOidName}}]</div>
            <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" >
@@ -772,11 +784,11 @@
    },
    //编码多选
    masterSelect(row){
    if(row.length>0){
      this.masterRow=row.$index;
      this.masterSelectList=row;
      this.masterName=row[0].name;
      this.masterOid=row[0].oid;
    }
      this.masterName=row.name;
      this.masterOid=row.oid;
    },
    //编码规则查询
    SelectFindeHandler(){
@@ -859,9 +871,10 @@
    },
    // 关键多选
    KeySelect(row){
      this.masterRow=row.$index;
      this.KeySelectLIst=row;
      this.KeyName=row[0].name;
      this.KeyOid=row[0].oid;
      this.KeyName=row.name;
      this.KeyOid=row.oid;
    },
    //关键失焦
    simFouce(){
@@ -898,9 +911,10 @@
    },
    //  相似项多选
    simSelect(row){
      this.masterRow=row.$index;
      this.simSelectList=row;
      this.simName=row[0].name;
      this.simOid=row[0].oid;
      this.simName=row.name;
      this.simOid=row.oid;
    },
    //相似项项接口
    simdefaultRend(){
@@ -1027,34 +1041,40 @@
    //树节点取消事件
    TreeEscHandler(){
      this.TreeAddform={};
      this.TreeAddFormVisible=false
      this.TreeAddFormVisible=false;
      // 关闭弹窗清空校验
      this.$refs.myForm.clearValidate();
    },
    //树节点添加事件
    TreeAddHandler() {
      const data = this.TreeAddform;
      // data.btmtypename= this.TreeList.btmtypename
      this.$set(data, "parentCodeClassifyOid", this.nodeClickList.oid);
      TreeSave(data)
        .then(() => {
          this.$message({
            type: "success",
            message: "添加成功!",
      if ((!this.TreeAddform.id || !this.TreeAddform.name) || (this.TreeFlagCode && !this.TreeAddform.btmTypeName)) {
        this.$message.warning('请输入内容!');
      }else {
        const data = this.TreeAddform;
        // data.btmtypename= this.TreeList.btmtypename
        this.$set(data, "parentCodeClassifyOid", this.nodeClickList.oid);
        TreeSave(data)
          .then(() => {
            this.$message({
              type: "success",
              message: "添加成功!",
            });
            Object.keys(this.TreeAddform).forEach(key => {
              this.TreeAddform[key] = "";
            });
            this.getAttr();
            this.TreeAddFormVisible = false;
            //添加完成后右侧清空
            this.ProData=[];
            this.Formlist=[];
          })
          .catch((res) => {
            this.$message({
              type: "warning",
              message: res,
            });
          });
          Object.keys(this.TreeAddform).forEach(key => {
            this.TreeAddform[key] = "";
          });
          this.getAttr();
          this.TreeAddFormVisible = false;
          //添加完成后右侧清空
          this.ProData=[];
          this.Formlist=[];
        })
        .catch((res) => {
          this.$message({
            type: "warning",
            message: res,
          });
        });
      }
    },
    //树节点删除按钮
    TreeDel() {