ludc
2023-11-17 ac8e8998235f247365280d1a1632115c43b10037
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue
@@ -6,7 +6,7 @@
    </avue-form>
    <div>
<!--     编码规则-->
      <el-dialog  :visible.sync="MasterdialogVisible"   title="为【编码规则】选取值" append-to-body>
      <el-dialog  :visible.sync="MasterdialogVisible"   title="为【编码规则】选取值" append-to-body :before-close="masterEscHandler">
        <template>
          <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px">
            <el-option
@@ -20,17 +20,22 @@
          <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="Option" @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.loneTreeNewForm.coderuleoidName}}]</div>
          <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" >
            <el-button type="primary" size="small" @click="MasterHandlerClick">确定</el-button>
            <el-button  size="small" @click="MasterdialogVisible=false">取消</el-button>
            <el-button  size="small" @click="masterEscHandler">取消</el-button>
          </div>
        </div>
      </el-dialog>
<!--      关键属性查询规则-->
      <el-dialog  :visible.sync="KeydialogVisible"   title="为【关键属性查询规则】选取值" append-to-body>
      <el-dialog  :visible.sync="KeydialogVisible"   title="为【关键属性查询规则】选取值" append-to-body :before-close="KeyEscHandler">
        <template>
          <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px">
            <el-option
@@ -44,17 +49,22 @@
          <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="Option" @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 #eee;padding: 5px;margin-top: 5px;font-size: 14px " >已设置的值为:[{{this.loneTreeNewForm.codekeyattrrepeatoidName}}]</div>
          <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" >
            <el-button type="primary" size="small" @click="KeyHandlerClick">确定</el-button>
            <el-button  size="small" @click="KeydialogVisible=false">取消</el-button>
            <el-button  size="small" @click="KeyEscHandler">取消</el-button>
          </div>
        </div>
      </el-dialog>
      <!--      相似项查询规则-->
      <el-dialog  :visible.sync="SimidialogVisible"   title="为【相似项查询规则】选取值" append-to-body>
      <el-dialog  :visible.sync="SimidialogVisible"   title="为【相似项查询规则】选取值" append-to-body :before-close="simEscHandler">
        <template>
          <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px">
            <el-option
@@ -68,21 +78,26 @@
          <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="Option"@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.loneTreeNewForm.codeResembleRuleOidName}}]</div>
          <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" >
            <el-button type="primary" size="small" @click="simHandlerClick">确定</el-button>
            <el-button  size="small" @click="SimidialogVisible=false">取消</el-button>
            <el-button  size="small" @click="simEscHandler">取消</el-button>
          </div>
        </div>
      </el-dialog>
<!--      存储的业务类型-->
      <el-dialog  :visible.sync="BtmdialogVisible"   title="为【业务类型】选取值" append-to-body>
      <el-dialog  :visible.sync="BtmdialogVisible"   title="为【业务类型】选取值" append-to-body :before-close="BtmEscHandler">
        <template>
          <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px !important;">
            <el-option
              v-for="item in SelectOption"
              v-for="item in masterSelectOption"
              :key="item.value"
              :label="item.label"
              :value="item.value"
@@ -94,14 +109,15 @@
        </template>
        <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>
            <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.loneTreeNewForm.btmTypeName}}]</div>
          <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" >
            <el-button type="primary" size="small" @click="btmHandlerClick">确定</el-button>
            <el-button  size="small" @click="BtmdialogVisible=false">取消</el-button>
            <el-button  size="small" @click="BtmEscHandler">取消</el-button>
          </div>
        </div>
      </el-dialog>
