Source/UBCS-WEB/src/views/code/code.vue
@@ -92,7 +92,7 @@
            @click="handleRange">
            使用范围
          </el-button>
          <el-button
          <el-button
              size="small"
              icon="icon-qingkong"
              plain
@@ -118,7 +118,7 @@
      width="800px"
      style="height: 116vh; margin-top: -10vh;">
      <avue-crud
        :option="dialogeOption"
        :option="dialogeOption"
        :table-loading="dialogLoading"
        :data="useRangeData"
        @refresh-change="refreshUseRangeChange">
@@ -300,6 +300,7 @@
            size="small"
            icon="el-icon-search"
            plain
            :disabled="selectionList.length <= 0"
            @click="openAdvancedQuery('codeBasicSec')">
            高级查询
        </el-button>
@@ -325,8 +326,8 @@
                <basic-container>
                  <div class="abox" style="height:54vh">
                    <avue-tree
                      :data="classifyValueTreeData"
                      :option="classisyValueTreeOption"
                      :data="classifyValueTreeData"
                      :option="classisyValueTreeOption"
                      @node-click="classisyValueTreeOnodeClick"
                      style="overflow-y: auto; height: 54vh"/>
                  </div>
@@ -430,7 +431,7 @@
            <el-form-item label="码段名称:" :label-width="leftFormLabelWidth" required>
              <el-input ref="name"  v-model="form.name" :readonly="basicSecOnlyRead"></el-input>
            </el-form-item>
            <el-form-item label="码段类型" :label-width="leftFormLabelWidth" required>
              <el-select v-model="form.secType" placeholder="请选择" @change="changeSectypeFormItems(null)" :disabled="basicSecOnlyRead">
                <el-option
@@ -488,7 +489,7 @@
                </el-input>
              </el-form-item>
              <el-form-item label="属性所在分类:" :label-width="rightFormLabelWidth">
                <el-input
                <el-input
                  v-model="form.referCodeClassifyOidName"
                  disabled>
              </el-input>
@@ -527,7 +528,7 @@
                </el-select>
              </el-form-item>
              <el-form-item label="补位时的字符:" :label-width="rightFormLabelWidth">
                <el-select v-model="form.codeFillSeparatorSelect" @blur="inputSelectBlur" filterable placeholder="请选择" :disabled="basicSecOnlyRead">
                <el-select v-model="form.codeFillSeparator" @blur="inputSelectBlur" filterable placeholder="请选择" :disabled="basicSecOnlyRead">
                  <el-option
                    v-for="item in enumParam.codeFillSeparator"
                    :key="item.itemValue"
@@ -565,7 +566,7 @@
                <el-input v-model.number="form.codeLevelValue" ref="codeLevelValue"  :readonly="basicSecOnlyRead"></el-input>
              </el-form-item>
              <el-form-item label="字符截取类型:" :label-width="rightFormLabelWidth" required>
                <el-select v-model="form.valueCutType" placeholder="请选择" :disabled="basicSecOnlyRead">
                <el-select v-model="form.valueCutType" placeholder="请选择" :disabled="basicSecOnlyRead" @change="changeCutType($event)">
                  <el-option
                    v-for="item in enumParam.codeCutType"
                    :key="item.itemValue"
@@ -573,6 +574,9 @@
                    :value="item.itemValue">
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item id="ShowOrHide" v-mode="showCutLength" v-if="showCutLength==true" label="值截取长度:" :label-width="rightFormLabelWidth">
                <el-input v-model.number="form.valueCutLength" ref="valueCutLength"  :readonly="basicSecOnlyRead"></el-input>
              </el-form-item>
              <el-form-item label="取值类型:" :label-width="rightFormLabelWidth">
                <el-select v-model="form.codeGetValueType" placeholder="请选择" :disabled="basicSecOnlyRead">
