ludc
2023-05-23 b8886034cbd7a43911d6b24e322f604f557c1e02
Source/UBCS-WEB/src/views/code/code.vue
@@ -1,5 +1,5 @@
<template>
  <basic-container style="height: 350px;">
  <basic-container style="height: 100%;">
    <!-- 编码规则信息展示区域 -->
    <basic-container class="code-rule-container">
@@ -149,8 +149,8 @@
        </el-row>
      </div>
      <div slot="footer" class="dialog-footer" style="height: 50px; margin-top: -4vh;">
        <el-button @click="cloneSettingBox = false">取 消</el-button>
        <el-button type="primary" @click="saveCloneCodeRule">保 存</el-button>
        <el-button @click="cloneSettingBox = false">取 消</el-button>
      </div>
    </el-dialog>
    <!-- 编码规则,从其他规则克隆对话框 -->
@@ -184,13 +184,14 @@
            ref="crudCloneCodeBasicOther"
            :table-loading="loadingBasic"
            :data="basicData"
            @row-click="codeOtherCloneBasicRowClick"
            @selection-change="selectionOtherCloneCodeBasicChange">
          </avue-crud>
        </el-row>
      </div>
      <div slot="footer" class="dialog-footer" style="height: 50px; margin-top: -4vh;">
        <el-button @click="cloneOtherCodeRuleSettingBox = false">取 消</el-button>
        <el-button type="primary" @click="saveOtherCodeBasic">保 存</el-button>
        <el-button @click="cloneOtherCodeRuleSettingBox = false">取 消</el-button>
      </div>
    </el-dialog>
@@ -202,6 +203,9 @@
        ref="crudBasic"
        :table-loading="loadingBasic"
        :data="basicData"
        @row-click="codeBasicSecRowClick"
        @search-change="basicSearchChange"
        @search-reset="basicSearchReset"
        :permission="permissionList"
        @selection-change="selectionBasicChange"
        @refresh-change="refreshChangeBasicSec">
@@ -252,15 +256,19 @@
      <!-- 基础码段表格左上方按钮区域 -->
      <template slot="menuLeft" slot-scope="scope">
        <el-button type="primary"
                  size="small"
                  icon="el-icon-plus"
                  @click="addBasicCodeSec">新 增
            size="small"
            icon="el-icon-plus"
            :disabled="selectionList.length <= 0"
            @click="addBasicCodeSec">
            新 增
        </el-button>
        <el-button type="danger"
                  size="small"
                  icon="el-icon-delete"
                  plain
                  @click="deleteBasicCode(scope.row)">删 除
            size="small"
            icon="el-icon-delete"
            :disabled="selectionList.length <= 0"
            plain
            @click="deleteBasicCode(scope.row)">
            删 除
        </el-button>
      </template>
@@ -360,7 +368,7 @@
            </div>
            <div style="margin-top:20px; display: flex; align-items:center; justify-content:center;">
              <el-button :disabled="selectedFixedOrCodeclassifyValue!=''" size="mini" type="primary" icon="el-icon-circle-plus" class="button" @click="addCodeSecValue('codefixedsec')">添加</el-button>
              <el-button :disabled="selectedFixedOrCodeclassifyValue==''" size="mini" type="success" plain plain icon="el-icon-edit-outline" class="button" @click="editCodeSecValue('codefixedsec')">修改</el-button>
              <el-button :disabled="selectedFixedOrCodeclassifyValue==''" size="mini" type="success" plain icon="el-icon-edit-outline" class="button" @click="editCodeSecValue('codefixedsec')">修改</el-button>
              <el-button :disabled="selectedFixedOrCodeclassifyValue==''" size="mini" type="danger" icon="el-icon-close" class="button" @click="delCodeSecValue('codefixedsec')">删除</el-button>
              <el-button size="mini" type="warning" plain icon="el-icon-close" class="button" @click = "clearFixedOrClassifyForm('codefixedsec')">取消</el-button>
            </div>
@@ -379,8 +387,8 @@
      @close="clearBasicAddForm">
      <!--  第一层对话框,添加码段信息对话框中的内容 -->
      <div class="total" style="overflow-y: auto; height: 70vh">
        <el-form :model="form">
      <div class="add-basicsec-total" style="overflow-y: auto; height: 70vh">
        <el-form :model="form" class="add-basicsec-form">
          <span class="left">
            <el-form-item label="码段编号:" :label-width="leftFormLabelWidth" required>
              <el-input v-model="form.id" :readonly="basicSecOnlyRead" ref="id"></el-input>
