田源
2024-01-11 2165c93769a8b92813fdeaa0ec4f0fa46ac31a93
主题库参照封装为组件
已修改2个文件
已添加1个文件
1240 ■■■■■ 文件已修改
Source/UBCS-WEB/src/components/FormTemplate/ThemeChildren.vue 221 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue 479 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue 540 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/FormTemplate/ThemeChildren.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,221 @@
<template>
  <div v-if="dialogVisible">
    <el-dialog :before-close="EscHandlerClose" :title="dialogTitleName" :visible.sync="dialogVisible" append-to-body>
      <template>
        <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px">
          <el-option
            v-for="item in SelectOption"
            :key="item.value"
            :label="item.label"
            :value="item.value"
            style="width: 150px">
          </el-option>
        </el-select>
        <el-input v-model="SelectSearchValue" placeholder="输入值后进行模糊查询"
                  style="width: 260px;margin-left: 15px"></el-input>
        <el-button plain size="small" style="margin-left: 20px" type="primary" @click="SelectSearchHandler">查询
        </el-button>
      </template>
      <avue-crud :data="TableData" :option="this.codeType === 'btmCode' ? this.btmOption : this.option" @row-click="rowHandlerClick">
        <template slot="radio" slot-scope="{row}">
          <el-radio v-model="radioValue" :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[codeName] == '' ? '未设置值' : this.TreeAddform[codeName] }}]
        </div>
        <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden">
          <el-button size="small" type="primary" @click="HandlerClickSave">确定</el-button>
          <el-button size="small" @click="HandlerClickEsc">取消</el-button>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import {defaultReferDataGrid, referDataGrid} from '@/api/MasterData/master'
export default {
  name: "ThemeChildren",
  props: {
    visible: {
      type: Boolean,
      default: false,
    },
    SelectOption: {
      type: Array,
    },
    dialogTitle: {
      type: String
    },
    TreeAddform: {
      type: Object
    },
    codeName: {
      type: String
    },
    codeType: {
      type: String
    },
    codeLcstatus: {
      type: String
    }
  },
  data() {
    return {
      SelectValue: 'id',
      SelectSearchValue: '',
      radioValue: '',
      LineParm: {},
      crudName: '',
      crudOid: '',
      TableData: [],
      option: {
        addBtn: false,
        index: true,
        columnBtn: false,
        refreshBtn: false,
        border: true,
        menu: false,
        height: 380,
        column: [
          {
            label: '',
            prop: 'radio',
            width: 60,
            display: false
          },
          {
            label: '英文名称',
            prop: 'id'
          },
          {
            label: '中文名称',
            prop: 'name'
          },
          {
            label: '描述',
            prop: 'description'
          }
        ]
      },
      btmOption:{
        addBtn: false,
        index: true,
        columnBtn: false,
        refreshBtn: false,
        border: true,
        menu: false,
        height:380,
        column:[
          {
            label: '',
            prop: 'radio',
            width: 60,
            display: false
          },
          {
            label:'业务类型编号',
            prop:'id'
          },
          {
            label:'业务类型名称',
            prop:'name'
          },
          {
            label:'描述',
            prop:'description'
          }
        ]
      },
    }
  },
  created() {
  },
  mounted() {
  },
  computed: {
    dialogVisible: {
      get() {
        return this.visible;
      },
      set(val) {
        this.$emit("update:visible", val);
      },
    },
    dialogTitleName() {
      return `为【${this.dialogTitle}】选取值`;
    },
  },
  methods: {
    //关闭表单
    EscHandlerClose() {
      this.dialogVisible = false;
      this.SelectSearchValue = '';
      this.SelectValue = 'id';
      this.radioValue = null;
      this.LineParm = {};
    },
    // æ¨¡ç³ŠæŸ¥è¯¢
    SelectSearchHandler() {
      if (!this.SelectOption) {
        return; // å¦‚æžœSelectOption数据不存在直接返回 é¿å…æŠ¥é”™
      }
      const Parameter = {};
      Parameter[`conditionMap['${this.SelectValue}']`] = this.SelectSearchValue;
      if(this.codeType === "btmCode"){
        this.btmDefaultRend(Parameter)
      }else {
        this.defaultSearchRend(Parameter);
      }
    },
    //表格行单选
    rowHandlerClick(row) {
      this.radioValue = row.$index;
      this.LineParm = row;
      this.crudName = row.name;
      this.crudOid = row.oid;
    },
    //确定
    HandlerClickSave() {
      if (Object.values(this.LineParm).length === 0) {
        this.$message.warning('请至少选择一条数据!')
      } else {
        this.EscHandlerClose();
        this.$emit('defineHandler', { crudName: this.crudName, crudOid: this.crudOid ,codeType:this.codeType});
      }
    },
    //取消
    HandlerClickEsc() {
      this.EscHandlerClose()
    },
    //接口
    defaultSearchRend(Parameter) {
      defaultReferDataGrid({
        referType: this.codeType,
        isMuti: 'false',
        'conditionMap["lcstatus"]': this.codeLcstatus,
        'limit': '-1',
        ...Parameter
      }).then(res => {
        this.TableData = res.data.records;
      })
    },
    btmDefaultRend(Parameter) {
      referDataGrid({valueField: 'id', isMuti: 'false', 'limit': '-1', ...Parameter}).then(res => {
        this.TableData = res.data.data.records
      })
    },
  }
}
</script>
<style scoped>
</style>
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue
@@ -6,121 +6,52 @@
    </avue-form>
    <div>