@@ -589,7 +593,7 @@
            <div v-show="form.secType==='coderefersec' ? true:false">
              <el-form-item label="参照引用的业务类型:" label-width="152px" required>
                <el-input
                  ref="referBtmId"
                  ref="referBtmId"
                  placeholder="请选择"
                  prefix-icon="el-icon-search"
                  readonly="true"
@@ -601,7 +605,7 @@
              </el-form-item>
              <el-form-item label="参照配置:" label-width="152px" required>
                <el-input
                  ref="referConfig"
                  ref="referConfig"
                  placeholder="请选择"
                  prefix-icon="el-icon-search"
                  readonly="true"
@@ -664,7 +668,7 @@
                </el-select>
              </el-form-item>
              <el-form-item label="补位时的字符:" :label-width="rightFormLabelWidth">
                <el-select v-model="form.codeFillSeparatorSelect" filterable @blur="inputSelectBlur" placeholder="请选择" :disabled="basicSecOnlyRead">
                <el-select v-model="form.codeFillSeparator" filterable @blur="inputSelectBlur" placeholder="请选择" :disabled="basicSecOnlyRead">
                  <el-option
                    v-for="item in enumParam.codeFillSeparator"
                    :key="item.itemValue"
@@ -730,9 +734,9 @@
      </el-dialog>
      <!-- 第二层对话框,属性码段,公式编辑框对话框组件 -->
      <formula-editor
        ref="formulaEditor"
        @updateFormulaContent="updateFormulaContent"
      <formula-editor
        ref="formulaEditor"
        @updateFormulaContent="updateFormulaContent"
        :thisSceneTableData="formulaEditorParams.thisSceneTableData"
        :visible.sync="formulaEditorParams.formulaEditorSettingBox"
        :systemVariableTableData="formulaEditorParams.systemVariableTableData">
@@ -748,7 +752,7 @@
        <avue-crud
          :page.sync="parentClsfyParams.parentClassifyDataPage"
          :ref="parentClsfyParams.ref"
          :option="parentClsfyParams.parentClassifyParentOption"
          :option="parentClsfyParams.parentClassifyParentOption"
          :table-loading="parentClsfyParams.classifyDialogLoading"
          :data="parentClsfyParams.parentClassifyData"
          @refresh-change="refreshParentClassifyDataChange"
@@ -778,6 +782,7 @@
        ref="referConfigFormDialog"
        @echoReferConfig="echoReferConfig">
      </refer-config-form-dialog>
      <!-- 第二层对话框,直接选择参照配置crud组件 -->
      <refer-config-crud-dialog
        ref="referConfigCrudDialog"
@@ -792,12 +797,12 @@
<script>
  import { gridCodeRule, getDetail, add, update, remove, listUseRange, updateStatus,clone,clearAllCode } from "@/api/code/mdmrule";
  import {
    gridCodeBasicSec,
    downOrderNum,
    upOrderNum,
    deleteData,
    editSave,
  import {
    gridCodeBasicSec,
    downOrderNum,
    upOrderNum,
    deleteData,
    editSave,
    cloneCodeBasic,
    addSave,
    refDataGridClassifySec,
@@ -833,6 +838,7 @@
            total: 0
          },
          selectionList: [],
          showCutLength: false,
          /*编码规则表格配置*/
          optionRule: optionRule,
          data: [],
@@ -908,7 +914,7 @@
            codeFixedSecOid: "",
            description: "",
            id: "",
          },
          },
          isShowFixedForm: true, //true显示固定码段码值管理界面,false显示分类码段码值管理界面
          fixedValueData: [], //固定码段码值表格数据
          fixedValueOption: fixedValueOption, //表格配置