@@ -394,9 +402,9 @@
              <el-select v-model="form.secType" placeholder="请选择" @change="changeSectypeFormItems(null)" :disabled="basicSecOnlyRead">
                <el-option
                  v-for="item in sectypeList"
                  :key="item.dictValue"
                  :label="item.dictValue"
                  :value="item.dictKey">
                  :key="item.itemValue"
                  :label="item.itemName"
                  :value="item.itemValue">
                </el-option>
              </el-select>
            </el-form-item>
@@ -422,9 +430,9 @@
                <el-select v-model="form.codeSecLengthType" placeholder="请选择" :disabled="basicSecOnlyRead">
                  <el-option
                  v-for="item in codeSecLengthType"
                  :key="item.dictValue"
                  :label="item.dictValue"
                  :value="item.dictKey">
                  :key="item.itemValue"
                  :label="item.itemName"
                  :value="item.itemValue">
                </el-option>
                </el-select>
              </el-form-item>
@@ -479,9 +487,9 @@
                <el-select v-model="form.codeFillType" placeholder="请选择" :disabled="basicSecOnlyRead">
                  <el-option label="左补位" value="codeattrsec"
                    v-for="item in codeFillType"
                    :key="item.dictValue"
                    :label="item.dictValue"
                    :value="item.dictKey">
                    :key="item.itemValue"
                    :label="item.itemName"
                    :value="item.itemValue">
                  </el-option>
                </el-select>
              </el-form-item>
@@ -489,9 +497,9 @@
                <el-select v-model="form.codeFillSeparatorSelect" @blur="inputSelectBlur" filterable placeholder="请选择" :disabled="basicSecOnlyRead">
                  <el-option
                    v-for="item in codeFillSeparator"
                    :key="item.dictValue"
                    :label="item.dictValue"
                    :value="item.dictKey">
                    :key="item.itemValue"
                    :label="item.itemName"
                    :value="item.itemValue">
                  </el-option>
                </el-select>
              </el-form-item>
@@ -514,9 +522,9 @@
                <el-select v-model="form.codeLevelType" placeholder="请选择" :disabled="basicSecOnlyRead">
                  <el-option
                    v-for="item in codeLevelType"
                    :key="item.dictValue"
                    :label="item.dictValue"
                    :value="item.dictKey">
                    :key="item.itemValue"
                    :label="item.itemName"
                    :value="item.itemValue">
                  </el-option>
                </el-select>
              </el-form-item>
@@ -527,9 +535,9 @@
                <el-select v-model="form.valueCutType" placeholder="请选择" :disabled="basicSecOnlyRead">
                  <el-option
                    v-for="item in codeCutType"
                    :key="item.dictValue"
                    :label="item.dictValue"
                    :value="item.dictKey">
                    :key="item.itemValue"
                    :label="item.itemName"
                    :value="item.itemValue">
                  </el-option>
                </el-select>
              </el-form-item>
@@ -537,9 +545,9 @@
                <el-select v-model="form.codeGetValueType" placeholder="请选择" :disabled="basicSecOnlyRead">
                  <el-option
                    v-for="item in codeGetValueType"
                    :key="item.dictValue"
                    :label="item.dictValue"
                    :value="item.dictKey">
                    :key="item.itemValue"
                    :label="item.itemName"
                    :value="item.itemValue">
                  </el-option>
                </el-select>
              </el-form-item>
@@ -583,9 +591,9 @@
                <el-select v-model="form.codeSecLengthType" placeholder="请选择" :disabled="basicSecOnlyRead">
                  <el-option
                    v-for="item in codeSecLengthType"
                    :key="item.dictValue"
                    :label="item.dictValue"
                    :value="item.dictKey">
                    :key="item.itemValue"
                    :label="item.itemName"
                    :value="item.itemValue">
                  </el-option>
                </el-select>
              </el-form-item>
@@ -600,7 +608,7 @@
                  placeholder="请选择"
                  prefix-icon="el-icon-search"
                  readonly="true"
                  v-model="form.parentClassifySecOid"
                  v-model="form.parentClassifySecText"
                  @focus="openAttrSelectOrGetValue('parentClassifySecOid')"
                  :disabled="basicSecOnlyRead">
                  <i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('parentClassifySecOid')" style="margin-right: 5px;cursor: pointer;"></i>
@@ -616,9 +624,9 @@
                <el-select v-model="form.codeFillType" placeholder="请选择" :disabled="basicSecOnlyRead">
                  <el-option
                      v-for="item in codeFillType"
                      :key="item.dictValue"
                      :label="item.dictValue"
                      :value="item.dictKey">
                      :key="item.itemValue"
                      :label="item.itemName"
                      :value="item.itemValue">
                  </el-option>
                </el-select>
              </el-form-item>