<!--     ç¼–码规则-->
      <el-dialog  :visible.sync="MasterdialogVisible"   title="为【编码规则】选取值" append-to-body :before-close="masterEscHandler">
        <template>
          <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px">
            <el-option
              v-for="item in SelectOption"
              :key="item.value"
              :label="item.label"
              :value="item.value"
              style="width: 150px">
            </el-option>
          </el-select>
          <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="attrOption" @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="masterEscHandler">取消</el-button>
          </div>
        </div>
      </el-dialog>
      <ThemeChildren
        ref="ThemeMasterChildren"
        dialogTitle="编码规则"
        codeName="codeRuleOidName"
        codeType="coderule"
        code-lcstatus="Released"
        :visible.sync="MasterdialogVisible"
        :SelectOption="SelectOption"
        :TreeAddform="loneTreeNewForm"
        @defineHandler="handlerDefine"
      ></ThemeChildren>
<!--      å…³é”®å±žæ€§æŸ¥è¯¢è§„则-->
      <el-dialog  :visible.sync="KeydialogVisible"   title="为【关键属性查询规则】选取值" append-to-body :before-close="KeyEscHandler">
        <template>
          <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px">
            <el-option
              v-for="item in SelectOption"
              :key="item.value"
              :label="item.label"
              :value="item.value"
              style="width: 150px">
            </el-option>
          </el-select>
          <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="attrOption" @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="KeyEscHandler">取消</el-button>
          </div>
        </div>
      </el-dialog>
      <!--      ç›¸ä¼¼é¡¹æŸ¥è¯¢è§„则-->
      <el-dialog  :visible.sync="SimidialogVisible"   title="为【相似项查询规则】选取值" append-to-body :before-close="simEscHandler">
        <template>
          <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px">
            <el-option
              v-for="item in SelectOption"
              :key="item.value"
              :label="item.label"
              :value="item.value"
              style="width: 150px">
            </el-option>
          </el-select>
          <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="attrOption"@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="simEscHandler">取消</el-button>
          </div>
        </div>
      </el-dialog>
      <ThemeChildren
        ref="ThemeKeyChildren"
        :SelectOption="SelectOption"
        :TreeAddform="loneTreeNewForm"
        :visible.sync="KeydialogVisible"
        code-lcstatus="Enabled"
        codeName="codeKeyAttrRepeatOidName"
        codeType="codekeyattrrepeat"
        dialogTitle="关键属性查询规则"
        @defineHandler="handlerDefine"
      ></ThemeChildren>
      <!--      ç›¸ä¼¼é¡¹æŸ¥è¯¢è§„则 codeResembleRuleOidName SimidialogVisible-->
      <ThemeChildren
        ref="ThemeSimChildren"
        :SelectOption="SelectOption"
        :TreeAddform="loneTreeNewForm"
        :visible.sync="SimidialogVisible"
        code-lcstatus="Enabled"
        codeName="codeResembleRuleOidName"
        codeType="coderesemblerule"
        dialogTitle="相似项查询规则"
        @defineHandler="handlerDefine"
      ></ThemeChildren>
<!--      å­˜å‚¨çš„业务类型-->
      <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 masterSelectOption"
              :key="item.value"
              :label="item.label"
              :value="item.value"
              style="width: 130px">
            </el-option>
          </el-select>
          <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" @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.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="BtmEscHandler">取消</el-button>
          </div>
        </div>
      </el-dialog>
      <ThemeChildren
        ref="ThemeBtmChildren"
        :SelectOption="btmSelectOption"
        :TreeAddform="loneTreeNewForm"
        :visible.sync="BtmdialogVisible"
        codeName="btmTypeName"
        codeType="btmCode"
        dialogTitle="业务类型"
        @defineHandler="handlerDefine"
      ></ThemeChildren>
    </div>
  </div>