@@ -933,7 +939,7 @@
          treeOption: treeOption,
          currentSelectTreeData: '', //当前选中的树节点
          /* 为属性选值右侧表格相关数据 */
          selectAttrParams: {
            ref: "selectionAttrCrud",
            attrOption: attrOption,
@@ -1011,7 +1017,7 @@
            ],
            formulaEditorSettingBox: false,
          },
          /* 父分类码段对话框 */
          parentClsfyParams: {
            ref: 'crudParentClassify',
@@ -1028,7 +1034,7 @@
            parentClassifyQuery: {}, //查询条件
            parentClassifySelectionList: [], //当前选中行
          },
          /** 参照引用的业务类型对话框相关数据 */
          referBtmDialogParams: {
            ref: 'crudReferBtm',
@@ -1048,7 +1054,7 @@
            componentCodeFlag: false, //是否参与编码
            pkCodeRule: '', //所属编码规则
          },
          //枚举和可输可选查询
          enumParam: {
            secTypeList:[],    //码段类型
@@ -1104,7 +1110,6 @@
            //console.log(conditionMaps);
          }
        },
        /* 公式编辑框内容改变,子组件编辑完公式之后内容回显时调用 */
        updateFormulaContent(content){
          this.form.getValueClass = content;
@@ -1112,20 +1117,21 @@
        /* 引用码段参照配置,子组件填完参照配置之后内容回显时调用 */
        echoReferConfig(content){
          // console.log(content.referTypeName);
          this.form.referBtmId = content.referType;
          this.form.referBtmName = content.referTypeName;
          this.form.referBtmId = content.referType || '';
          this.form.referBtmName = content.referTypeName || content.referType;
          //转换成JSON字符串进行父组件回显
          let submitFormJson = JSON.stringify(content);
          this.form.referConfig = submitFormJson;
          this.form.referConfig = submitFormJson || '';
          this.form.referValueInfo = submitFormJson || '';
        },
        /** 引用码段为【参照引用的业务类型】选取值之后的内容回显时调用 */
        echoReferBtmType(content){
            // 实现回显
            this.form.referBtmId = content.id;
            this.form.referBtmName = content.name;
          // 实现回显
          this.form.referBtmId = content.id || '';
          this.form.referBtmName = content.name || content.id;
        },
        /** 父分类选择对话框,第二层嵌套对话框,及其相关方法 */
        /** 父分类选择对话框,第二层嵌套对话框,及其相关方法 */
        // 保存当前父分类码段的选中行,并进行回显
        saveSelectedParentClassify(){
          //console.log(this.parentClsfyParams.parentClassifySelectionList.length);
@@ -1177,10 +1183,11 @@
          let parentClsParam = this.parentClsfyParams;
          parentClsParam.classifyDialogLoading = true;
          let oid = this.selectionList.length==0 ? this.form.pkCodeRule:this.selectionList[0].oid;
          let conditionMaps = this.paramsToConditionMa({"pkCodeRule":oid});
          let conditionMaps = {};
          conditionMaps['conditionMap[pkCodeRule]'] = oid;
          refDataGridClassifySec(
            page.currentPage,
            page.pageSize,
            page.currentPage,
            page.pageSize,
            conditionMaps
          ).then(res => {
            //console.log(res.data);
@@ -1191,9 +1198,9 @@
            this.parentClassifySelectionClear();
          });
        },
        /** 打开属性选取值,第二层嵌套对话框,及其相关方法 */
        /** 打开属性选取值,第二层嵌套对话框,及其相关方法 */
        // 获取当前被选中树节点的oid
        nodeClick(data) {
          this.currentSelectTreeData = data;
@@ -1263,7 +1270,7 @@
          })
          this.isShowSelectAttrOption = false;
        },
        /** 基础码段表中的码值管理的相关方法 */
        // 码值管理弹窗控制
@@ -1393,10 +1400,10 @@
                window.console.log(error);
            });
          }
        },
        //删除码值
        delCodeSecValue(condition){
        delCodeSecValue(condition){
          //固定码段码值删除
          if(condition == 'codefixedsec'){
            //console.log(this.selectedFixedOrCodeclassifyValue.oid);
@@ -1438,8 +1445,8 @@
                message: "操作成功!"
              });
            });
          }
          }
        },
        //对固定码值表进行:上移、下移、移除操作
        codeFixedValueOpetion(condition,row){
@@ -1500,7 +1507,7 @@
              saveData[0].orderNum = parseInt(saveData[0].orderNum)+1;
              saveData[1].orderNum = parseInt(saveData[1].orderNum)-1;
              this.saveCodeFixedOrClassifyValueOption('classifyValue',saveData);
            }
            }
          }
          console.log(saveData);
          console.log(this.classifyValueTreeData);