@@ -626,9 +634,9 @@
                <el-select v-model="form.codeFillSeparatorSelect" filterable @blur="inputSelectBlur" placeholder="请选择" :disabled="basicSecOnlyRead">
                  <el-option
                    v-for="item in codeFillSeparator"
                    :key="item.dictValue"
                    :label="item.dictValue"
                    :value="item.dictKey">
                    :key="item.itemValue"
                    :label="item.itemName"
                    :value="item.itemValue">
                  </el-option>
                </el-select>
              </el-form-item>
@@ -637,13 +645,13 @@
        </el-form>
      </div>
      <!-- 第一层对话框的按钮和,线条 -->
      <el-divider direction="horizontal"></el-divider>
      <el-divider class="horizontal-line" direction="horizontal"></el-divider>
      <div slot="footer" class="dialog-footer">
        <el-button @click="addBasicCodeSettingBox = false" v-show="showbtn">取 消</el-button>
        <el-button type="primary" @click="saveOrEditBasicCode" v-show="showbtn">保 存</el-button>
        <el-button @click="addBasicCodeSettingBox = false" v-show="showbtn">取 消</el-button>
      </div>
      <!--  第二层对话框,属性码段,属性选择弹窗 -->
      <!--  第二层对话框,属性码段,属性选择对话框 -->
      <el-dialog title="为【属性】选取值"
        append-to-body
        :visible.sync="isShowSelectAttrOption"
@@ -656,14 +664,13 @@
              <div class="box">
                <el-scrollbar style="height: auto; border-bottom-right-radius:8px ">
                  <basic-container>
                    <div class="abox">
                    <div class="treeBox">
                      <avue-tree :data="attrClassifyTreeData" :option="treeOption" @node-click="nodeClick"/>
                    </div>
                  </basic-container>
                </el-scrollbar>
              </div>
            </el-col>
            <!-- 右侧表格显示区域 -->
            <el-col span="19">
              <basic-container>
@@ -672,39 +679,37 @@
                  :data="selectattrData"
                  :option="attrOption"
                  :table-loading="selectAttrOptionLoading"
                  ref="selectionAttrCrud"
                  @search-change="selectAttrOptionSearchChange"
                  @search-reset="searchAttrReset"
                  @row-click="selectionAttrRowClick"
                  @selection-change="selectionChangeAttr">
                </avue-crud>
                </div>
              </basic-container>
            </el-col>
          </el-row>
        </div>
        <div slot="footer" class="dialog-footer">
          <el-button @click="isShowSelectAttrOption = false">取 消</el-button>
          <el-button type="primary" @click="selectedListClassifyLinkAttr">确 定</el-button>
          <el-button @click="isShowSelectAttrOption = false">取 消</el-button>
        </div>
      </el-dialog>
      <!-- 第二层对话框,属性码段,公式编辑框弹窗组件 -->
      <!-- 第二层对话框,属性码段,公式编辑框对话框组件 -->
      <formula-editor ref="formulaEditor" 
        @updateFormulaContent="updateFormulaContent" 
        :thisSceneTableData="thisSceneTableData"
        :systemVariableTableData="systemVariableTableData">
      </formula-editor>
      <!-- 第二层对话框,为【父分类码段】选取值弹窗 -->
      <!-- 第二层对话框,为【父分类码段】选取值对话框 -->
      <el-dialog title="为【父分类码段】选取值"
        append-to-body
        :visible.sync="isShowParentClassifyOption"
        width="65%"
        style="height: 150vh; margin-top: -13vh;"
        destroy-on-close>
        <avue-crud
          :page.sync="parentClassifyDataPage"
          ref="crudParentClassify"
@@ -714,26 +719,24 @@
          @refresh-change="refreshParentClassifyDataChange"
          @search-change="parentClassifySearchChange"
          @search-reset="parentClassifySearchReset"
          @row-click="parentClassifyRowClick"
          @selection-change="parentClassifySelectionChange"
          @current-change="parentClassifyCurrentChange"
          @size-change="parentClassifySizeChange"
          @on-load="parentClassifyOnLoad">
        </avue-crud>
        <div slot="footer" class="dialog-footer">
          <el-button @click="isShowParentClassifyOption = false">取 消</el-button>
          <el-button type="primary" @click="saveSelectedParentClassify">保 存</el-button>
          <el-button @click="isShowParentClassifyOption = false">取 消</el-button>
        </div>
      </el-dialog>
      <!-- 第二层对话框,为【参照引用的业务类型】选取值弹窗 -->
      <!-- 第二层对话框,为【参照引用的业务类型】选取值弹对话框 -->
      <el-dialog title="为【参照引用的业务类型】选取值"
        append-to-body
        :visible.sync="isShowSelectReferBtmOption"
        width="65%"
        style="height: 150vh; margin-top: -13vh;"
        destroy-on-close>
        style="height: 150vh; margin-top: -13vh;">
        <avue-crud
          :page.sync="referBtmDataPage"
          ref="crudReferBtm"