@@ -117,7 +133,7 @@
  props: ['loneTreeNewForm','flag','Editclose','TreeFlag','nodeClickList'],
  data() {
    return {
      masterRow:0,
      masterRow:null,
      SelectFInd:"",
      masterName:"",
      masterOid:"",
@@ -144,8 +160,19 @@
          label: '英文名称'
        }
      ],
      SelectValue:"",
      masterSelectOption:[
        {
          value: 'id',
          label: '业务类型编号'
        },
        {
          value: 'name',
          label: '业务类型名称'
        },
      ],
      SelectValue:'id',
      btmOption:{
        columnBtn:false,
        addBtn:false,
        index:true,
        border:true,
@@ -159,6 +186,34 @@
          },
          {
            label:'业务类型名称',
            prop:'name'
          },
          {
            label:'描述',
            prop:'description'
          }
        ]
      },
      Option:{
        addBtn:false,
        columnBtn:false,
        index:true,
        border:true,
        menu:false,
        height:380,
        column:[
          {
            label: '',
            prop: 'radio',
            width: 60,
            display: false
          },
          {
            label:'英文编号',
            prop:'id'
          },
          {
            label:'中文名称',
            prop:'name'
          },
          {
@@ -181,11 +236,11 @@
            display: false
          },
          {
            label:'英文名称',
            label:'业务类型编号',
            prop:'id'
          },
          {
            label:'中文名称',
            label:'业务类型名称',
            prop:'name'
          },
          {
@@ -205,7 +260,7 @@
      option: {
        submitBtn:false,
        emptyBtn:false,
        columnBtn:false,
        column: [
          {
            label: '主题库/分类编号',
@@ -337,7 +392,22 @@
              focus: this.simFouce,
              readonly: true,
            },
            {
              label: '是否参与关键属性校验',
              prop: 'isParticipateCheck',
              type: 'switch',
              activeColor: "#13ce66",
              inactiveColor: "#ff4949",
              labelWidth:160,
              dicData: [{
                label: '否',
                value: 0
              }, {
                label: '是',
                value: 1
              }
              ]
            }
          ]
      }
@@ -346,7 +416,7 @@
  watch:{
    TreeFlag:{
      handler(newval,oldval){
        console.log(newval)
        // console.log(newval)
      }
    }
  },
@@ -377,23 +447,39 @@
    error(err) {
      this.$message.success(err);
    },
    //编码规则关闭
    masterEscHandler(){
      this.SelectFInd='';
      this.SelectValue='id';
      this.masterRow=null;
      this.MasterdialogVisible=false;
    },
    //关键属性关闭
    KeyEscHandler(){
      this.SelectFInd='';
      this.SelectValue='id';
      this.masterRow=null;
      this.KeydialogVisible=false;
    },
    //相似项关闭
    simEscHandler(){
      this.SelectFInd='';
      this.SelectValue='id';
      this.masterRow=null;
      this.SimidialogVisible=false;
    },
    //存储业务类型关闭
    BtmEscHandler(){
      this.SelectFInd='';
      this.SelectValue='id';
      this.masterRow=null;
      this.BtmdialogVisible=false;
    },
    //编码规则查询
    SelectFindeHandler(){
      if(this.SelectValue == 'id'){
        const masterParameter={
          'conditionMap[id]':this.SelectFInd
        }
        this.MasterdefaultRend(masterParameter);
        this.SelectValue=""
        this.SelectFInd=""
      }else if(this.SelectValue == 'name'){
        const masterParameter={
          'conditionMap[name]':this.SelectFInd
        }
        this.MasterdefaultRend(masterParameter)
        this.SelectValue=""
        this.SelectFInd=""
      }
      const masterParameter = {};
      masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd;
      this.MasterdefaultRend(masterParameter)
    },
    //编码规则失焦
    CodeFoucus(){
@@ -416,9 +502,10 @@
    },
    //编码多选
    masterSelect(row){
      this.masterSelectList=row;
      this.masterName=row[0].name;
      this.masterOid=row[0].oid;
      this.masterRow = row.$index;
      this.masterSelectList = row;
      this.masterName = row.name;
      this.masterOid = row.oid;
    },
    //编码接口
    MasterdefaultRend(masterParameter){
@@ -426,6 +513,7 @@
        referType:'coderule',
        isMuti:'false',
        'conditionMap["lcstatus"]':'Released',
        'limit':'-1',
        ...masterParameter
      }).then(res=>{
        this.masterData=res.data.records;
@@ -452,37 +540,28 @@
    },
    //关键属性查询
    KeySelectFindeHandler(){
      if(this.SelectValue == 'id'){
        const masterParameter={
          'conditionMap[id]':this.SelectFInd
        }
        this.KeydefaultRend(masterParameter);
        this.SelectValue=""
        this.SelectFInd=""
      }else if(this.SelectValue == 'name'){
        const masterParameter={
          'conditionMap[name]':this.SelectFInd
        }
        this.KeydefaultRend(masterParameter)
        this.SelectValue="";
        this.SelectFInd="";
      }
      const masterParameter = {};
      masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd;
      this.KeydefaultRend(masterParameter)
    },
    //关键属性接口
    KeydefaultRend(){
    KeydefaultRend(masterParameter){
      defaultReferDataGrid({
        referType:'codekeyattrrepeat',
        isMuti:'false',
        'conditionMap["lcstatus"]':'Enabled'
        'conditionMap["lcstatus"]':'Enabled',
        'limit':'-1',
        ...masterParameter
      }).then(res=>{
        this.KeyData=res.data.records;
      })
    },
    //关键多选
    KeySelect(row){
      this.KeySelectLIst=row;
      this.KeyName=row[0].name;
      this.KeyOid=row[0].oid;
      this.masterRow = row.$index;
      this.KeySelectLIst = row;
      this.KeyName = row.name;
      this.KeyOid = row.oid;
    },
    //相似项失焦
    simFouce(){
@@ -505,34 +584,25 @@
    },
    //相似项查询
    SimSelectFindeHandler(){
      if(this.SelectValue == 'id'){
        const masterParameter={
          'conditionMap[id]':this.SelectFInd
        }
        this.simdefaultRend(masterParameter);
        this.SelectValue=""
        this.SelectFInd=""
      }else if(this.SelectValue == 'name'){
        const masterParameter={
          'conditionMap[name]':this.SelectFInd
        }
        this.simdefaultRend(masterParameter)
        this.SelectValue=""
        this.SelectFInd=""
      }
      const masterParameter = {};
      masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd;
      this.simdefaultRend(masterParameter)
    },
    //相似项多选
    simSelect(row){
      this.simSelectList=row;
      this.simName=row[0].name;
      this.simOid=row[0].oid;
      this.masterRow = row.$index;
      this.simSelectList = row;
      this.simName = row.name;
      this.simOid = row.oid;
    },
    //相似项项接口
    simdefaultRend(){
    simdefaultRend(masterParameter){
      defaultReferDataGrid({
        referType:'coderesemblerule',
        isMuti:'false',
        'conditionMap["lcstatus"]':'Enabled'
        'conditionMap["lcstatus"]':'Enabled',
        'limit':'-1',
        ...masterParameter
      }).then(res=>{
        this.simData=res.data.records;
      })
@@ -551,28 +621,16 @@
      }else {
        this.BtmdialogVisible=false;
        this.btmSelectList=[]
        this.$set(this.loneTreeNewForm,'btmTypeName',this.btmName ||this.btmOid)
        this.$set(this.loneTreeNewForm,'btmTypeName',this.btmName ||this.btmId)
        this.$set(this.loneTreeNewForm,'btmTypeId',this.btmId)
        this.$emit('MasterHandler',this.loneTreeNewForm)
      }
    },
    //业务类型查询
    BtmSelectFindeHandler(){
      if(this.SelectValue == 'id'){
        const masterParameter={
          'conditionMap[id]':this.SelectFInd
        }
        this.btmdefaultRend(masterParameter);
        this.SelectValue=""
        this.SelectFInd=""
      }else if(this.SelectValue == 'name'){
        const masterParameter={
          'conditionMap[name]':this.SelectFInd
        }
        this.btmdefaultRend(masterParameter)
        this.SelectValue=""
        this.SelectFInd=""
      }
      const masterParameter = {};
      masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd;
      this.btmdefaultRend(masterParameter);
    },
    //业务类型多选
    btmSelect(row){
@@ -583,7 +641,7 @@
    },
    //业务类型接口
    btmdefaultRend(masterParameter){
      referDataGrid({valueField:'id',isMuti:'false',...masterParameter}).then(res=>{
      referDataGrid({valueField:'id',isMuti:'false','limit':'-1',...masterParameter}).then(res=>{
        this.BtmData=res.data.data.records
      })
    }