</template>
@@ -128,28 +59,16 @@
<script>
import {defaultReferDataGrid,referDataGrid} from '@/api/MasterData/master'
import {TreeEditSave} from '@/api/template/templateAttr'
import ThemeChildren from '@/components/FormTemplate/ThemeChildren'
export default {
  components: {ThemeChildren},
  name: "classifyTreeform.vue",
  props: ['loneTreeNewForm','flag','Editclose','TreeFlag','nodeClickList'],
  data() {
    return {
      masterRow:null,
      SelectFInd:"",
      masterName:"",
      masterOid:"",
      KeyName:"",
      KeyOid:"",
      simName:"",
      simOid:"",
      btmName:"",
      btmOid:"",
      btmId:"",
      masterInput:'',
      MasterSearchSelects:"",
      masterData:[],
      KeyData:[],
      simData:[],
      BtmData:[],
      SelectOption:[
        {
          value: 'name',
@@ -160,7 +79,7 @@
          label: '英文名称'
        }
      ],
      masterSelectOption:[
      btmSelectOption:[
        {
          value: 'id',
          label: '业务类型编号'
@@ -170,89 +89,6 @@
          label: '业务类型名称'
        },
      ],
      SelectValue:'id',
      btmOption:{
        columnBtn: false,
        refreshBtn:false,
        addBtn:false,
        index:true,
        border:true,
        selection:true,
        menu:false,
        height:380,
        column:[
          {
            label:'业务类型编号',
            prop:'id'
          },
          {
            label:'业务类型名称',
            prop:'name'
          },
          {
            label:'描述',
            prop:'description'
          }
        ]
      },
      attrOption:{
        addBtn:false,
        columnBtn: false,
        refreshBtn:false,
        index:true,
        border:true,
        menu:false,
        height:380,
        column:[
          {
            label: '',
            prop: 'radio',
            width: 60,
            display: false
          },
          {
            label:'英文编号',
            prop:'id'
          },
          {
            label:'中文名称',
            prop:'name'
          },
          {
            label:'描述',
            prop:'description'
          }
        ]
      },
      masterOption:{
        columnBtn: false,
        refreshBtn:false,
        addBtn:false,
        index:true,
        border:true,
        menu:false,
        height:380,
        column:[
          {
            label: '',
            prop: 'radio',
            width: 60,
            display: false
          },
          {
            label:'业务类型编号',
            prop:'id'
          },
          {
            label:'业务类型名称',
            prop:'name'
          },
          {
            label:'描述',
            prop:'description'
          }
        ]
      },
      MasterdialogVisible:false,
      KeydialogVisible:false,
      SimidialogVisible:false,
@@ -396,7 +232,7 @@
              label:"编码规则",
              prop:"codeRuleOidName",
              labelWidth:128,
              focus:this.CodeFoucus,
              focus:this.CodeFocus,
              readonly: true,
            },
            {
@@ -444,6 +280,34 @@
  created() {
  },
  methods: {
    //树编辑参照子组件事件
    handlerDefine(val) {
      const codeTypeMap = {
        coderule: {
          nameKey: 'codeRuleOidName',
          oidKey: 'codeRuleOid'
        },
        codekeyattrrepeat: {
          nameKey: 'codeKeyAttrRepeatOidName',
          oidKey: 'codeKeyAttrRepeatOid'
        },
        coderesemblerule: {
          nameKey: 'codeResembleRuleOidName',
          oidKey: 'codeResembleRuleOid'
        },
        btmCode: {
          nameKey: 'btmTypeName',
          oidKey: 'btmTypeId'
        }
      };
      const codeType = codeTypeMap[val.codeType];
      if (codeType) {
        this.$set(this.loneTreeNewForm, codeType.nameKey, val.crudName);
        this.$set(this.loneTreeNewForm, codeType.oidKey, val.crudOid);
        this.$emit('MasterHandler', this.loneTreeNewForm);
      }
    },
    submits(form,done){
      if(this.TreeFlag){
        TreeEditSave(this.loneTreeNewForm).then(res=>{
@@ -468,204 +332,27 @@
    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(){
      const masterParameter = {};
      masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd;
      this.MasterdefaultRend(masterParameter)
    },
    //编码规则失焦
    CodeFoucus(){
    CodeFocus(){
      this.MasterdialogVisible=true;
      this.MasterdefaultRend()
    },
    //编码规则确定
    MasterHandlerClick(){
      if(this.masterSelectList.length>1){
        this.$message.warning('只能选择一条数据')
      }else if(this.masterSelectList.length<=0){
        this.$message.warning('请选择一条数据')
      }else {
        this.MasterdialogVisible=false;
        this.masterSelectList=[]
        this.$set(this.loneTreeNewForm,'codeRuleOidName',this.masterName)
        this.$set(this.loneTreeNewForm,'codeRuleOid',this.masterOid)
        this.$emit('MasterHandler',this.loneTreeNewForm)
      }
    },
    //编码多选
    masterSelect(row){
      this.masterRow = row.$index;
      this.masterSelectList = row;
      this.masterName = row.name;
      this.masterOid = row.oid;
    },
    //编码接口
    MasterdefaultRend(masterParameter){
      defaultReferDataGrid({
        referType:'coderule',
        isMuti:'false',
        'conditionMap["lcstatus"]':'Released',
        'limit':'-1',
        ...masterParameter
      }).then(res=>{
        this.masterData=res.data.records;
      })
      this.$refs.ThemeMasterChildren.defaultSearchRend()
    },
    //关键属性失焦
    Keyfouce(){
      this.KeydialogVisible=true;
      this.KeydefaultRend()
    },
    //关键属性确定
    KeyHandlerClick(){
      if(this.KeySelectLIst.length>1){
        this.$message.warning('只能选择一条数据')
      }else if(this.KeySelectLIst.length<=0){
        this.$message.warning('请选择一条数据')
      }else {
        this.KeydialogVisible=false;
        this.KeySelectLIst=[]
        this.$set(this.loneTreeNewForm,'codeKeyAttrRepeatOidName',this.KeyName)
        this.$set(this.loneTreeNewForm,'codeKeyAttrRepeatOid',this.KeyOid)
        this.$emit('MasterHandler',this.loneTreeNewForm)
      }
    },
    //关键属性查询
    KeySelectFindeHandler(){
      const masterParameter = {};
      masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd;
      this.KeydefaultRend(masterParameter)
    },
    //关键属性接口
    KeydefaultRend(masterParameter){
      defaultReferDataGrid({
        referType:'codekeyattrrepeat',
        isMuti:'false',
        'conditionMap["lcstatus"]':'Enabled',
        'limit':'-1',
        ...masterParameter
      }).then(res=>{
        this.KeyData=res.data.records;
      })
    },
    //关键多选
    KeySelect(row){
      this.masterRow = row.$index;
      this.KeySelectLIst = row;
      this.KeyName = row.name;
      this.KeyOid = row.oid;
      this.$refs.ThemeKeyChildren.defaultSearchRend();
    },
    //相似项失焦
    simFouce(){
      this.SimidialogVisible=true;
      this.simdefaultRend()
      this.$refs.ThemeSimChildren.defaultSearchRend();
    },
    //相似项确定
    simHandlerClick(){
      if(this.simSelectList.length>1){
        this.$message.warning('只能选择一条数据')
      }else if(this.simSelectList.length<=0){
        this.$message.warning('请选择一条数据')
      }else {
        this.SimidialogVisible=false;
        this.simSelectList=[]
        this.$set(this.loneTreeNewForm,'codeResembleRuleOidName',this.simName)
        this.$set(this.loneTreeNewForm,'codeResembleRuleOid',this.simOid)
        this.$emit('MasterHandler',this.loneTreeNewForm)
      }
    },
    //相似项查询
    SimSelectFindeHandler(){
      const masterParameter = {};
      masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd;
      this.simdefaultRend(masterParameter)
    },
    //相似项多选
    simSelect(row){
      this.masterRow = row.$index;
      this.simSelectList = row;
      this.simName = row.name;
      this.simOid = row.oid;
    },
    //相似项项接口
    simdefaultRend(masterParameter){
      defaultReferDataGrid({
        referType:'coderesemblerule',
        isMuti:'false',
        'conditionMap["lcstatus"]':'Enabled',
        'limit':'-1',
        ...masterParameter
      }).then(res=>{
        this.simData=res.data.records;
      })
    },
    //业务类型失焦
    btmFoucus(){
      this.BtmdialogVisible=true;
      this.btmdefaultRend()
      this.BtmdialogVisible = true;
      this.$refs.ThemeBtmChildren.btmDefaultRend();
    },
    //业务类型确定
    btmHandlerClick(){
      if(this.btmSelectList.length>1){
        this.$message.warning('只能选择一条数据')
      }else if(this.btmSelectList.length<=0){
        this.$message.warning('请选择一条数据')
      }else {
        this.BtmdialogVisible=false;
        this.btmSelectList=[]
        this.$set(this.loneTreeNewForm,'btmTypeName',this.btmName ||this.btmId)
        this.$set(this.loneTreeNewForm,'btmTypeId',this.btmId)
        this.$emit('MasterHandler',this.loneTreeNewForm)
      }
    },
    //业务类型查询
    BtmSelectFindeHandler(){
      const masterParameter = {};
      masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd;
      this.btmdefaultRend(masterParameter);
    },
    //业务类型多选
    btmSelect(row){
      this.btmSelectList=row;
      this.btmName=row.name;
      this.btmOid=row.oid;
      this.btmId=row.id;
    },
    //业务类型接口
    btmdefaultRend(masterParameter){
      referDataGrid({valueField:'id',isMuti:'false','limit':'-1',...masterParameter}).then(res=>{
        this.BtmData=res.data.data.records
      })
    }
  }
}
</script>
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -4,18 +4,34 @@
    <!--    å·¦ä¾§èœå•-->
    <el-aside>
      <basic-container>
        <div  style="height: calc(100vh - 142px);!important;">
        <div style="height: calc(100vh - 142px);!important;">
          <div class="headerCon" style="display: flex; flex-wrap: wrap;margin-bottom: 5px">
            <el-button v-if="permissionList.TreeAddStatus" plain size="small" type="primary" @click="TreeAdd">添加</el-button>
            <el-button v-if="permissionList.TreeEditStatus" plain size="small" type="primary" @click="TreeEdit">修改</el-button>
            <el-button v-if="permissionList.TreeDelStatus" plain size="small" type="primary" @click="TreeDel">删除</el-button>
            <el-button v-if="permissionList.flushedStatus" plain size="small" type="primary" @click="flushed">刷新</el-button>
            <el-button v-if="permissionList.EnableStatus" plain size="small" type="primary" @click="Enable">启用</el-button>
            <el-button v-if="permissionList.DeactivateStatus" plain size="small" type="primary" @click="Deactivate">停用</el-button>
            <el-button v-if="permissionList.ImportExcelStatus" plain size="small" type="primary" @click.native="ImportExcel">导入</el-button>
            <el-button v-if="permissionList.ExportExcelStatus" plain size="small" type="primary" @click="ExportExcel">导出</el-button>
            <el-button style="width: 56px;text-align: center;padding-left: 3px" v-if="permissionList.flowingBtnStuatus" plain size="small" type="primary" @click="flowingDependHandler">流水处理</el-button>
            <el-button style="width: 56px;text-align: center;padding-left: 3px"  v-if="permissionList.classifyAuth" plain size="small" type="primary" @click="classifyAuthHandler">分类授权</el-button>
            <el-button v-if="permissionList.TreeAddStatus" plain size="small" type="primary" @click="TreeAdd">添加
            </el-button>
            <el-button v-if="permissionList.TreeEditStatus" plain size="small" type="primary" @click="TreeEdit">修改
            </el-button>
            <el-button v-if="permissionList.TreeDelStatus" plain size="small" type="primary" @click="TreeDel">删除
            </el-button>
            <el-button v-if="permissionList.flushedStatus" plain size="small" type="primary" @click="flushed">刷新
            </el-button>
            <el-button v-if="permissionList.EnableStatus" plain size="small" type="primary" @click="Enable">启用
            </el-button>
            <el-button v-if="permissionList.DeactivateStatus" plain size="small" type="primary" @click="Deactivate">停用
            </el-button>
            <el-button v-if="permissionList.ImportExcelStatus" plain size="small" type="primary"
                       @click.native="ImportExcel">导入
            </el-button>
            <el-button v-if="permissionList.ExportExcelStatus" plain size="small" type="primary" @click="ExportExcel">
              å¯¼å‡º
            </el-button>
            <el-button v-if="permissionList.flowingBtnStuatus" plain
                       size="small" style="width: 56px;text-align: center;padding-left: 3px" type="primary"
                       @click="flowingDependHandler">流水处理
            </el-button>
            <el-button v-if="permissionList.classifyAuth" plain size="small"
                       style="width: 56px;text-align: center;padding-left: 3px" type="primary"
                       @click="classifyAuthHandler">分类授权
            </el-button>
          </div>
          <!-- å·¦ä¾§æ ‘-->
@@ -253,147 +269,58 @@
              </template>
          </avue-crud>
          </basic-container>
          <templatePro :Formlist="this.Formlist" :ProData="this.ProData" :codeClassifyOid="this.codeClassifyOid"
                       :crudArray="this.crudArray" :crudLCStatus="this.crudLCStatus" :crudOid="this.crudOid"
                       :rowIndex="this.selectRow" :btnAuthList="btnAuthList"></templatePro>
          <templatePro :Formlist="this.Formlist" :ProData="this.ProData" :btnAuthList="btnAuthList"
                       :codeClassifyOid="this.codeClassifyOid" :crudArray="this.crudArray"
                       :crudLCStatus="this.crudLCStatus"
                       :crudOid="this.crudOid" :rowIndex="this.selectRow"></templatePro>
        </span>
        <!--     ç¼–码规则-->
        <el-dialog :before-close="masterEscHandler" :visible.sync="MasterdialogVisible" append-to-body
                   title="为【编码规则】选取值">
          <template>
            <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px">
              <el-option
                v-for="item in SelectOption"
                :key="item.value"
                :label="item.label"
                :value="item.value"
                style="width: 150px">
              </el-option>
            </el-select>
            <el-input v-model="SelectFInd" placeholder="输入值后进行模糊查询" style="width: 260px;margin-left: 15px"></el-input>
            <el-button plain size="small" style="margin-left: 20px" type="primary" @click="SelectFindeHandler">查询
            </el-button>
          </template>
          <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 #eeeeee;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">
              <el-button size="small" type="primary" @click="MasterHandlerClick">确定</el-button>
              <el-button size="small" @click="masterEscHandler">取消</el-button>
            </div>
          </div>
        </el-dialog>
        <ThemeChildren
          ref="ThemeMasterChildren"
          :SelectOption="SelectOption"
          :TreeAddform="TreeAddform"
          :visible.sync="MasterdialogVisible"
          code-lcstatus="Released"
          codeName="codeRuleOidName"
          codeType="coderule"
          dialogTitle="编码规则"
          @defineHandler="handlerDefine"
        ></ThemeChildren>
        <!--      å…³é”®å±žæ€§æŸ¥è¯¢è§„则-->
        <el-dialog :before-close="KeyEscHandler" :visible.sync="KeydialogVisible" append-to-body title="为【关键属性查询规则】选取值">
          <template>
            <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px">
              <el-option
                v-for="item in SelectOption"
                :key="item.value"
                :label="item.label"
                :value="item.value"
                style="width: 150px">
              </el-option>
            </el-select>
            <el-input v-model="SelectFInd" placeholder="输入值后进行模糊查询" style="width: 260px;margin-left: 15px"></el-input>
            <el-button plain size="small" style="margin-left: 20px" type="primary" @click="KeySelectFindeHandler">查询
            </el-button>
          </template>
          <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 #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">
              <el-button size="small" type="primary" @click="KeyHandlerClick">确定</el-button>
              <el-button size="small" @click="KeyEscHandler">取消</el-button>
            </div>
          </div>
        </el-dialog>
        <!--      ç›¸ä¼¼é¡¹æŸ¥è¯¢è§„则-->
        <el-dialog :before-close="simEscHandler" :visible.sync="SimidialogVisible" append-to-body title="为【相似项查询规则】选取值">
          <template>
            <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px">
              <el-option
                v-for="item in SelectOption"
                :key="item.value"
                :label="item.label"
                :value="item.value"
                style="width: 150px">
              </el-option>
            </el-select>
            <el-input v-model="SelectFInd" placeholder="输入值后进行模糊查询" style="width: 260px;margin-left: 15px"></el-input>
            <el-button plain size="small" style="margin-left: 20px" type="primary" @click="SimSelectFindeHandler">查询
            </el-button>
          </template>
          <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.TreeAddform.codeResembleRuleOidName == '' ? '未设置值' : this.TreeAddform.codeResembleRuleOidName
              }}]
            </div>
            <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden">
              <el-button size="small" type="primary" @click="simHandlerClick">确定</el-button>
              <el-button size="small" @click="simEscHandler">取消</el-button>
            </div>
          </div>
        </el-dialog>
        <!--        ä¸šåŠ¡ç±»åž‹-->
        <el-dialog :before-close="BtmEscHandler" :visible.sync="BtmdialogVisible" append-to-body title="为【业务类型规则】选取值">
          <template>
            <el-select v-model="SelectValue" placeholder="请选择" style="width: 135px !important;">
              <el-option
                v-for="item in masterSelectOption"
                :key="item.value"
                :label="item.label"
                :value="item.value"
                style="width: 130px">
              </el-option>
            </el-select>
            <el-input v-model="SelectFInd" placeholder="输入值后进行模糊查询" style="width: 260px;margin-left: 15px"></el-input>
            <el-button plain size="small" style="margin-left: 20px" type="primary" @click="BtmSelectFindeHandler">查询
            </el-button>
          </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>
            </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">
              <el-button size="small" type="primary" @click="btmHandlerClick">确定</el-button>
              <el-button size="small" @click="BtmEscHandler">取消</el-button>
            </div>
          </div>
        </el-dialog>
        <ThemeChildren
          ref="ThemeKeyChildren"
          :SelectOption="SelectOption"
          :TreeAddform="TreeAddform"
          :visible.sync="KeydialogVisible"
          code-lcstatus="Enabled"
          codeName="codeKeyAttrRepeatOidName"
          codeType="codekeyattrrepeat"
          dialogTitle="关键属性查询规则"
          @defineHandler="handlerDefine"
        ></ThemeChildren>
        <!--      ç›¸ä¼¼é¡¹æŸ¥è¯¢è§„则 -->
        <ThemeChildren
          ref="ThemeSimChildren"
          :SelectOption="SelectOption"
          :TreeAddform="TreeAddform"
          :visible.sync="SimidialogVisible"
          code-lcstatus="Enabled"
          codeName="codeResembleRuleOidName"
          codeType="coderesemblerule"
          dialogTitle="相似项查询规则"
          @defineHandler="handlerDefine"
        ></ThemeChildren>
        <!--        ä¸šåŠ¡ç±»åž‹ -->
        <ThemeChildren
          ref="ThemeBtmChildren"
          :SelectOption="btmSelectOption"
          :TreeAddform="TreeAddform"
          :visible.sync="BtmdialogVisible"
          codeName="btmTypeName"
          codeType="btmCode"
          dialogTitle="业务类型"
          @defineHandler="handlerDefine"
        ></ThemeChildren>
        <!--        å¯¼å‡º-->
        <ThemeImport :codeClassifyOid="this.codeClassifyOid" :visible.sync="ThemeImportVisible"></ThemeImport>
      </basic-container>
@@ -428,9 +355,10 @@
import {mapGetters} from "vuex";
import ClassifyAuth from './ClassifyAuthDialog.vue';
import {getAuthButtonList} from '@/api/system/classifyAuth'
import ThemeChildren from '@/components/FormTemplate/ThemeChildren'
export default {
  components: {ClassifyAuth},
  components: {ClassifyAuth, ThemeChildren},
  name: "classifyTrees.vue",
  data() {
    return {
@@ -450,86 +378,12 @@
      editTreeFLagCode: false,
      //编码规则
      MasterdialogVisible: false,
      masterData: [],
      masterSelectList: [],
      masterName: "",
      masterOid: "",
      //关键属性btmTypeId
      //关键属性
      KeydialogVisible: false,
      KeyName: "",
      KeyOid: "",
      KeyData: [],
      KeySelectLIst: [],
      //相似项
      simName: "",
      simOid: "",
      simData: [],
      SimidialogVisible: false,
      simSelectList: [],
      //业务类型
      btmName: "",
      btmOid: "",
      BtmData: [],
      BtmdialogVisible: false,
      btmSelectList: [],
      masterOption: {
        addBtn: false,
        index: true,
        refreshBtn: false,
        columnBtn: false,
        border: true,
        menu: false,
        height: 380,
        column: [
          {
            label: '',
            prop: 'radio',
            width: 60,
            display: false
          },
          {
            label: '业务类型编号',
            prop: 'id'
          },
          {
            label: '业务类型名称',
            prop: 'name'
          },
          {
            label: '描述',
            prop: 'description'
          }
        ]
      },
      Option: {
        addBtn: false,
        index: true,
        columnBtn: false,
        refreshBtn: false,
        border: true,
        menu: false,
        height: 380,
        column: [
          {
            label: '',
            prop: 'radio',
            width: 60,
            display: false
          },
          {
            label: '英文名称',
            prop: 'id'
          },
          {
            label: '中文名称',
            prop: 'name'
          },
          {
            label: '描述',
            prop: 'description'
          }
        ]
      },
      SelectOption: [
        {
          value: 'name',
@@ -540,7 +394,7 @@
          label: '英文名称'
        }
      ],
      masterSelectOption: [
      btmSelectOption: [
        {
          value: 'id',
          label: '业务类型编号'
@@ -550,8 +404,6 @@
          label: '业务类型名称'
        },
      ],
      SelectValue: "id",
      SelectFInd: "",
      addFlag: false,
      // è¡¨æ ¼å½“前行id
      crudOid: "",
@@ -922,34 +774,6 @@
    switchChange() {
      this.TreeAddform.isParticipateCheck = this.TreeAddform.codeKeyAttrValue === true ? 1 : 0;
    },
    //存储的业务类型关闭
    BtmEscHandler() {
      this.SelectFInd = '';
      this.SelectValue = 'id';
      this.masterRow = null;
      this.BtmdialogVisible = false;
    },
    //相似项关闭
    simEscHandler() {
      this.SelectFInd = '';
      this.SelectValue = 'id';
      this.masterRow = null;
      this.SimidialogVisible = false;
    },
    //关键属性关闭
    KeyEscHandler() {
      this.SelectFInd = '';
      this.SelectValue = 'id';
      this.masterRow = null;
      this.KeydialogVisible = false;
    },
    //编码规则关闭
    masterEscHandler() {
      this.SelectFInd = '';
      this.SelectValue = 'id';
      this.masterRow = null;
      this.MasterdialogVisible = false;
    },
    // å…³é—­å¼¹çª—
    /** å¯¼å…¥ */
    ImportExcel() {
@@ -965,179 +789,56 @@
        this.$message.warning('请先选择要导出的主题库分类')
      }
    },
    //树新增参照子组件事件
    handlerDefine(val) {
      const codeTypeMap = {
        coderule: {
          nameKey: 'codeRuleOidName',
          oidKey: 'codeRuleOid'
        },
        codekeyattrrepeat: {
          nameKey: 'codeKeyAttrRepeatOidName',
          oidKey: 'codeKeyAttrRepeatOid'
        },
        coderesemblerule: {
          nameKey: 'codeResembleRuleOidName',
          oidKey: 'codeResembleRuleOid'
        },
        btmCode: {
          nameKey: 'btmTypeName',
          oidKey: 'btmTypeId',
          clearValidate: true
        }
      };
      const codeType = codeTypeMap[val.codeType];
      if (codeType) {
        if (codeType.clearValidate) {
          this.$refs.myForm.clearValidate();
        }
        this.$set(this.TreeAddform, codeType.nameKey, val.crudName);
        this.$set(this.TreeAddform, codeType.oidKey, val.crudOid);
      }
    },
    //编码规则失焦
    CodeFoucus() {
      this.MasterdialogVisible = true;
      this.MasterdefaultRend()
      this.$refs.ThemeMasterChildren.defaultSearchRend()
    },
    //编码多选
    masterSelect(row) {
      this.masterRow = row.$index;
      this.masterSelectList = row;
      this.masterName = row.name;
      this.masterOid = row.oid;
    },
    //编码规则查询
    SelectFindeHandler() {
      const masterParameter = {};
      masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd;
      this.MasterdefaultRend(masterParameter)
    },
    //编码规则确定
    MasterHandlerClick() {
      if (this.masterSelectList.length > 1) {
        this.$message.warning('只能选择一条数据')
      } else if (this.masterSelectList.length <= 0) {
        this.$message.warning('请选择一条数据')
      } else {
        this.MasterdialogVisible = false;
        this.masterSelectList = []
        this.$set(this.TreeAddform, 'codeRuleOidName', this.masterName)
        this.$set(this.TreeAddform, 'codeRuleOid', this.masterOid)
        this.$emit('MasterHandler', this.loneTreeNewForm)
        this.masterRow = null;
      }
    },
    //编码接口
    MasterdefaultRend(masterParameter) {
      defaultReferDataGrid({
        referType: 'coderule',
        isMuti: 'false',
        'conditionMap["lcstatus"]': 'Released',
        'limit': '-1',
        ...masterParameter
      }).then(res => {
        this.masterData = res.data.records;
      })
    },
    //关键属性失焦
    Keyfouce() {
      this.KeydialogVisible = true;
      this.KeydefaultRend()
      this.$refs.ThemeKeyChildren.defaultSearchRend();
    },
    //关键属性确定
    KeyHandlerClick() {
      if (this.KeySelectLIst.length > 1) {
        this.$message.warning('只能选择一条数据')
      } else if (this.KeySelectLIst.length <= 0) {
        this.$message.warning('请选择一条数据')
      } else {
        this.KeydialogVisible = false;
        this.KeySelectLIst = []
        this.$set(this.TreeAddform, 'codeKeyAttrRepeatOidName', this.KeyName)
        this.$set(this.TreeAddform, 'codeKeyAttrRepeatOid', this.KeyOid)
        this.masterRow = null;
      }
    },
    //关键属性查询
    KeySelectFindeHandler() {
      const masterParameter = {};
      masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd;
      this.KeydefaultRend(masterParameter)
    },
    //关键属性接口
    KeydefaultRend(masterParameter) {
      defaultReferDataGrid({
        referType: 'codekeyattrrepeat',
        isMuti: 'false',
        'conditionMap["lcstatus"]': 'Enabled',
        'limit': '-1',
        ...masterParameter
      }).then(res => {
        this.KeyData = res.data.records;
      })
    },
    // å…³é”®å¤šé€‰
    KeySelect(row) {
      this.masterRow = row.$index;
      this.KeySelectLIst = row;
      this.KeyName = row.name;
      this.KeyOid = row.oid;
    },
    //关键失焦
    //相似项失焦
    simFouce() {
      this.SimidialogVisible = true;
      this.simdefaultRend()
    },
    //相似项确定
    simHandlerClick() {
      if (this.simSelectList.length > 1) {
        this.$message.warning('只能选择一条数据')
      } else if (this.simSelectList.length <= 0) {
        this.$message.warning('请选择一条数据')
      } else {
        this.SimidialogVisible = false;
        this.simSelectList = []
        this.$set(this.TreeAddform, 'codeResembleRuleOidName', this.simName)
        this.$set(this.TreeAddform, 'codeResembleRuleOid', this.simOid)
        this.$emit('MasterHandler', this.loneTreeNewForm)
        this.masterRow = null;
      }
    },
    //相似项查询
    SimSelectFindeHandler() {
      const masterParameter = {};
      masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd;
      this.simdefaultRend(masterParameter)
    },
    //  ç›¸ä¼¼é¡¹å¤šé€‰
    simSelect(row) {
      this.masterRow = row.$index;
      this.simSelectList = row;
      this.simName = row.name;
      this.simOid = row.oid;
    },
    //相似项项接口
    simdefaultRend(masterParameter) {
      defaultReferDataGrid({
        referType: 'coderesemblerule',
        isMuti: 'false',
        'conditionMap["lcstatus"]': 'Enabled',
        'limit': '-1',
        ...masterParameter
      }).then(res => {
        this.simData = res.data.records;
      })
      this.$refs.ThemeSimChildren.defaultSearchRend();
    },
    //业务类型失焦
    btmFoucus() {
      this.BtmdialogVisible = true;
      this.btmdefaultRend()
    },
    //业务类型确定
    btmHandlerClick() {
      if (this.btmSelectList.length > 1) {
        this.$message.warning('只能选择一条数据')
      } else if (this.btmSelectList.length <= 0) {
        this.$message.warning('请选择一条数据')
      } else {
        this.$refs.myForm.clearValidate();
        this.BtmdialogVisible = false;
        this.btmSelectList = []
        this.$set(this.TreeAddform, 'btmTypeName', this.btmName)
        this.$set(this.TreeAddform, 'btmTypeId', this.btmOid)
        this.$emit('MasterHandler', this.loneTreeNewForm)
        this.masterRow = null;
      }
    },
    //业务类型查询
    BtmSelectFindeHandler() {
      const masterParameter = {};
      masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd;
      this.btmdefaultRend(masterParameter);
    },
    //业务类型多选
    btmSelect(row) {
      this.masterRow = row.$index;
      this.btmSelectList = row;
      this.btmName = row.name;
      this.btmOid = row.id;
    },
    //业务类型接口
    btmdefaultRend(masterParameter) {
      referDataGrid({valueField: 'id', isMuti: 'false', 'limit': '-1', ...masterParameter}).then(res => {
        this.BtmData = res.data.data.records
      })
      this.$refs.ThemeBtmChildren.btmDefaultRend();
    },
    //子传父
    MasterHandler(val) {
@@ -1763,17 +1464,20 @@
  width: 500px;
}
.headerCon{
  .el-button+.el-button {
.headerCon {
  .el-button + .el-button {
    margin-left: 5px;
  }
  .el-button {
    margin-top: 5px;
  }
}
.headerCon > .el-button:nth-child(5) {
  margin-left: 0;
}
.headerCon > .el-button:nth-child(9) {
  margin-left: 0;
}