@@ -746,19 +749,27 @@
          @selection-change="referBtmSelectionChange"
          @current-change="referBtmCurrentChange"
          @size-change="referBtmSizeChange"
          @on-load="referBtmOnLoad">
          @row-click="referBtmRowClick">
        </avue-crud>
        <div slot="footer" class="dialog-footer">
          <el-button @click="isShowSelectReferBtmOption = false">取 消</el-button>
          <el-button type="primary" @click="saveSelectedreferBtm">保 存</el-button>
          <el-button @click="isShowSelectReferBtmOption = false">取 消</el-button>
        </div>
      </el-dialog>
      <!-- 第二层对话框,自定义参照配置Form组件 -->
      <refer-config-form-dialog
        ref="referConfigFormDialog"
        @echoReferConfig="echoReferConfig" >
      </refer-config-form-dialog>
      <!-- 第二层对话框,直接选择参照配置curd组件 -->
      <refer-config-crud-dialog
        ref="referConfigCrudDialog">
      </refer-config-crud-dialog>
    </el-dialog>
  </basic-container>
</template>
<script>
@@ -776,7 +787,7 @@
  import { treeTopCodeClassify, listClassifyLinkAttr } from "@/api/code/codeclassify";
  import { gridCodeFixedValue,addSaveCodeFixedValue,deleteCodeFixedValue,editCodeFixedValue,saveOrder } from "@/api/code/codeFixedValue";
  import { treeCodeClassifyValue,addSaveCodeClassifyValue,editCodeClassifyValue,deleteCodeClassifyValue,saveCodeClassifyValueOrder } from "@/api/code/codeClassifyValue";
  import { getDictionary } from "@/api/omd/dict";
  import { getDictionary } from "@/api/omd/enum";
  import optionBasic from "@/const/code/codebasic";
  import cloneOption from "@/const/code/cloneOption";
  import cloneBasicOption from "@/const/code/cloneBasicDialogOption";