@@ -1513,10 +1520,10 @@
          */
          //说明是根节点,直接找再判断是否是边界值
          if(currentNodeTreeData.parentId.trim() == ''){
            return this.findTreeIndex(this.classifyValueTreeData,currentNodeTreeData.oid,true);
            return this.findTreeIndex(this.classifyValueTreeData,currentNodeTreeData.oid,true);
          }else{
            //说明不是根节点,先找到父节点再找到子节点,判断是否是边界值
            return this.findTreeIndex(this.classifyValueTreeData,currentNodeTreeData.parentId,false);
            return this.findTreeIndex(this.classifyValueTreeData,currentNodeTreeData.parentId,false);
          }
        },
        /**
@@ -1574,7 +1581,7 @@
            });
            this.loadClassifyValueData({"oid":this.codefixedsecOrCodeclassifysecOid});
          }
        },
        //分类码值树data加载
        loadClassifyValueData(row){
@@ -1648,15 +1655,15 @@
          this.addBasicCodeSettingBox = true;
        },
        // 新增基础码段
        saveOrEditBasicCode(){
        async saveOrEditBasicCode(){
          if(this.selectionList[0].oid == null ||  this.selectionList[0].oid == ''){
            this.$message.warning('缺失必要参数,请重新选择编码规则后再试!');
            return;
          }
          }
          this.form.pkCodeRule = this.selectionList[0].oid;
          if(this.form.oid == '' || this.form.oid == null){
            if(this.checkForm()){
              addSave(this.form).then(() => {
              await addSave(this.form).then(() => {
                this.$message({
                  type: "success",
                  message: "操作成功!"
@@ -1667,8 +1674,18 @@
              // 关闭对话框
              this.addBasicCodeSettingBox = false
            }
            // 点击新增基础码段,关闭窗口之后触发重新加载
            this.loadBasic(this.selectionList[0]);
          }else{
            // 可能参照引用的业务类型会发生改变所以这儿直接对referConfig的json进行改变
            let referConfig = JSON.parse(this.form.referConfig);
            referConfig.referType = this.form.referBtmId;
            referConfig.referTypeName = this.form.referBtmName;
            this.form.referConfig = JSON.stringify(referConfig);
            let referValueInfo = JSON.parse(this.form.referValueInfo);
            referValueInfo.referType = this.form.referBtmId;
            this.form.referValueInfo = JSON.stringify(referValueInfo);
            editSave(this.form).then(() => {
               // 关闭对话框
              this.addBasicCodeSettingBox = false
@@ -1679,9 +1696,8 @@
              }, error => {
                window.console.log(error);
            });
            this.loadBasic(this.selectionList[0]);
          }
          // 点击新增基础码段,关闭窗口之后触发重新加载
          this.loadBasic(this.selectionList[0]);
        },
        // 因为elementui的表单校验设置不上所以采用判断的方式来做表单检验方式
        checkForm(){
@@ -1755,7 +1771,7 @@
              this.$message.warning('(编码补位方式)'+tipsMsg);
              return false;
            }
            if(form.codeFillType != '不补位' && form.codeFillSeparatorSelect == ''){
            if(form.codeFillType != '不补位' && form.codeFillSeparator == ''){
              this.$message.warning('当补位方式为左补位或者右补位的时候,补位字符不能为空');
              return false;
            }
@@ -1779,11 +1795,10 @@
              this.$refs.codeFillLimit.$el.querySelector('input').focus();
              return false;
            }
            if(form.codeFillFlag == ''){
              this.$message.warning('(流水是否补码)'+tipsMsg);
              this.$refs.switch.$el.querySelector('input').focus();
              return false;
            }
            // if(form.codeFillFlag == '' || ){
            //   this.$message.warning('(流水是否补码)'+tipsMsg);
            //   return false;
            // }
          }else if(this.form.secType==='codelevelsec'){
            //层级码段
            if(form.codeLevelType == ''){
@@ -1851,7 +1866,8 @@
              this.$message.warning('(编码补位方式)'+tipsMsg);
              return false;
            }
            if(form.codeFillType != '不补位' && form.codeFillSeparatorSelect == ''){
            // console.log(form);
            if(form.codeFillType != 'code_fill_none' && form.codeFillSeparator == ''){
              this.$message.warning('当补位方式为左补位或者右补位的时候,补位字符不能为空');
              return false;
            }
@@ -1899,9 +1915,11 @@
          }
          // console.log(row.oid);
          //存储当前关联的编码规则相关信息
          this.currentCodeRuleOid = row.oid;
          this.currentRuleLcStatus = row.lcStatus;
          this.sendGridCodeBasicSec({"pkCodeRule":row.oid},false);
          if(row!='' || row!=null){
            this.currentCodeRuleOid = row.oid;
            this.currentRuleLcStatus = row.lcStatus;
            this.sendGridCodeBasicSec({"pkCodeRule":row.oid},false);
          }
        },
        // 发送加载基础码段的请求
        sendGridCodeBasicSec(condition,isAdancedQuery/** 是否高级查询 */){
@@ -1912,11 +1930,11 @@
          let conditionMaps = {};
          if(condition && !isAdancedQuery){
            Object.keys(condition).forEach(key=>{
              conditionMaps['conditionMap[pl_code_basicsec.'+key+']'] = condition[key].trim();
              conditionMaps['conditionMap['+key+']'] = condition[key].trim();
            });
          }
          if(isAdancedQuery){
            condition['conditionMap[pl_code_basicsec.pkCodeRule]'] = this.currentCodeRuleOid == null || this.currentCodeRuleOid == ''
            condition['conditionMap[pkCodeRule]'] = this.currentCodeRuleOid == null || this.currentCodeRuleOid == ''
            ? this.selectionList[0].oid:this.currentCodeRuleOid;
          }
          gridCodeBasicSec(1, -1,isAdancedQuery ? condition:conditionMaps).then(res => {
@@ -1955,21 +1973,19 @@
        },
        // 上移下移基础码段
        upOrderNum(row){
          //console.log(row.oid);
          if(!this.tipsMessage(this.selectionList)){
            return;
          }
          let codeRuleOid = this.selectionList[0].oid;
          if (this.selectionList[0].lcStatus != 'Editing') {
            this.$message.warning("只有编码规则的状态是 [编辑中] 的时候,才能调整码段顺序!");
            return;
            return;
          }
          if(row.oid==null || row.oid==''){
            this.$message.warning("未获取到必填参数!");
            return;
            return;
          }
          upOrderNum(row.oid).then(() => {
            this.loadBasic({"oid":codeRuleOid});
            this.loadBasic(this.selectionList[0]);
            this.$message({
              type: "success",
              message: "操作成功!"
@@ -1985,11 +2001,11 @@
          //console.log(this.selectionList);
          if (this.selectionList[0].lcStatus != 'Editing') {
            this.$message.warning("只有编码规则的状态是 [编辑中] 的时候,才能调整码段顺序!");
            return;
            return;
          }
          if(row.oid==null || row.oid==''){
            this.$message.warning("未获取到必填参数!");
            return;
            return;
          }
          downOrderNum(row.oid).then(() => {
            this.loadBasic({"oid":codeRuleOid});
@@ -2001,7 +2017,7 @@
        },
        // 基础码段刷新时查询
        refreshChangeBasicSec(){
          this.loadBasic({"oid":this.currentCodeRuleOid == null || this.currentCodeRuleOid == '' ? this.selectionList[0].oid:this.currentCodeRuleOid});
          this.loadBasic(this.selectionList.at(-1));
        },
        // 操作基础码段中搜索清空等按钮的显示/隐藏
        hideBasicTable(hideBoolean){
@@ -2009,18 +2025,16 @@
          this.$refs.crudBasic.option.columnBtn = hideBoolean;
          this.$refs.crudBasic.option.column[0].search = hideBoolean;
          this.$refs.crudBasic.option.column[1].search = hideBoolean;
          if(!hideBoolean){
            this.selectionList = [];
            this.basicData = [];
          }
        },
        /** 编码规则相关方法 */
        // 打开高级查询窗口
        openAdvancedQuery(condition){
          // MasterTable({
          //   codeClassifyOid: "D9CF223F-317D-71EB-BD11-433A94CAD9F3",
          //   functionId: 5,
          // }).then(res=>{
          //   console.log(res.data.tableDefineVO.seniorQueryColumns);
          // })
          if(condition=='codeRule'){
            this.advancedQueryParam.options = [
              {
@@ -2065,22 +2079,22 @@
                data: [],
                title: '码段编号',
                fieldType: 'text',
                queryField: 'pl_code_basicsec.id',
                queryField: 'id',
              },{
                data: [],
                title: '码段名称',
                fieldType: 'text',
                queryField: 'pl_code_basicsec.name',
                queryField: 'name',
              },{
                data: [],
                title: '描述',
                fieldType: 'text',
                queryField: 'pl_code_basicsec.description',
                queryField: 'description',
              },{
                data: [],
                title: '码段类型',
                fieldType: 'combox',
                queryField: 'pl_code_basicsec.secType',
                queryField: 'secType',
                comboxKey: 'codeSecType',
              }
            ]
@@ -2097,7 +2111,7 @@
          this.getRangeCodeList()
        },
        // 加载使用范围列表
        getRangeCodeList(){
        getRangeCodeList(){
          this.dialogLoading = true;
          if(this.selectionList[0].oid==null){
            this.$message.error("未获取到参数!");
@@ -2112,17 +2126,6 @@
        // 刷新使用范围列表
        refreshUseRangeChange(){
          this.getRangeCodeList();
        },
        // 单击编码规则实现行选择
        codeRuleRowClick (row) {
          // 这儿应该可以不要,因为toggleRowSelection也会触发行选择时间
          this.selectionList = row;
          this.$refs.crud.toggleSelection();
          this.$refs.crud.setCurrentRow(row);
          this.$refs.crud.toggleRowSelection(row); //选中当前行
          if(row!=''){
            this.loadBasic(row);
          }
        },
        // 启用与停用
        enableOrDeactivatse(oId,update){
@@ -2176,7 +2179,7 @@
          }, error => {
            window.console.log(error);
          });
          //console.log(data);
          //console.log(data);
        },
        // 打开从其他编码规则中克隆码段对话框
        openOtherCodeRuleDialog(){
@@ -2185,7 +2188,7 @@
          }
          if(this.selectionList[0].lcStatus != 'Editing'){
            this.$message.warning("编码规则已被引用,不允许编辑或删除!");
            return;
            return;
          }
          this.cloneOtherCodeRuleSettingBox = true;
        },
@@ -2220,7 +2223,7 @@
          this.selectionOtherCloneCodeBasicList = list;
          this.$refs.crudCloneCodeBasicOther.setCurrentRow(this.selectionOtherCloneCodeBasicList[list.length-1]);
        },
         // 从其他编码规则中克隆码段信息
        // 从其他编码规则中克隆码段信息
        saveOtherCodeBasic(){
          let oid = this.selectionList[0].oid;
          let fromDialogPkCodebasic = this.selectionOtherCloneCodeBasicList;
@@ -2238,7 +2241,7 @@
          //console.log(res);
          let oidArr = [];
          fromDialogPkCodebasic.forEach(ele => {
            oidArr.push(ele.id);
            oidArr.push(ele.oid);
          });
          let data = {
            "pkCodeRule": oid,
@@ -2360,27 +2363,44 @@
          let requestData = {};
          if(params){
            Object.keys(params).forEach(key=>{
              requestData["conditionMap"+'['+key+']'] = params[key].trim();
              requestData["conditionMap"+'['+key+'_like]'] = params[key].trim();
            });
          }
          this.query = requestData;
          this.onLoad(this.page);
          done();
        },
        },
        // 编码规则当前选中行变化的时候触发
        selectionChange(list) {
          this.selectionList = list;
          this.$refs.crud.setCurrentRow(this.selectionList[list.length-1]);
          //当前选中行为空的时候就将码段管理表格数据置空,并禁用相关功能
          if(list == ''){
            this.basicData = [];
          if(this.selectionList.length <= 0){
            this.hideBasicTable(false);
          }
          if(this.selectionList.length > 0){
          if (this.selectionList.length > 0) {
            this.$refs.crud.setCurrentRow(this.selectionList[list.length-1]);
            this.currentCodeRuleOid = this.selectionList[list.length-1].oid;
            this.currentRuleLcStatus = this.selectionList[list.length-1].lcStatus;
            this.loadBasic(this.selectionList[list.length-1]);
          }
        },
        changeCutType(value){
          if (value != 'code_cut_none'){
            this.showCutLength = true;
            if(this.form.valueCutLength == ''){
              this.form.valueCutLength = 1;
            }
          }else{
            this.form.valueCutLength = '';
            this.showCutLength = false;
          }
        },
        // 单击编码规则实现行选择
        codeRuleRowClick (row) {
          // console.log(this.currentRuleLcStatus);
          this.$refs.crud.toggleSelection();
          this.$refs.crud.toggleRowSelection(row); //选中当前行
        },
        selectionClear() {
          this.selectionList = [];
@@ -2398,8 +2418,8 @@
        onLoad(page,params={}) {
          this.loading = true;
          gridCodeRule(
            page.currentPage,
            page.pageSize,
            page.currentPage,
            page.pageSize,
            this.query
          ).then(res => {
            //console.log(res.data);
@@ -2410,8 +2430,6 @@
            // 查询的值为空时,要将码段管理相关的内容禁用
            if(data.records.length <= 0) {
              this.hideBasicTable(false);
              this.selectionList = [];
              this.basicData = [];
              return;
            }
            this.loadBasic(this.data[0])
@@ -2506,13 +2524,13 @@
        },
        // 补位时的字符,实现可输可选
        inputSelectBlur(e){
          if (e.target.value) {
            this.form.codeFillSeparatorSelect = e.target.value;
          if (e.target.value) {
            this.form.codeFillSeparator = e.target.value;
          }
        },
        // 码段类型改变时,增加对应的form表单中的属性
        changeSectypeFormItems(row){
          //console.log(row);
        changeSectypeFormItems(row){
          //console.log(row);
          if(this.enumParam.secTypeList.length==0){
            this.loadCodeSecType();
          }
@@ -2568,8 +2586,8 @@
              serialStart: row!=null&&row.serialStart != '' ? row.serialStart:1,  //流水号起始值
              serialStep: row!=null&&row.serialStep != '' ? row.serialStep:1,   //流水的步长
              codeFillType: row!=null&&row.codeFillType != '' ? row.codeFillType:'code_fill_left', //编码补位方式
              codeFillSeparatorSelect: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparatorSelect:0,    //补位时的字符,选中的下拉框的下标
              codeFillSeparator: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparator:0,          //补位时的字符
              // codeFillSeparatorSelect: row!=null&&row.codeFillSeparatorSelect != '' ? row.codeFillSeparatorSelect:0,    //补位时的字符,选中的下拉框的下标
              codeFillSeparator: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparator:'0',          //补位时的字符
              codeFillLength: row!=null&&row.codeFillLength != '' ? row.codeFillLength:'',              //填充长度
              codeFillLimit: row!=null&&row.codeFillLimit != '' ? row.codeFillLimit:'',               //流水上限
              codeFillFlag: row!=null&&row.codeFillFlag != '' ? row.codeFillFlag=='true' ?  true:false :false,      //流水是否补码
@@ -2586,6 +2604,12 @@
              valueCutLength: row!=null&&row.valueCutLength != '' ? row.valueCutLength:'',    //
              codeGetValueType: row!=null&&row.codeGetValueType != '' ? row.codeGetValueType:'code_get_value_all_up',  //取值类型 枚举查询
            });
            if(this.form.valueCutType === 'code_cut_none'){
              this.showCutLength = false;
            }else{
              this.showCutLength = true;
            }
            this.loadCodeLevelType();
            this.loadCodeCutType();
            this.loadCodeGetValueType();
@@ -2595,6 +2619,7 @@
              referBtmId: row!=null&&row.referBtmId != '' ? row.referBtmId:'',   //参照引用的业务类型,的id
              referBtmName: row!=null&&row.referBtmName != '' ? row.referBtmName:'', //参照引用的业务类型
              referConfig: row!=null&&row.referConfig != '' ? row.referConfig:'',  //参照配置
              referValueInfo: row!=null&&row.referValueInfo != '' ? row.referValueInfo:'',  //参照配置
            });
          }else if(this.form.secType==='codedatesec'){
            //日期码段
@@ -2617,8 +2642,8 @@
            this.form = Object.assign({}, this.form,{
              codeSecLength: row!=null&&row.codeSecLength != '' ? row.codeSecLength:'',             //码段的长度
              codeFillType: row!=null&&row.codeFillType != '' ? row.codeFillType:'code_fill_left', //编码部位方式,枚举查询
              codeFillSeparatorSelect: row!=null&&row.codeFillSeparatorSelect != '' ? row.codeFillSeparatorSelect:0,  //选中的补位时的字符的下标
              codeFillSeparator: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparator:'', //补位时的字符,可输可选查询
              // codeFillSeparatorSelect: row!=null&&row.codeFillSeparatorSelect != '' ? row.codeFillSeparatorSelect:0,  //选中的补位时的字符的下标
              codeFillSeparator: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparator:'0', //补位时的字符,可输可选查询
            });
            this.loadCodeFillType();
            this.loadCodeFillSeparator();
@@ -2648,7 +2673,13 @@
          this.enumParam.codeFillType = this.getLocalStorageEnum("codeFillType");
        },
        loadCodeFillSeparator(){
          this.enumParam.codeFillSeparator = this.getLocalStorageEnum("codeFillSeparator");
          let enumCach = JSON.parse(localStorage.getItem("codeFillSeparator"));
          if(enumCach == null) {
            getDictionary("codeFillSeparator").then(res=>{
              this.enumParam.codeFillSeparator = res.data.data;
              localStorage.setItem(key,JSON.stringify(res.data.data));
            })
          }
        },
        loadCodeLevelType(){
          this.enumParam.codeLevelType = this.getLocalStorageEnum("codeLevelType");
@@ -2659,7 +2690,7 @@
        loadCodeGetValueType(){
          this.enumParam.codeGetValueType =  this.getLocalStorageEnum("codeGetValueType");
        },
      }
  };
@@ -2674,7 +2705,7 @@
  .code-rule-crud > .avue-crud__pagination {
    padding: 14px 0 2px 20px;
  }
  .clone-input-textarea > .el-form-item__content {
    width: 495px;
  }
@@ -2694,7 +2725,7 @@
  .other-clone-coderule-crud > .el-card> .el-card__body > .avue-crud__menu {
    display: none!important;
  }
  .el-table--small .el-table__cell {
    padding: 3px 0;
  }
@@ -2736,8 +2767,8 @@
  .left > .el-form-item > .el-form-item__content > .el-input-number > .el-input > .el-input__inner {
    width:120px;
  }
  }
  .el-col>.el-card > .el-card__header {
    background: rgb(213 231 239);
    border-radius: inherit;
@@ -2792,4 +2823,4 @@
    padding: 5px 10px 10px;
 }
</style>
</style>