@@ -789,7 +800,7 @@
  import referBtmOption from "@/const/code/referBtmDialog";
  import fixedValueOption from "@/const/code/fixedValueMgrDialog";
  import {mapGetters} from "vuex";
  import func from "@/util/func";
  export default {
      data() {
        return {
@@ -894,7 +905,7 @@
          },
          classisyValueTreeOption: classisyValueTreeOption, //分类码段树相关配置项
          classifyValueTreeData: [],
          currentSelectTreeData: '', //当前选中的分类码值树节点
          //currentSelectClsValueTreeData: '', //当前选中的分类码值树节点
          /* 为属性选取值窗口显示打开控制变量 */
          isShowSelectAttrOption: false,
@@ -1107,8 +1118,21 @@
        updateFormulaContent(content){
          this.form.getValueClass = content;
        },
        /* 引用码段参照配置,子组件填完参照配置之后内容回显时调用 */
        echoReferConfig(content){
          this.form.referBtmId = content.referType;
          this.form.referBtmName = content.referTypeName;
          //转换成JSON字符串进行父组件回显
          let submitFormJson = JSON.stringify(content);
          this.form.referConfig = submitFormJson;
        },
        
        /** 选中参照引用的业务类型,第二层嵌套对话框,及其相关方法  */
        /** 为参照引用的业务类型选取值,第二层嵌套对话框,及其相关方法  */
        // 表格数据刷新按钮
        referBtmDataChange(){
          this.referBtmOnLoad(this.referBtmDataPage, this.referBtmQuery);
        },
        saveSelectedreferBtm(){
          if(this.referBtmSelectionList.length != 1){
            this.$message.warning("只能选择一条数据!");
@@ -1131,9 +1155,16 @@
          this.referBtmOnLoad(this.page, params);
          done();
        },
         // 单击选中表格行时触发
        referBtmRowClick(row){
          this.$refs.crudReferBtm.toggleSelection();
          this.referBtmSelectionList = row;
          this.$refs.crudReferBtm.setCurrentRow(row);
          this.$refs.crudReferBtm.toggleRowSelection(row); //选中当前行
        },
        referBtmSelectionChange(list) {
          //console.log(list);
          this.referBtmSelectionList = list;
          this.$refs.crudReferBtm.setCurrentRow(this.referBtmSelectionList[list.length-1]);
        },
        referBtmSelectionClear() {
          this.referBtmSelectionList = [];
@@ -1150,6 +1181,10 @@
        },
        //加载中参照引用的业务类型的数据
        referBtmOnLoad(page, params = {}) {
          //表格行错位问题
          this.$nextTick(() => {
            this.$refs.crudReferBtm.doLayout();
          })
          this.referBtmDialogLoading = true;
          let oid = this.selectionList.length==0 ?  this.form.pkCodeRule:this.selectionList[0].oid;
          Object.assign(params,{pkCodeRule:oid})
@@ -1170,10 +1205,10 @@
        saveSelectedParentClassify(){
          //console.log(this.parentClassifySelectionList.length);
          if(this.parentClassifySelectionList.length != 1){
            this.$message.warning("只能选择一条数据!");
            this.$message.warning("请选择一条数据!");
            return false;
          }
          //调用子组件并传递当前选中的参数值,实现回显
          //参数值,实现回显
          this.form.parentClassifySecOid = this.parentClassifySelectionList[0].oid;
          this.form.parentClassifySecText = this.parentClassifySelectionList[0].name;
          //清空当前选中的行
@@ -1190,9 +1225,15 @@
          this.parentClassifyOnLoad(this.page, params);
          done();
        },
        parentClassifyRowClick(row){
          this.$refs.crudParentClassify.toggleSelection();
          this.parentClassifySelectionList = row;
          this.$refs.crudParentClassify.setCurrentRow(row);
          this.$refs.crudParentClassify.toggleRowSelection(row); //选中当前行
        },
        parentClassifySelectionChange(list) {
          //console.log(this.parentClassifyCurrentChange);
          this.parentClassifySelectionList = list;
          this.$refs.crudParentClassify.setCurrentRow(this.parentClassifySelectionList[list.length-1]);
        },
        parentClassifySelectionClear() {
          this.parentClassifySelectionList = [];
@@ -1229,7 +1270,8 @@
          this.loadlistClassifyLinkAttr()
        },
        // 加载分类连接属性表格数据
        loadlistClassifyLinkAttr(){
        loadlistClassifyLinkAttr(condition) {
          //这儿还需要完善
          this.selectAttrOptionLoading = true;
          listClassifyLinkAttr({"page": 1,"limit": -1,'conditionMap[codeClassifyOid]':this.currentSelectTreeData.oid}).then(res=>{
          //console.log(res.data.data);
@@ -1246,13 +1288,21 @@
        // 点击搜索后触发该事件
        selectAttrOptionSearchChange(params, done) {
          this.query = params;
          console.log(params);  //这儿需要改
          this.loadlistClassifyLinkAttr({"page":1,"limit":-1 ,'conditionMap[codeClassifyOid]':this.currentSelectTreeData.oid});
          //console.log(params);  //这儿需要改
          this.loadlistClassifyLinkAttr(Object.assign(params,{'conditionMap[codeClassifyOid]':this.currentSelectTreeData.oid}));
          done();
        },
        // 为属性选值界面,单击表格行时触发该事件
        selectionAttrRowClick(row){
          this.$refs.selectionAttrCrud.toggleSelection();
          this.selectionChangeAttrList = row;
          this.$refs.selectionAttrCrud.setCurrentRow(row);
          this.$refs.selectionAttrCrud.toggleRowSelection(row); //选中当前行
        },
        // 属性取值当前选中行发生变化时触发
        selectionChangeAttr(list){
          this.selectionChangeAttrList = list;
          this.$refs.selectionAttrCrud.setCurrentRow(this.selectionChangeAttrList[list.length-1]);
        },
        // 重置位属性选取值表格的搜索框之后的回调
        searchAttrReset() {
@@ -1261,7 +1311,7 @@
        // 为属性选取值之后的回显
        selectedListClassifyLinkAttr(){
          if(this.selectionChangeAttrList.length != 1){
            this.$message.warning("只能选择一条数据!");
            this.$message.warning("请选择一条数据!");
            return false;
          }
          //调用子组件并传递当前选中的参数值,实现回显
@@ -1609,7 +1659,7 @@
        /** 基础码段相关方法 */
        //防止打开过编辑窗口之后表单中存在值,所以需要清空,并初始化form表单属性
        clearBasicAddForm(){
          this.form = this.$options.data().form;;
          this.form = this.$options.data().form;
          // this.changeSectypeFormItems(null);
        },
        // 打开新增窗口
@@ -1624,7 +1674,7 @@
          this.openBasicDialog('add',null);
          this.loadCodeSecType();
        },
        //打开新增或编辑基础码段对话框
        // 打开新增或编辑基础码段对话框
        openBasicDialog(condition,row){
          //console.log(row);
          if(condition == 'add') {
@@ -1903,9 +1953,16 @@
          //存储当前关联的编码规则相关信息
          this.currentCodeRuleOid = row.oid;
          this.currentRuleLcStatus = row.lcStatus;
          gridCodeBasicSec(1, -1, {"pkCodeRule":row.oid}).then(res => {
          this.sendGridCodeBasicSec({"pkCodeRule":row.oid});
        },
        // 发送加载基础码段的请求
        sendGridCodeBasicSec(condition){
          // 如果当前基础码段表中的搜索按钮被隐藏,就需要在此开启
          if(this.selectionList.length>=0 && !this.$refs.crudBasic.option.column[0].search){
            this.hideBasicTable(true);
          }
          gridCodeBasicSec(1, -1, condition).then(res => {
            const data = res.data.data;
            // console.log(data);
            if(this.cloneSettingBox){
              this.cloneData = data.records;
              // console.log(tihs.cloneData);
@@ -1920,7 +1977,23 @@
        // 基础码段选中时触发
        selectionBasicChange(list) {
          this.selectionBasicList = list;
          this.$refs.crudBasic.setCurrentRow(this.selectionBasicList[list.length-1]);
          //console.log(this.selectionBasicList);
        },
        // 基础码段被单击表格行时触发
        codeBasicSecRowClick(row){
          this.$refs.crudBasic.toggleSelection();
          this.selectionBasicList = row;
          this.$refs.crudBasic.setCurrentRow(row);
          this.$refs.crudBasic.toggleRowSelection(row); //选中当前行
        },
        basicSearchChange(params, done){
          //console.log(this.$refs.crudBasic);
          this.sendGridCodeBasicSec(Object.assign(params,{"pkCodeRule":this.selectionList[this.selectionList.length-1].oid}));
          done();
        },
        basicSearchReset(){
          this.sendGridCodeBasicSec({"pkCodeRule":this.selectionList[this.selectionList.length-1].oid});
        },
        // 上移下移基础码段
        upOrderNum(row){
@@ -1968,12 +2041,19 @@
            });
          })
        },
        //基础码段查询
        // 基础码段刷新时查询
        refreshChangeBasicSec(){
          this.loadBasic({"oid":this.currentCodeRuleOid == null || this.currentCodeRuleOid == '' ? this.selectionList[0].oid:this.currentCodeRuleOid});
        },
        // 操作基础码段中搜索清空等按钮的显示/隐藏
        hideBasicTable(hideBoolean){
          this.$refs.crudBasic.option.refreshBtn = hideBoolean;
          this.$refs.crudBasic.option.columnBtn = hideBoolean;
          this.$refs.crudBasic.option.column[0].search = hideBoolean;
          this.$refs.crudBasic.option.column[1].search = hideBoolean;
        },
        /** 编码规则相关方法 */
        // 查询使用范围
        handleRange(){
@@ -1983,7 +2063,7 @@
          this.codeRangeSettingBox = true;
          this.getRangeCodeList()
        },
        //加载使用范围列表
        // 加载使用范围列表
        getRangeCodeList(){        
          this.dialogLoading = true;
          if(this.selectionList[0].oid==null){
@@ -1996,17 +2076,20 @@
            this.dialogLoading = false;
          });
        },
        //刷新使用范围列表
        // 刷新使用范围列表
        refreshUseRangeChange(){
          this.getRangeCodeList();
        },
        //单击编码规则实现行选择
        // 单击编码规则实现行选择
        codeRuleRowClick (row) {
          this.$refs.crud.toggleSelection();
          // 这儿应该可以不要,因为toggleRowSelection也会触发行选择时间
          this.selectionList = row;
          this.$refs.crud.toggleSelection();
          this.$refs.crud.setCurrentRow(row);
          this.$refs.crud.toggleRowSelection(row); //选中当前行
          this.loadBasic(row);
          if(row!=''){
            this.loadBasic(row);
          }
        },
        // 启用与停用
        enableOrDeactivatse(oId,update){
@@ -2073,26 +2156,42 @@
          }
          this.cloneOtherCodeRuleSettingBox = true;
        },
        //单击编码规则实现行选择
        codeOtherCloneRuleRowClick (row) {
        // 从其他编码规则中克隆码段对话框-单击编码规则实现行选择
        codeOtherCloneRuleRowClick(row) {
          this.$refs.crudCloneCodeRuleOther.toggleSelection();
          this.selectionOtherCloneCodeRuleList = row;
          this.$refs.crudCloneCodeRuleOther.setCurrentRow(row);
          this.$refs.crudCloneCodeRuleOther.toggleRowSelection(row); //选中当前行
          this.loadBasic(row);
        },
        // 编码规则当前选中行变化的时候触发
        // 从其他编码规则中克隆码段对话框-单击基础码段实现行选择
        codeOtherCloneBasicRowClick(row){
          this.$refs.crudCloneCodeBasicOther.toggleSelection();
          this.selectionOtherCloneCodeBasicList = row;
          this.$refs.crudCloneCodeBasicOther.setCurrentRow(row);
          this.$refs.crudCloneCodeBasicOther.toggleRowSelection(row); //选中当前行
        },
        // 从其他规则克隆码段界面中编码规则当前选中行变化的时候触发
        selectionOtherCloneCodeRuleChange(list) {
          //console.log(list);
          this.selectionOtherCloneCodeRuleList = list;
          this.$refs.crudBasic.setCurrentRow(this.selectionBasicList[list.length-1]);
          if(list == ''){
            this.basicData = [];
          }
          if(this.selectionOtherCloneCodeRuleList.length > 0){
            this.loadBasic(this.selectionOtherCloneCodeRuleList[list.length-1]);
          }
        },
        selectionOtherCloneCodeBasicChange(list){
          this.selectionOtherCloneCodeBasicList = list;
          this.selectionOtherCloneCodeBasicList = list;
          this.$refs.crudCloneCodeBasicOther.setCurrentRow(this.selectionOtherCloneCodeBasicList[list.length-1]);
        },
         // 从其他编码规则中克隆码段信息
        saveOtherCodeBasic(){
          let oid = this.selectionList[0].oid;
          let fromDialogPkCodebasic = this.selectionOtherCloneCodeBasicList;
          if(fromDialogPkCodebasic.length < 0){
          if(fromDialogPkCodebasic.length <= 0){
            this.$message.warning("请选择码段数据!");
            return;
          }
@@ -2104,13 +2203,13 @@
            return;
          }
          //console.log(res);
          let oidArr = '';
          fromDialogPkCodebasic.forEach((item) =>{
            oidArr = oidArr+","+item.oid;
          })
          let oidArr = [];
          fromDialogPkCodebasic.forEach(ele => {
            oidArr.push(ele.id);
          });
          let data = {
            "pkCodeRule": oid,
            "oidArr": oidArr,
            "oidArr": oidArr.join(","),
          }
          //console.log(data);
          cloneCodeBasic(data).then(() => {
@@ -2136,9 +2235,9 @@
          }
          let currentData = this.selectionList[0];
          this.$confirm("确定要清空码值?如果清空将不能被恢复,请谨慎!", {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning"
              confirmButtonText: "确定",
              cancelButtonText: "取消",
              type: "warning"
            })
            .then(() => {
              let ts = new Date(currentData.ts).getTime();
@@ -2152,7 +2251,6 @@
              });
            });
        },
        // 添加
        rowSave(row, done, loading) {
          add(row).then(() => {
@@ -2232,12 +2330,15 @@
        // 编码规则当前选中行变化的时候触发
        selectionChange(list) {
          this.selectionList = list;
          //console.log("selectionChange====="+list);
          this.$refs.crud.setCurrentRow(this.selectionList[list.length-1]);
          //当前选中行为空的时候就将码段管理表格数据置空
          if(list == ''){
            this.basicData = [];
            this.hideBasicTable(false);
          }
          if(this.selectionList.length > 0){
            this.currentCodeRuleOid = this.selectionList[list.length-1].oid;
            this.currentRuleLcStatus = this.selectionList[list.length-1].lcStatus;
            //console.log(this.currentRuleLcStatus);
            this.loadBasic(this.selectionList[list.length-1]);
          }
        },
@@ -2264,7 +2365,7 @@
            this.loading = false;
            this.loadBasic(this.data[0])
            this.$nextTick(() => {
              //this.$refs.crud.toggleRowSelection(this.data[0]);
              this.$refs.crud.toggleRowSelection(this.data[0]);
              this.$refs.crud.setCurrentRow(this.data[0]);
            })
            this.selectionList = data.records[0];
@@ -2274,7 +2375,7 @@
        /** 第一层对话框相关方法 */
        // 打开二层弹窗方法
        // 打开二层对话框方法
        openAttrSelectOrGetValue(condition){
          if(condition === 'attr'){
            this.isShowSelectAttrOption = true;
@@ -2285,9 +2386,46 @@
            this.isShowParentClassifyOption = true;
          }else if(condition === 'referBtmId'){
            this.isShowSelectReferBtmOption = true;
            this.refreshReferBtmDataChange();
          }else if(condition === 'referConfig'){
            //this.$emit('openSelectreferConfig')
            if(func.notEmpty(this.form.referConfig) || func.notEmpty(this.form.referBtmName)){
              this.$refs.referConfigFormDialog.isShowReferConfig = true;
              let value = {
                referTypeName: this.form.referBtmName,
                referType: this.form.referBtmId,
                referConfig: this.form.referConfig,
              }
              this.$refs.referConfigFormDialog.initPageData(value);
            }else{
              this.openTipsChooseOrCust();
            }
             //this.$refs.referConfigFormDialog.onloadAttrData();
          }
        },
        // 打开自定义参照配置或直接选择参照配置界面
        openTipsChooseOrCust(){
          this.$confirm('请选择参照配置的定义方式?','参照配置的方式', {
            distinguishCancelAndClose: true,
            closeOnClickModal: false,
            confirmButtonText: '自定义参照配置',
            cancelButtonText: '直接选择参照配置'
          })
          .then(() => {
            // 打开自定参照配置对话框
            this.$refs.referConfigFormDialog.isShowReferConfigForm = true;
            // 表格错行的问题
            this.$refs.referConfigFormDialog.onloadAttrData();
          })
          .catch(action => {
            if (action === "cancel") {
              // 打开直接选择参照配置对话框
              this.$refs.referConfigCrudDialog.isShowReferConfigCrud = true;
              this.$refs.referConfigCrudDialog.referConfigOnload();
            }
            //console.log(action);
          });
          // 让参照配置输入框失去焦点,否则该提示框无法被关闭
          this.$refs.referConfig.$el.querySelector('input').blur();
        },
        // 点击输入框的×号,清空输入框中的内容
@@ -2303,8 +2441,9 @@
            this.form.parentClassifySecOid = '';
          }else if(condition === 'referBtmId'){
            this.form.referBtmId = '';
            this.form.referConfig = '';
          }else if(condition === 'referConfig'){
            this.form.referBtmId = '';
            this.form.referConfig = '';
          }
        },
        // 补位时的字符,实现可输可选
@@ -2434,7 +2573,6 @@
            this.sectypeList = res.data.data;
          })
          this.loadCodeSecLength();
          //console.log(this.sectypeList);
        },
        loadCodeSecLength(){
          getDictionary({code: "codeSecLength"}).then(res=>{
@@ -2464,7 +2602,6 @@
        loadCodeGetValueType(){
          getDictionary({code: "codeGetValueType"}).then(res=>{
            this.codeGetValueType = res.data.data;
            //console.log(this.codeGetValueType);
          })
        },
        
@@ -2473,7 +2610,7 @@
</script>
<style scope>
<style>
  .code-rule-crud > .avue-crud__search ,.code-basic-crud > .avue-crud__search {
    margin-bottom: -15px;
@@ -2483,7 +2620,6 @@
    padding: 14px 0 2px 20px;
  }
  
  .clone-input-textarea > .el-form-item__content {
    width: 495px;
  }
@@ -2515,20 +2651,19 @@
  .basic-container > .el-card  > .el-card__body {
    margin: -10px 0;
  }
  .code-basicsec-container{
    padding: 1px 6px;
  }
  .el-divider--horizontal {
    margin-top: 19px !important;
  .horizontal-line {
    /* margin-top: 19px !important; */
    margin-bottom: -20px !important;
    width: 100%;
    height: 2px;
    margin: 0;
    position: fixed;
    width: 57.5vw;
  }
  .el-card__body > .abox {
  .el-card__body > .treeBox {
    height: 50vh;
  }
@@ -2540,11 +2675,11 @@
    width:60px;
  }
  .el-input-number {
  .left > .el-form-item > .el-form-item__content > .el-input-number {
    width: 120px;
  }
  .el-input-number >.el-input > .el-input__inner {
  .left > .el-form-item > .el-form-item__content > .el-input-number > .el-input > .el-input__inner {
    width:120px;
  } 
  
@@ -2554,34 +2689,51 @@
  }
  /** 新增码段 */
  .total{
    height: 500px;
  .add-basicsec-total {
    width: 100%;
  }
  .total .el-input__inner,.total .el-textarea__inner {
  .add-basicsec-total .el-input__inner,.add-basicsec-total .el-textarea__inner {
    width: 220px;
  }
  .el-divider--vertical {
  .add-basicsec-total > .add-basicsec-form {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: space-around;
  }
  .add-basicsec-form > .el-divider--vertical {
    width: 2px;
    height: 72vh;
    margin: 0 5px;
    position: fixed;
    height: 100%;
    margin: 0 auto;
    /* position: fixed; */
  }
 .left {
    float: left;
    width: 49%;
    /* float: left; */
    width: 45%;
    height: 100%;
 }
 .right {
    float: right;
    margin-right: 2.5vw;
    /* width: 40%; */
    /* float: right; */
    margin-right: 2vw;
    height: 100%;
    width: auto;
 }
 .right > .el-form > .el-form-item{
    margin-bottom: 8px;
 }
 /* 对话框底部按钮边框样式 */
 .el-dialog__footer{
    /* width: 100%; */
    border-top: 1px solid #E9E7E7;
    padding: 5px 10px 10px;
 }
</style>