From 7602a824e39e19260ae32bb45e799e6ce43300ac Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期五, 14 七月 2023 21:15:29 +0800
Subject: [PATCH] 参照配置组件修改

---
 Source/UBCS-WEB/src/views/code/code.vue | 1508 ++++++++++++++++++++++++++++++++-------------------------
 1 files changed, 836 insertions(+), 672 deletions(-)

diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue
index 9d36936..2c009fa 100644
--- a/Source/UBCS-WEB/src/views/code/code.vue
+++ b/Source/UBCS-WEB/src/views/code/code.vue
@@ -63,47 +63,61 @@
             @click="handleDelete">
             鍒� 闄�
           </el-button>
-          <el-button size="small"
+          <el-button type="primary"
+            size="small"
+            icon="el-icon-search"
+            plain
+            @click="openAdvancedQuery('codeRule')">
+            楂樼骇鏌ヨ
+          </el-button>
+          <el-button
+            size="small"
             icon="icon-kelong"
             plain
             @click="openCodeRuleDialog">
             鍏� 闅�
           </el-button>
-          <el-button size="small"
+          <el-button
+            size="small"
             icon="icon-lianjiekelong"
             style="font-size: 12px;"
             plain
             @click="openOtherCodeRuleDialog">
             浠庡叾浠栬鍒欎腑鍏嬮殕鐮佹
           </el-button>
-          <el-button size="small"
+          <el-button
+            size="small"
             icon="el-icon-s-help"
             plain
             @click="handleRange">
             浣跨敤鑼冨洿
           </el-button>
-          <el-button size="small"
+          <el-button
+              size="small"
               icon="icon-qingkong"
               plain
               @click="clearAllCodeSec">
               娓呯┖鐮佸��
           </el-button>
-          <el-button size="small"
-            icon="el-icon-search"
-            plain
-            @click="openAdvancedQuery">
-            楂樼骇鏌ヨ
-        </el-button>
+          <el-button
+              size="small"
+              icon="el-icon-guide"
+              plain
+              @click="escapeOwner">
+              杞Щ鎵�鏈夎��
+          </el-button>
         </template>
       </avue-crud>
     </basic-container>
+
     <!-- 楂樼骇鏌ヨ瀵硅瘽妗� -->
     <advanced-query
-      ref="advancedQuery"
+      :ref="advancedQueryParam.ref"
       :options="advancedQueryParam.options"
       :visible.sync="advancedQueryParam.advancedQuerySettingBox"
-      v-model="value">
+      @echoContion="echoSeniorContionMap">
     </advanced-query>
+
     <!-- 缂栫爜瑙勫垯鐩稿叧瀵硅瘽妗� -->
     <el-dialog title="缂栫爜瑙勫垯浣跨敤鑼冨洿"
       append-to-body
@@ -111,12 +125,13 @@
       width="800px"
       style="height: 116vh; margin-top: -10vh;">
       <avue-crud
-        :option="dialogeOption" 
+        :option="dialogeOption"
         :table-loading="dialogLoading"
         :data="useRangeData"
         @refresh-change="refreshUseRangeChange">
       </avue-crud>
     </el-dialog>
+
     <!-- 缂栫爜瑙勫垯,鍏嬮殕瀵硅瘽妗� -->
     <el-dialog title="鍏嬮殕缂栫爜瑙勫垯"
       append-to-body
@@ -170,6 +185,7 @@
         <el-button @click="cloneSettingBox = false">鍙� 娑�</el-button>
       </div>
     </el-dialog>
+
     <!-- 缂栫爜瑙勫垯,浠庡叾浠栬鍒欏厠闅嗗璇濇 -->
     <el-dialog title="鍏嬮殕缂栫爜瑙勫垯鐨勫熀纭�淇℃伅"
       append-to-body
@@ -210,6 +226,27 @@
         <el-button type="primary" @click="saveOtherCodeBasic">淇� 瀛�</el-button>
         <el-button @click="cloneOtherCodeRuleSettingBox = false">鍙� 娑�</el-button>
       </div>
+    </el-dialog>
+    
+    <!-- 缂栫爜瑙勫垯,杞Щ鎵�鏈夎�呭璇濇 -->
+    <el-dialog
+      :visible.sync="escapeOwnerVisible"
+      append-to-body
+      title="杞Щ鎵�鏈夎��"
+      width="30%">
+      <el-select v-model="ruleOwner" placeholder="璇烽�夋嫨" class="selects">
+        <el-option
+          v-for="item in ruleAdminUserList"
+          :key="item.VALUE"
+          :label="item.LABLE"
+          :value="item.VALUE"
+          class="seloption">
+        </el-option>
+      </el-select>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="escapeOwnerVisible = false">鍙� 娑�</el-button>
+          <el-button type="primary" @click="escapeOwnerConfirm">纭� 瀹�</el-button>
+        </span>
     </el-dialog>
 
     <!-- 鍩虹鐮佹灞曠ず鍖哄煙 -->
@@ -287,6 +324,14 @@
             @click="deleteBasicCode(scope.row)">
             鍒� 闄�
         </el-button>
+        <el-button type="primary"
+            size="small"
+            icon="el-icon-search"
+            plain
+            :disabled="selectionList.length <= 0"
+            @click="openAdvancedQuery('codeBasicSec')">
+            楂樼骇鏌ヨ
+        </el-button>
       </template>
 
       </avue-crud>
@@ -309,8 +354,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>
@@ -401,6 +446,8 @@
       append-to-body
       style="height: 115vh; margin-top: -13vh; overflow: hidden"
       destroy-on-close
+      lock-scroll
+      :close-on-click-modal="false"
       @close="clearBasicAddForm">
 
       <!--  绗竴灞傚璇濇,娣诲姞鐮佹淇℃伅瀵硅瘽妗嗕腑鐨勫唴瀹� -->
@@ -414,7 +461,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
@@ -472,7 +519,7 @@
                 </el-input>
               </el-form-item>
               <el-form-item label="灞炴�ф墍鍦ㄥ垎绫�:" :label-width="rightFormLabelWidth">
-                <el-input 
+                <el-input
                   v-model="form.referCodeClassifyOidName"
                   disabled>
               </el-input>
@@ -510,8 +557,8 @@
                   </el-option>
                 </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-form-item v-if="form.codeFillType!='code_fill_none'" label="琛ヤ綅鏃剁殑瀛楃:" :label-width="rightFormLabelWidth">
+                <el-select v-model="form.codeFillSeparator" @blur="inputSelectBlur" filterable placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
                   <el-option
                     v-for="item in enumParam.codeFillSeparator"
                     :key="item.itemValue"
@@ -549,7 +596,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"
@@ -557,6 +604,9 @@
                     :value="item.itemValue">
                   </el-option>
                 </el-select>
+              </el-form-item>
+              <el-form-item id="ShowOrHide" v-if="form.valueCutType!='code_cut_none'" 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">
@@ -573,7 +623,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"
@@ -585,7 +635,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"
@@ -647,8 +697,8 @@
                   </el-option>
                 </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-form-item v-if="form.codeFillType!='code_fill_none'" label="琛ヤ綅鏃剁殑瀛楃:" :label-width="rightFormLabelWidth">
+                <el-select v-model="form.codeFillSeparator" filterable @blur="inputSelectBlur" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
                   <el-option
                     v-for="item in enumParam.codeFillSeparator"
                     :key="item.itemValue"
@@ -661,11 +711,11 @@
           </span>
         </el-form>
       </div>
-      <!-- 绗竴灞傚璇濇鐨勬寜閽拰锛岀嚎鏉� -->
+      <!-- 绗竴灞傚璇濇鐨勬寜閽拰鍒嗛殧绾挎潯 -->
       <el-divider class="horizontal-line" direction="horizontal"></el-divider>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="saveOrEditBasicCode" v-show="showbtn">淇� 瀛�</el-button>
-        <el-button @click="addBasicCodeSettingBox = false" v-show="showbtn">鍙� 娑�</el-button>
+        <el-button type="primary" @click="saveOrEditBasicCode" :disabled="!showbtn">淇� 瀛�</el-button>
+        <el-button @click="addBasicCodeSettingBox = false">鍙� 娑�</el-button>
       </div>
 
       <!--  绗簩灞傚璇濇,灞炴�х爜娈碉紝灞炴�ч�夋嫨瀵硅瘽妗� -->
@@ -714,11 +764,11 @@
       </el-dialog>
 
       <!-- 绗簩灞傚璇濇,灞炴�х爜娈碉紝鍏紡缂栬緫妗嗗璇濇缁勪欢 -->
-      <formula-editor 
-        ref="formulaEditor" 
-        @updateFormulaContent="updateFormulaContent" 
-        :thisSceneTableData="formulaEditorParams.thisSceneTableData"
+      <formula-editor
+        ref="formulaEditor"
+        @updateFormulaContent="updateFormulaContent"
         :visible.sync="formulaEditorParams.formulaEditorSettingBox"
+        :thisSceneTableData="formulaEditorParams.thisSceneTableData"
         :systemVariableTableData="formulaEditorParams.systemVariableTableData">
       </formula-editor>
 
@@ -732,7 +782,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"
@@ -757,17 +807,12 @@
         @echoReferBtmType="echoReferBtmType">
       </refer-btm-type-crud-dialog>
 
-      <!-- 绗簩灞傚璇濇,鑷畾涔夊弬鐓ч厤缃瓼orm缁勪欢 -->
-      <refer-config-form-dialog
-        ref="referConfigFormDialog"
-        @echoReferConfig="echoReferConfig">
-      </refer-config-form-dialog>
-      <!-- 绗簩灞傚璇濇,鐩存帴閫夋嫨鍙傜収閰嶇疆crud缁勪欢 -->
-      <refer-config-crud-dialog
-        ref="referConfigCrudDialog"
-        @openReconfigInterFace="openReconfigInterFace"
-        @echoReferConfig="echoReferConfig">
-      </refer-config-crud-dialog>
+      <!-- 绗簩灞傚璇濇,鍙傜収閰嶇疆缁勪欢 -->
+      <refer-config-dialog
+        :display="referConfigVisble"
+        @setReferConfigValue="setReferConfigValue"
+        :referConfigOption="referConfigOption">
+      </refer-config-dialog>
 
     </el-dialog>
 
@@ -776,17 +821,17 @@
 
 <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,
   } from "@/api/code/codebasic";
-  import { treeTopCodeClassify, listClassifyLinkAttr } from "@/api/code/codeclassify";
+  import { 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/enum";
@@ -799,18 +844,13 @@
   import treeOption from "@/const/code/classifyTreeOptionDialog";
   import classisyValueTreeOption from "@/const/code/classisyValueTreeDialog";
   import parentClassifyParentOption from "@/const/code/parentClassifyParentOptionDialog";
-  import referBtmOption from "@/const/code/referBtmDialog";
   import fixedValueOption from "@/const/code/fixedValueMgrDialog";
   import {mapGetters} from "vuex";
-  import func from "@/util/func";
-  import {MasterTable} from "@/api/GetItem";
-import referBtmTypeCrudDialog from '../../components/code-dialog-page/referBtmTypeCrudDialog.vue';
+  import {getByRoleUserList} from "@/api/system/user";
 
   export default {
-  components: { referBtmTypeCrudDialog },
       data() {
         return {
-          value:"1",
           ruleForm: {},
           query: {},
           loading: true,
@@ -840,6 +880,10 @@
           cloneBasicOption: cloneBasicOption,
           cloneCodeRuleOption: cloneCodeRuleOption,
           selectionOtherCloneCodeBasicList: [], // 褰撳墠閫変腑鐨勫熀纭�鐮佹
+          /** 杞Щ鎵�鏈夎�呭璇濇 */
+          escapeOwnerVisible: false,
+          ruleAdminUserList: [], //瑙勫垯绠$悊鍛樺垪琛�
+          ruleOwner: '', // 褰撳墠瑕佽浆绉荤粰鍝釜瑙勫垯绠$悊鍛樼殑ID
 
           /*浣跨敤鑼冨洿瀵硅瘽妗嗘樉绀烘帶鍒�*/
           codeRangeSettingBox: false,
@@ -896,7 +940,7 @@
             codeFixedSecOid: "",
             description: "",
             id: "",
-          }, 
+          },
           isShowFixedForm: true, //true鏄剧ず鍥哄畾鐮佹鐮佸�肩鐞嗙晫闈紝false鏄剧ず鍒嗙被鐮佹鐮佸�肩鐞嗙晫闈�
           fixedValueData: [], //鍥哄畾鐮佹鐮佸�艰〃鏍兼暟鎹�
           fixedValueOption: fixedValueOption, //琛ㄦ牸閰嶇疆
@@ -912,7 +956,6 @@
           },
           classisyValueTreeOption: classisyValueTreeOption, //鍒嗙被鐮佹鏍戠浉鍏抽厤缃」
           classifyValueTreeData: [],
-          //currentSelectClsValueTreeData: '', //褰撳墠閫変腑鐨勫垎绫荤爜鍊兼爲鑺傜偣
 
           /* 涓哄睘鎬ч�夊彇鍊肩獥鍙f樉绀烘墦寮�鎺у埗鍙橀噺 */
           isShowSelectAttrOption: false,
@@ -921,7 +964,7 @@
           treeOption: treeOption,
           currentSelectTreeData: '', //褰撳墠閫変腑鐨勬爲鑺傜偣
           /* 涓哄睘鎬ч�夊�煎彸渚ц〃鏍肩浉鍏虫暟鎹� */
-          
+
           selectAttrParams: {
             ref: "selectionAttrCrud",
             attrOption: attrOption,
@@ -999,7 +1042,7 @@
             ],
             formulaEditorSettingBox: false,
           },
-          
+
           /* 鐖跺垎绫荤爜娈靛璇濇 */
           parentClsfyParams: {
             ref: 'crudParentClassify',
@@ -1016,7 +1059,7 @@
             parentClassifyQuery: {}, //鏌ヨ鏉′欢
             parentClassifySelectionList: [], //褰撳墠閫変腑琛�
           },
-          
+
           /** 鍙傜収寮曠敤鐨勪笟鍔$被鍨嬪璇濇鐩稿叧鏁版嵁 */
           referBtmDialogParams: {
             ref: 'crudReferBtm',
@@ -1036,7 +1079,7 @@
             componentCodeFlag: false, //鏄惁鍙備笌缂栫爜
             pkCodeRule: '', //鎵�灞炵紪鐮佽鍒�
           },
-          
+
           //鏋氫妇鍜屽彲杈撳彲閫夋煡璇�
           enumParam: {
             secTypeList:[],    //鐮佹绫诲瀷
@@ -1054,67 +1097,16 @@
 
           // 楂樼骇鏌ヨ瀵硅瘽妗嗙浉鍏冲弬鏁�
           advancedQueryParam: {
+            ref: 'advancedQuery',
             advancedQuerySettingBox: false,
-            searchForm: {
-              name: 'advanced',
-            },
-            options: {
-              labelWidth: '110px',
-              // 鏌ヨ瀛楁
-              searchfeildName: [
-                    {
-                      label: '缂栧彿',
-                      value: 'id',
-                    },
-                    {
-                      label: '鍚嶇О',
-                      value: 'name',
-                    },
-                    {
-                      label: '鐘舵��',
-                      value: 'status',
-                    },
-              ], 
-              // 鏌ヨ鏉′欢 绛変簬銆佸寘鍚�佷笉绛変簬銆佷粙浜庘�︹��
-              searchCondition: [
-                {
-                  label: '绛変簬',
-                  value: '=',
-                },
-                {
-                  label: '鍖呭惈',
-                  value: 'like',
-                },
-                {
-                  label: '澶т簬绛変簬',
-                  value: '>=',
-                },
-                {
-                  label: '灏忎簬绛変簬',
-                  value: '<=',
-                },
-                {
-                  label: '涓嶇瓑浜�',
-                  value: '!=',
-                },
-                {
-                  label: '浠嬩簬',
-                  value: 'between',
-                },
-              ], 
-              column: [
-                {
-                  type: 'text',
-                  
-                  
-                },
-                {
-                  
-                },
-              ],
-            },
+            options: [],
+            currentOpen: '', //褰撳墠鎵撳紑楂樼骇鏌ヨ鐨勭獥鍙f槸
+            //conditionMapParams: {},
           },
-          
+
+          //寮曠敤鐮佹涓弬鐓ч厤缃粍浠剁浉鍏冲弬鏁�
+          referConfigOption: {},
+          referConfigVisble: false,
 
         };
       },
@@ -1129,37 +1121,86 @@
           };
         },
       },
-      created() {
-          MasterTable({
-            codeClassifyOid: "D9CF223F-317D-71EB-BD11-433A94CAD9F3",
-            functionId: 5,
-          }).then(res=>{
-            console.log(res.data.tableDefineVO.seniorQueryColumns);
-          }) 
+      watch:{
+
+      },
+      mounted(){
+        this.loadTotalEnum();
+      },
+      // 瑙e喅琛ㄦ牸閿欒闂
+      activated () {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+          this.$refs.crudBasic.doLayout();
+        })
       },
       methods: {
 
+        /** 杞Щ瑙勫垯鎵�鏈夎�呭璇濇 */
+        escapeOwner(){
+          if (this.selectionList.length === 0) {
+            this.$message.warning("璇烽�夋嫨涓�鏉$紪鐮佽鍒欙紒");
+            return;
+          }
+          this.escapeOwnerVisible = true;
+          getByRoleUserList("瑙勫垯绠$悊鍛�").then(res=>{
+            this.ruleAdminUserList = res.data.data;
+          });
+        },
+        /** 纭杞Щ鎵�鏈夎�� */
+        escapeOwnerConfirm(){
+          if(!this.ruleOwner){
+            this.$message.warning("璇烽�夋嫨鎮ㄨ杞Щ鐨勮鍒欑鐞嗗憳锛�");
+            return;
+          }
+          this.selectionList[0].owner = this.ruleOwner;
+          let data = this.selectionList[0];
+          update(data).then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "瑙勫垯杞Щ鎴愬姛!"
+            });
+            this.escapeOwnerVisible = false;
+          }, error => {
+            console.log(error);
+          });
+        },
+
+        /** 楂樼骇鏌ヨ瀵硅瘽妗嗙粍浠�,缁勪欢杩斿洖鐨勫�兼槸condtionMap[field]褰㈠紡鐨勬煡璇㈡潯浠讹紝淇濈暀浜嗗拰涔嬪墠涓�鏍风殑鏂瑰紡 */
+        echoSeniorContionMap(conditionMaps){
+          //console.log(conditionMaps);
+          if(JSON.stringify(conditionMaps)!='{}'){
+            if(this.advancedQueryParam.currentOpen =='codeRule'){
+              this.query = conditionMaps;
+              this.onLoad(this.page);
+            }else{
+              this.sendGridCodeBasicSec(conditionMaps,true);
+            }
+            //console.log(conditionMaps);
+          }
+        },
         /* 鍏紡缂栬緫妗嗗唴瀹规敼鍙�,瀛愮粍浠剁紪杈戝畬鍏紡涔嬪悗鍐呭鍥炴樉鏃惰皟鐢� */
         updateFormulaContent(content){
           this.form.getValueClass = content;
         },
         /* 寮曠敤鐮佹鍙傜収閰嶇疆,瀛愮粍浠跺~瀹屽弬鐓ч厤缃箣鍚庡唴瀹瑰洖鏄炬椂璋冪敤 */
-        echoReferConfig(content){
+        setReferConfigValue(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;
           //杞崲鎴怞SON瀛楃涓茶繘琛岀埗缁勪欢鍥炴樉
           let submitFormJson = JSON.stringify(content);
-          this.form.referConfig = submitFormJson;
+          this.form.referConfig = 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);
@@ -1211,8 +1252,13 @@
           let parentClsParam = this.parentClsfyParams;
           parentClsParam.classifyDialogLoading = true;
           let oid = this.selectionList.length==0 ? this.form.pkCodeRule:this.selectionList[0].oid;
-          Object.assign(params,{pkCodeRule:oid})
-          refDataGridClassifySec(page.currentPage, page.pageSize, Object.assign(params, parentClsParam.parentClassifyQuery)).then(res => {
+          let conditionMaps = {};
+          conditionMaps['conditionMap[pkCodeRule]'] = oid;
+          refDataGridClassifySec(
+            page.currentPage,
+            page.pageSize,
+            conditionMaps
+          ).then(res => {
             //console.log(res.data);
             const data = res.data.data;
             parentClsParam.parentClassifyDataPage.total = data.total;
@@ -1221,9 +1267,9 @@
             this.parentClassifySelectionClear();
           });
         },
-        
 
-        /** 鎵撳紑灞炴�ч�夊彇鍊硷紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */ 
+
+        /** 鎵撳紑灞炴�ч�夊彇鍊硷紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */
         // 鑾峰彇褰撳墠琚�変腑鏍戣妭鐐圭殑oid
         nodeClick(data) {
           this.currentSelectTreeData = data;
@@ -1233,23 +1279,25 @@
         loadlistClassifyLinkAttr() {
           let attrParam = this.selectAttrParams;
           //console.log(this.currentSelectTreeData);
-          attrParam.selectAttrOptionLoading = true;
-          let param = {};
-          // 澶氫釜conditionMap杩欐牱浼犲弬
+          this.selectAttrParams.selectAttrOptionLoading = true;
+          let conditionMaps = {};
           if(attrParam.selectAttrQeury){
-              Object.keys(attrParam.selectAttrQeury).forEach(key=>{
-                  param['conditionMap['+key+']'] = attrParam.selectAttrQeury[key];
-              });
-          }
-          param['conditionMap[codeClassifyOid]'] = this.currentSelectTreeData.oid;
-          param['conditionMap[btmTypeOid]'] = this.currentSelectTreeData.btmTypeOid;
-          listClassifyLinkAttr(param).then(res=>{
-            //console.log(res.data.data);
-            attrParam.selectAttrData = res.data.data;
-            attrParam.selectAttrOptionLoading = false;
-            this.$nextTick(() => {
-                this.$refs[attrParam.ref].doLayout()
+            Object.keys(attrParam.selectAttrQeury).forEach(key=>{
+              conditionMaps['conditionMap['+key+']'] = attrParam.selectAttrQeury[key].trim();
             });
+          }
+          conditionMaps['conditionMap[codeClassifyOid]'] = this.currentSelectTreeData.oid;
+          conditionMaps['conditionMap[btmTypeOid]'] = this.currentSelectTreeData.btmTypeOid;
+          listClassifyLinkAttr(conditionMaps).then(res=>{
+            const data = res.data;
+            this.$nextTick(() => {
+              this.$refs[attrParam.ref].doLayout()
+            });
+            //console.log(data.data);
+            this.selectAttrParams.selectAttrData = data.data;
+            this.selectAttrParams.selectAttrOptionLoading = false;
+            // 灏嗘悳绱㈡鍐呭缃┖
+            this.selectAttrParams.selectAttrQeury = {};
           })
         },
         // 鐐瑰嚮鎼滅储鍚庤Е鍙戣浜嬩欢
@@ -1291,7 +1339,7 @@
           })
           this.isShowSelectAttrOption = false;
         },
-        
+
 
         /** 鍩虹鐮佹琛ㄤ腑鐨勭爜鍊肩鐞嗙殑鐩稿叧鏂规硶 */
         // 鐮佸�肩鐞嗗脊绐楁帶鍒�
@@ -1411,6 +1459,11 @@
             });
           }else {
             this.codeClassifyForm.oid = this.selectedFixedOrCodeclassifyValue.attributes.oid;
+            // 鍒嗙被鐮佹锛屽瓙鍒嗙被鍜岀埗鍒嗙被涔嬮棿涓嶈兘鐩镐簰鏇存敼
+            if(this.checkClassUpdate(this.codefixedsecOrCodeclassifysecOid,this.codeClassifyForm.codeClassifySecOid)){
+              return;
+            }
+            this.$delete(this.codeClassifyForm,"parentClassifyValueOid");
             editCodeClassifyValue(this.codeClassifyForm).then(() => {
                 this.loadClassifyValueData({"oid":this.codefixedsecOrCodeclassifysecOid})
                 this.$message({
@@ -1421,10 +1474,10 @@
                 window.console.log(error);
             });
           }
-            
+
         },
         //鍒犻櫎鐮佸��
-        delCodeSecValue(condition){ 
+        delCodeSecValue(condition){
           //鍥哄畾鐮佹鐮佸�煎垹闄�
           if(condition == 'codefixedsec'){
             //console.log(this.selectedFixedOrCodeclassifyValue.oid);
@@ -1447,6 +1500,9 @@
               });
             });
           }else{
+            if(this.checkClassUpdate(this.codefixedsecOrCodeclassifysecOid,this.codeClassifyForm.codeClassifySecOid)){
+              return;
+            } 
             //鍒嗙被鐮佹鐮佸�煎垹闄�
             this.$confirm("鏄惁鍒犻櫎杩欐潯鏁版嵁锛熷鏋滆寮曠敤灏嗕笉鑳借鍒犻櫎锛�", {
               confirmButtonText: "纭畾",
@@ -1466,8 +1522,7 @@
                 message: "鎿嶄綔鎴愬姛!"
               });
             });
-          }            
-          
+          }
         },
         //瀵瑰浐瀹氱爜鍊艰〃杩涜锛氫笂绉汇�佷笅绉汇�佺Щ闄ゆ搷浣�
         codeFixedValueOpetion(condition,row){
@@ -1507,10 +1562,13 @@
         },
         //瀵瑰垎绫荤爜鍊艰〃杩涜锛氫笂绉汇�佷笅绉汇�佺Щ闄ゆ搷浣�
         codeClassifyValueOpetion(condition){
+          if(this.checkClassUpdate(this.codefixedsecOrCodeclassifysecOid,this.codeClassifyForm.codeClassifySecOid)){
+            return;
+          } 
           //姝ゅ娑夊強鍒版繁娴呮嫹璐濋棶棰橈紝浣嗘槸鎵ц涓婁笅绉讳繚瀛樻搷浣滀箣鍚庝細閲嶆柊鍔犺浇treedata锛屾墍浠ュ奖鍝嶄笉澶�
           let currentTreeList = this.getCodeClassifyValueTreeData();
           let saveData = [];
-          console.log(currentTreeList.treeList);
+          // console.log(currentTreeList.treeList);
           if(condition == 'up'){
             if(currentTreeList.index-1>=0){
               // 璋冩暣椤哄簭
@@ -1528,10 +1586,8 @@
               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);
         },
         //閫変腑琚皟鏁撮『搴忕殑涓や釜鏍戠殑鑺傜偣
         getCodeClassifyValueTreeData(){
@@ -1541,10 +1597,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);
           }
         },
         /**
@@ -1570,7 +1626,7 @@
           }
         },
         //涓婄Щ涓嬬Щ绛夋搷浣滅殑淇濆瓨
-        saveCodeFixedOrClassifyValueOption(condition,editOrderNumdata){
+        async saveCodeFixedOrClassifyValueOption(condition,editOrderNumdata){
           //淇濆瓨瀵瑰浐瀹氱爜娈电爜鍊肩殑涓婄Щ涓嬬Щ绉诲嚭绛夋搷浣�
           if(condition == "fixedValue"){
             let data = {
@@ -1589,7 +1645,7 @@
             });
           }else {
             //淇濆瓨瀵瑰垎绫荤爜鍊肩爜娈电爜鍊肩殑涓婄Щ涓嬬Щ绉诲嚭绛夋搷浣�
-            saveCodeClassifyValueOrder({
+            await saveCodeClassifyValueOrder({
               "codeClassifySecOid": this.codefixedsecOrCodeclassifysecOid,
               "dtoList": JSON.stringify(editOrderNumdata),
             }).then(() => {
@@ -1602,7 +1658,7 @@
             });
             this.loadClassifyValueData({"oid":this.codefixedsecOrCodeclassifysecOid});
           }
-          
+
         },
         //鍒嗙被鐮佸�兼爲data鍔犺浇
         loadClassifyValueData(row){
@@ -1628,414 +1684,92 @@
           this.codeClassifyForm.id = node.attributes.id;
           this.codeClassifyForm.name = node.attributes.name;
           this.codeClassifyForm.parentClassifyValueOid = node.attributes.oid;
-          //console.log(this.codeClassifyForm);
+          // console.log(this.codeClassifyForm);
         },
-
-
-        /** 鍩虹鐮佹鐩稿叧鏂规硶 */
-        //闃叉鎵撳紑杩囩紪杈戠獥鍙d箣鍚庤〃鍗曚腑瀛樺湪鍊硷紝鎵�浠ラ渶瑕佹竻绌�,骞跺垵濮嬪寲form琛ㄥ崟灞炴��
-        clearBasicAddForm(){
-          this.form = this.$options.data().form;
-          // this.changeSectypeFormItems(null);
-        },
-        // 鎵撳紑鏂板绐楀彛
-        openAddBasicCodeSec(){
-          if(!this.tipsMessage(this.selectionList)){
-            return;
-          }
-          if(this.selectionList[0].lcStatus != 'Editing'){
-            this.$message.warning('缂栫爜瑙勫垯鐘舵�佷笉鏄�"缂栬緫涓�"锛屼笉鍏佽缂栬緫鐮佹!');
-            return;
-          }
-          this.openBasicDialog('add',null);
-          this.loadCodeSecType();
-        },
-        // 鎵撳紑鏂板鎴栫紪杈戝熀纭�鐮佹瀵硅瘽妗�
-        openBasicDialog(condition,row){
-          //console.log(row);
-          if(condition == 'add') {
-            this.basicSecDialogTitle = '娣诲姞鐮佹淇℃伅';
-            this.showbtn = true;
-            this.basicSecOnlyRead = false;
-          }else if(condition == 'edit'){
-            if(this.selectionList.length!=1){
-              this.$message.warning('璇烽�夋嫨涓�鏉$紪鐮佽鍒欐暟鎹�!');
-              return;
-            }
-            this.basicSecDialogTitle = '淇敼鐮佹淇℃伅';
-            this.showbtn = true;
-            this.basicSecOnlyRead = false;
-            //涓篺orm缁戝畾鍊�
-          }else{
-            this.basicSecDialogTitle = '鏌ョ湅鐮佹淇℃伅';
-            this.showbtn = false;
-            this.basicSecOnlyRead = true;
-          }
-          //console.log(this.form);
-          this.changeSectypeFormItems(condition == 'add' ? null:row);
-          this.addBasicCodeSettingBox = true;
-        },
-        // 鏂板鍩虹鐮佹
-        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(() => {
-                this.$message({
-                  type: "success",
-                  message: "鎿嶄綔鎴愬姛!"
-                });
-              }, error => {
-                window.console.log(error);
-              });
-              // 鍏抽棴瀵硅瘽妗�
-              this.addBasicCodeSettingBox = false
-            }
-            
-          }else{
-            editSave(this.form).then(() => {
-               // 鍏抽棴瀵硅瘽妗�
-              this.addBasicCodeSettingBox = false
-              this.$message({
-                type: "success",
-                message: "鎿嶄綔鎴愬姛!"
-              });
-              }, error => {
-                window.console.log(error);
-            });
-          }
-          // 鐐瑰嚮鏂板鍩虹鐮佹,鍏抽棴绐楀彛涔嬪悗瑙﹀彂閲嶆柊鍔犺浇
-          this.loadBasic(this.selectionList[0]);
-        },
-        // 鍥犱负elementui鐨勮〃鍗曟牎楠岃缃笉涓婃墍浠ラ噰鐢ㄥ垽鏂殑鏂瑰紡鏉ュ仛琛ㄥ崟妫�楠屾柟寮�
-        checkForm(){
-          let form = this.form;
-          //console.log(form);
-          const regNumber = /^[0-9]+\.{0,1}[0-9]*$/; //鏁板瓧鎴栧皬鏁版鍒欐牎楠�
-          const tipsMsg = "蹇呭~椤逛笉鑳戒负绌�";
-          if(form.id == ''){
-            this.$message.warning("(鐮佹缂栧彿)"+tipsMsg);
-            this.$refs.id.$el.querySelector('input').focus();
-            return false;
-          }
-          if(form.name == ''){
-            this.$message.warning("(鐮佹鍚嶇О)"+tipsMsg);
-            this.$refs.name.$el.querySelector('input').focus();
-            return false;
-          }
-          if(form.secType == ''){
-            this.$message.warning("(鐮佹绫诲瀷)"+tipsMsg);
-            this.$refs.secType.$el.querySelector('select').focus();
-            return false;
-          }
-          if(form.secType==='codefixedsec'){
-            //鍥哄畾鐮佹
-            if(form.codeSecLengthType == ''){
-              this.$message.warning("(鐮佹闀垮害绫诲瀷)"+tipsMsg);
-              this.$refs.codeSecLengthType.$el.querySelector('select').focus();
-              return false;
-            }
-            if(form.codeSecLength == ''){
-              this.$message.warning("(鐮佹闀垮害)"+tipsMsg);
-              this.$refs.codeSecLength.$el.querySelector('input').focus();
-              return false;
-            }
-            if(!regNumber.test(form.codeSecLength)){
-              this.$message.warning("鐮佹鐨勯暱搴﹀繀椤讳负鏁板瓧鍊�");
-              this.$refs.codeSecLength.$el.querySelector('input').focus();
-              return false;
-            }
-          }else if(this.form.secType==='codeattrsec'){
-            //灞炴�х爜娈�
-            if(form.referAttributeId == ''){
-              this.$message.warning('(灞炴��)'+tipsMsg);
-              this.$refs.referAttributeId.$el.querySelector('input').focus();
-              return false;
-            }
-          }else if(this.form.secType==='codeserialsec'){
-            console.log(form.codeFillType);
-            //娴佹按鐮佹
-            if(form.codeSecLength == ''){
-              this.$message.warning('(鐮佹鐨勯暱搴�)'+tipsMsg);
-              this.$refs.seriaCodeSecLength.$el.querySelector('input').focus();
-              return false;
-            }
-            if(!regNumber.test(form.codeSecLength)){
-              this.$message.warning('鐮佹鐨勯暱搴﹀繀椤讳负鏁板瓧鍊�');
-              this.$refs.seriaCodeSecLength.$el.querySelector('input').focus();
-              return false;
-            }
-            if(!regNumber.test(form.serialStart)){
-              this.$message.warning('娴佹按鍙风殑璧峰鍊煎繀椤讳负鏁板瓧鍊�');
-              this.$refs.serialStart.$el.querySelector('input').focus();
-              return false;
-            }
-            if(!regNumber.test(form.serialStep)){
-              this.$message.warning('娴佹按鐨勬闀垮繀椤讳负鏁板瓧鍊�');
-              this.$refs.serialStep.$el.querySelector('input').focus();
-              return false;
-            }
-            if(form.codeFillType == ''){
-              this.$message.warning('(缂栫爜琛ヤ綅鏂瑰紡)'+tipsMsg);
-              return false;
-            }
-            if(form.codeFillType != '涓嶈ˉ浣�' && form.codeFillSeparatorSelect == ''){
-              this.$message.warning('褰撹ˉ浣嶆柟寮忎负宸﹁ˉ浣嶆垨鑰呭彸琛ヤ綅鐨勬椂鍊欙紝琛ヤ綅瀛楃涓嶈兘涓虹┖');
-              return false;
-            }
-            if(form.codeFillLength == ''){
-              this.$message.warning('濉厖闀垮害涓嶈兘涓虹┖');
-              this.$refs.codeFillLength.$el.querySelector('input').focus();
-              return false;
-            }
-            if(!regNumber.test(form.codeFillLength)){
-              this.$message.warning('濉厖闀垮害蹇呴』涓烘暟瀛楀��');
-              this.$refs.codeFillLength.$el.querySelector('input').focus();
-              return false;
-            }
-            if(form.codeFillLimit == ''){
-              this.$message.warning('(娴佹按涓婇檺)'+tipsMsg);
-              this.$refs.codeFillLimit.$el.querySelector('input').focus();
-              return false;
-            }
-            if(!regNumber.test(form.codeFillLimit)){
-              this.$message.warning('娴佹按涓婇檺蹇呴』涓烘暟瀛楀��');
-              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;
-            }
-          }else if(this.form.secType==='codelevelsec'){
-            //灞傜骇鐮佹
-            if(form.codeLevelType == ''){
-              this.$message.warning('(灞傜骇绫诲瀷)'+tipsMsg);
-              return false;
-            }
-            if(!regNumber.test(form.codeLevelValue)){
-              this.$message.warning('灞傜骇鐨勫��)鍙兘濉啓鏁板瓧');
-              this.$refs.codeLevelValue.$el.querySelector('input').focus();
-              return false;
-            }
-            if(form.valueCutType == ''){
-              this.$message.warning('(瀛楃鎴彇绫诲瀷)'+tipsMsg);
-              this.$refs.valueCutType.$el.querySelector('select').focus();
-              return false;
-            }
-          }else if(this.form.secType==='coderefersec'){
-            //寮曠敤鐮佹
-            if(form.referBtmId == ''){
-              this.$message.warning('(鍙傜収寮曠敤鐨勪笟鍔$被鍨�)'+tipsMsg);
-              this.$refs.referBtmId.$el.querySelector('input').focus();
-              return false;
-            }
-            if(form.referConfig == ''){
-              this.$message.warning('(鍙傜収閰嶇疆)'+tipsMsg);
-              this.$refs.referConfig.$el.querySelector('input').focus();
-              return false;
-            }
-          }else if(this.form.secType==='codedatesec'){
-            //鏃ユ湡鐮佹
-            if(form.codeDateFormatStr == ''){
-              this.$message.warning('(鏃ユ湡鏍煎紡)'+tipsMsg);
-              this.$refs.codeDateFormatStr.$el.querySelector('input').focus();
-              return false;
-            }
-          }else if(this.form.secType==='codeclassifysec'){
-            //鍒嗙被鐮佹
-            if(form.codeSecLengthType == ''){
-              this.$message.warning('(鐮佹闀垮害绫诲瀷)'+tipsMsg);
-              return false;
-            }
-            if(form.codeSecLength == ''){
-              this.$message.warning('(鐮佹闀垮害)'+tipsMsg);
-              this.$refs.classCodeSecLength.$el.querySelector('input').focus();
-              return false;
-            }
-            if(!regNumber.test(form.codeSecLength)){
-              this.$message.warning('鐮佹鐨勯暱搴﹀繀椤讳负鏁板瓧鍊�');
-              this.$refs.classCodeSecLength.$el.querySelector('input').focus();
-              return false;
-            }
-          }else if(this.form.secType==='codevariablesec'){
-            //鍙彉鐮佹
-            if(form.codeSecLength == ''){
-              this.$message.warning('(鐮佹闀垮害)'+tipsMsg);
-              this.$refs.varCodeSecLength.$el.querySelector('input').focus();
-              return false;
-            }
-            if(!regNumber.test(form.codeSecLength)){
-              this.$message.warning('鐮佹鐨勯暱搴﹀繀椤讳负鏁板瓧鍊�');
-              this.$refs.classCodeSecLength.$el.querySelector('input').focus();
-              return false;
-            }
-            if(form.codeFillType == ''){
-              this.$message.warning('(缂栫爜琛ヤ綅鏂瑰紡)'+tipsMsg);
-              return false;
-            }
-            if(form.codeFillType != '涓嶈ˉ浣�' && form.codeFillSeparatorSelect == ''){
-              this.$message.warning('褰撹ˉ浣嶆柟寮忎负宸﹁ˉ浣嶆垨鑰呭彸琛ヤ綅鐨勬椂鍊欙紝琛ヤ綅瀛楃涓嶈兘涓虹┖');
-              return false;
-            }
-          }
-          return true;
-        },
-        // 鍒ゆ柇鏁版嵁鏄惁閫夋嫨浠ュ強鍙兘閫夋嫨鍗曟潯鏁版嵁
-        tipsMessage(list){
-          if(list.length != 1){
-            this.$message.warning("璇烽�夋嫨涓�鏉$紪鐮佽鍒欐暟鎹�!");
-            return false;
-          }
-          return true;
-        },
-        // 鍩虹鐮佹鍒犻櫎
-        deleteBasicCode(){
-          if(!this.tipsMessage(this.selectionBasicList)){
-            return;
-          }
-          let oid = this.selectionBasicList[0].oid;
-          this.$confirm("鏄惁鍒犻櫎杩欐潯鏁版嵁锛熷鏋滆寮曠敤灏嗕笉鑳借鍒犻櫎锛�", {
-            confirmButtonText: "纭畾",
-            cancelButtonText: "鍙栨秷",
-            type: "warning"
-          })
-          .then(() => {
-            let ts = new Date(this.selectionBasicList[0].ts).getTime();
-            return deleteData({"oid": oid,"ts": ts});
-          })
-          .then(() => {
-            this.loadBasic({"oid":this.currentCodeRuleOid == null || this.currentCodeRuleOid == '' ? this.selectionList[0].oid:this.currentCodeRuleOid});
+        /**
+         * 鍒嗙被鐮佹鐮佸�硷紝淇敼銆佸垹闄ゃ�佷笂涓嬬Щ涔嬪墠锛屾鏌ユ槸鍚︿负瀛愬垎绫诲拰鐖跺垎绫讳箣闂寸浉浜掓洿鏀�
+         * @currentRowClassOid 褰撳墠閫変腑琛宱id
+         * @updateClassOid 瑕佷慨鏀圭殑鍒嗙被鐮佸�紀id
+         */
+         checkClassUpdate(currentRowClassOid,updateClassOid){
+          if(currentRowClassOid!=updateClassOid){
             this.$message({
-              type: "success",
-              message: "鎿嶄綔鎴愬姛!"
+              type: "error",
+              message: "鎿嶄綔澶辫触銆愬瓙鍒嗙被涓庣埗鍒嗙被涔嬮棿涓嶈兘鐩镐簰淇敼鐮佸�笺��!"
             });
-            this.$refs.crudBasic.toggleSelection();
-          });
-        },
-        // 鐐瑰嚮瑙﹀彂鍔犺浇鍩虹鐮佹淇℃伅
-        loadBasic(row){
-          if(this.cloneSettingBox){
-            this.cloneTableLoading = true;
-          }else{
-            this.loadingBasic = true;
           }
-          // console.log(row.oid);
-          //瀛樺偍褰撳墠鍏宠仈鐨勭紪鐮佽鍒欑浉鍏充俊鎭�
-          this.currentCodeRuleOid = row.oid;
-          this.currentRuleLcStatus = row.lcStatus;
-          this.sendGridCodeBasicSec({"pkCodeRule":row.oid});
+          return currentRowClassOid!=updateClassOid;
         },
-        // 鍙戦�佸姞杞藉熀纭�鐮佹鐨勮姹�
-        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;
-            if(this.cloneSettingBox){
-              this.cloneData = data.records;
-              // console.log(tihs.cloneData);
-              this.cloneTableLoading = false;
-            }else {
-              this.basicData = data.records;
-              // console.log(this.basicData);
-              this.loadingBasic = false;
-            }
-          });
-        },
-        // 鍩虹鐮佹閫変腑鏃惰Е鍙�
-        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){
-          //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; 
-          }
-          if(row.oid==null || row.oid==''){
-            this.$message.warning("鏈幏鍙栧埌蹇呭~鍙傛暟!");
-            return;        
-          }
-          upOrderNum(row.oid).then(() => {
-            this.loadBasic({"oid":codeRuleOid});
-            this.$message({
-              type: "success",
-              message: "鎿嶄綔鎴愬姛!"
-            });
-          })
-        },
-        downOrderNum(row){
-          //console.log(row.oid);
-          if(!this.tipsMessage(this.selectionList)){
-            return;
-          }
-          let codeRuleOid = this.selectionList[0].oid;
-          //console.log(this.selectionList);
-          if (this.selectionList[0].lcStatus != 'Editing') {
-            this.$message.warning("鍙湁缂栫爜瑙勫垯鐨勭姸鎬佹槸 [缂栬緫涓璢 鐨勬椂鍊欙紝鎵嶈兘璋冩暣鐮佹椤哄簭!");
-            return; 
-          }
-          if(row.oid==null || row.oid==''){
-            this.$message.warning("鏈幏鍙栧埌蹇呭~鍙傛暟!");
-            return;        
-          }
-          downOrderNum(row.oid).then(() => {
-            this.loadBasic({"oid":codeRuleOid});
-            this.$message({
-              type: "success",
-              message: "鎿嶄綔鎴愬姛!"
-            });
-          })
-        },
-        // 鍩虹鐮佹鍒锋柊鏃舵煡璇�
-        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;
-        },
-
 
         /** 缂栫爜瑙勫垯鐩稿叧鏂规硶 */
         // 鎵撳紑楂樼骇鏌ヨ绐楀彛
-        openAdvancedQuery(){
-          //this.$refs.advancedQuery.visible = true;
-          //this.advancedQueryParam.timer = new Date().getTime()
-          this.advancedQueryParam.advancedQuerySettingBox = !this.advancedQueryParam.advancedQuerySettingBox;
+        openAdvancedQuery(condition){
+          if(condition=='codeRule'){
+            this.advancedQueryParam.options = [
+              {
+                data: [],
+                title: '缂栧彿',
+                fieldType: 'text',
+                queryField: 'id',
+              },{
+                data: [],
+                title: '鍚嶇О',
+                fieldType: 'text',
+                queryField: 'name',
+              },{
+                data: [],
+                title: '鎻忚堪',
+                fieldType: 'text',
+                queryField: 'description',
+              },{
+                data: [
+                  // {
+                  //   key: '缂栬緫涓�',
+                  //   value: 'Editing',
+                  // },
+                  // {
+                  //   key: '宸插彂甯�',
+                  //   value: 'Released',
+                  // },
+                  // {
+                  //   key: '鍋滅敤',
+                  //   value: 'Disabled',
+                  // },
+                ],
+                title: '鐘舵��',
+                fieldType: 'combox',
+                queryField: 'lcStatus',
+                comboxKey: 'codeSearchLCStatus',
+              },
+            ]
+          }else {
+            this.advancedQueryParam.options = [
+              {
+                data: [],
+                title: '鐮佹缂栧彿',
+                fieldType: 'text',
+                queryField: 'id',
+              },{
+                data: [],
+                title: '鐮佹鍚嶇О',
+                fieldType: 'text',
+                queryField: 'name',
+              },{
+                data: [],
+                title: '鎻忚堪',
+                fieldType: 'text',
+                queryField: 'description',
+              },{
+                data: [],
+                title: '鐮佹绫诲瀷',
+                fieldType: 'combox',
+                queryField: 'secType',
+                comboxKey: 'codeSecType',
+              }
+            ]
+          }
+          this.advancedQueryParam.currentOpen = condition;
+          this.advancedQueryParam.advancedQuerySettingBox = true;
         },
         // 鏌ヨ浣跨敤鑼冨洿
         handleRange(){
@@ -2046,7 +1780,7 @@
           this.getRangeCodeList()
         },
         // 鍔犺浇浣跨敤鑼冨洿鍒楄〃
-        getRangeCodeList(){        
+        getRangeCodeList(){
           this.dialogLoading = true;
           if(this.selectionList[0].oid==null){
             this.$message.error("鏈幏鍙栧埌鍙傛暟!");
@@ -2061,17 +1795,6 @@
         // 鍒锋柊浣跨敤鑼冨洿鍒楄〃
         refreshUseRangeChange(){
           this.getRangeCodeList();
-        },
-        // 鍗曞嚮缂栫爜瑙勫垯瀹炵幇琛岄�夋嫨
-        codeRuleRowClick (row) {
-          // 杩欏効搴旇鍙互涓嶈锛屽洜涓簍oggleRowSelection涔熶細瑙﹀彂琛岄�夋嫨鏃堕棿
-          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){
@@ -2125,7 +1848,7 @@
           }, error => {
             window.console.log(error);
           });
-          //console.log(data); 
+          //console.log(data);
         },
         // 鎵撳紑浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹瀵硅瘽妗�
         openOtherCodeRuleDialog(){
@@ -2134,7 +1857,7 @@
           }
           if(this.selectionList[0].lcStatus != 'Editing'){
             this.$message.warning("缂栫爜瑙勫垯宸茶寮曠敤锛屼笉鍏佽缂栬緫鎴栧垹闄�!");
-            return; 
+            return;
           }
           this.cloneOtherCodeRuleSettingBox = true;
         },
@@ -2169,7 +1892,7 @@
           this.selectionOtherCloneCodeBasicList = list;
           this.$refs.crudCloneCodeBasicOther.setCurrentRow(this.selectionOtherCloneCodeBasicList[list.length-1]);
         },
-         // 浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹淇℃伅
+        // 浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹淇℃伅
         saveOtherCodeBasic(){
           let oid = this.selectionList[0].oid;
           let fromDialogPkCodebasic = this.selectionOtherCloneCodeBasicList;
@@ -2187,7 +1910,7 @@
           //console.log(res);
           let oidArr = [];
           fromDialogPkCodebasic.forEach(ele => {
-            oidArr.push(ele.id);
+            oidArr.push(ele.oid);
           });
           let data = {
             "pkCodeRule": oid,
@@ -2235,6 +1958,7 @@
         },
         // 娣诲姞
         rowSave(row, done, loading) {
+          console.log(row);
           add(row).then(() => {
             this.onLoad(this.page);
             this.$message({
@@ -2304,25 +2028,38 @@
           this.onLoad(this.page);
         },
         searchChange(params, done) {
-          this.query = params;
           this.page.currentPage = 1;
-          this.onLoad(this.page, params);
+          // 澶氫釜conditionMap杩欐牱浼犲弬锛屽揩閫熸煡璇㈤粯璁ら噰鐢ㄦā绯婃煡璇�
+          let requestData = {};
+          if(params){
+            Object.keys(params).forEach(key=>{
+              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]);
           }
+        },
+        // 鍗曞嚮缂栫爜瑙勫垯瀹炵幇琛岄�夋嫨
+        codeRuleRowClick (row) {
+          // console.log(this.currentRuleLcStatus);
+          this.$refs.crud.toggleSelection();
+          this.$refs.crud.toggleRowSelection(row); //閫変腑褰撳墠琛�
+
         },
         selectionClear() {
           this.selectionList = [];
@@ -2337,14 +2074,23 @@
         refreshChange() {
           this.onLoad(this.page, this.query);
         },
-        onLoad(page, params = {}) {
+        onLoad(page,params={}) {
           this.loading = true;
-          gridCodeRule(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          gridCodeRule(
+            page.currentPage,
+            page.pageSize,
+            this.query
+          ).then(res => {
             //console.log(res.data);
             const data = res.data.data;
             this.page.total = data.total;
             this.data = data.records;
             this.loading = false;
+            // 鏌ヨ鐨勫�间负绌烘椂锛岃灏嗙爜娈电鐞嗙浉鍏崇殑鍐呭绂佺敤
+            if(data.records.length <= 0) {
+              this.hideBasicTable(false);
+              return;
+            }
             this.loadBasic(this.data[0])
             this.$nextTick(() => {
               this.$refs.crud.toggleRowSelection(this.data[0]);
@@ -2353,6 +2099,441 @@
             this.selectionList = data.records[0];
             //this.selectionClear();
           });
+        },
+
+
+        /** 鍩虹鐮佹鐩稿叧鏂规硶 */
+        //闃叉鎵撳紑杩囩紪杈戠獥鍙d箣鍚庤〃鍗曚腑瀛樺湪鍊硷紝鎵�浠ラ渶瑕佹竻绌�,骞跺垵濮嬪寲form琛ㄥ崟灞炴��
+        clearBasicAddForm(){
+          this.form = this.$options.data().form;
+          // this.changeSectypeFormItems(null);
+        },
+        // 鎵撳紑鏂板绐楀彛
+        openAddBasicCodeSec(){
+          if(!this.tipsMessage(this.selectionList)){
+            return;
+          }
+          if(this.selectionList[0].lcStatus != 'Editing'){
+            this.$message.warning('缂栫爜瑙勫垯鐘舵�佷笉鏄�"缂栬緫涓�"锛屼笉鍏佽缂栬緫鐮佹!');
+            return;
+          }
+          this.openBasicDialog('add',null);
+          this.loadCodeSecType();
+        },
+        // 鎵撳紑鏂板鎴栫紪杈戝熀纭�鐮佹瀵硅瘽妗�
+        openBasicDialog(condition,row){
+          //console.log(row);
+          if(condition == 'add') {
+            this.basicSecDialogTitle = '娣诲姞鐮佹淇℃伅';
+            this.showbtn = true;
+            this.basicSecOnlyRead = false;
+          }else if(condition == 'edit'){
+            if(this.selectionList.length!=1){
+              this.$message.warning('璇烽�夋嫨涓�鏉$紪鐮佽鍒欐暟鎹�!');
+              return;
+            }
+            this.basicSecDialogTitle = '淇敼鐮佹淇℃伅';
+            this.showbtn = true;
+            this.basicSecOnlyRead = false;
+            //涓篺orm缁戝畾鍊�
+          }else{
+            this.basicSecDialogTitle = '鏌ョ湅鐮佹淇℃伅';
+            this.showbtn = false;
+            this.basicSecOnlyRead = true;
+          }
+          //console.log(this.form);
+          this.changeSectypeFormItems(condition == 'add' ? null:row);
+          this.addBasicCodeSettingBox = true;
+        },
+        // 鏂板鍩虹鐮佹
+        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()){
+              await addSave(this.form).then(() => {
+                this.$message({
+                  type: "success",
+                  message: "鎿嶄綔鎴愬姛!"
+                });
+              }, error => {
+                window.console.log(error);
+              });
+              // 鍏抽棴瀵硅瘽妗�
+              this.addBasicCodeSettingBox = false
+            }
+            // 鐐瑰嚮鏂板鍩虹鐮佹,鍏抽棴绐楀彛涔嬪悗瑙﹀彂閲嶆柊鍔犺浇
+            this.loadBasic(this.selectionList[0]);
+          }else{
+            // 鍙兘鍙傜収寮曠敤鐨勪笟鍔$被鍨嬩細鍙戠敓鏀瑰彉鎵�浠ヨ繖鍎跨洿鎺ュreferConfig鐨刯son杩涜鏀瑰彉
+            if(this.form.referConfig === "coderefersec" || this.form.referConfig != undefined){
+              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;
+            }
+            editSave(this.form).then(() => {
+              this.$message({
+                type: "success",
+                message: "鎿嶄綔鎴愬姛!"
+              });
+              }, error => {
+                window.console.log(error);
+            });
+            this.loadBasic(this.selectionList[0]);
+            // 鍏抽棴瀵硅瘽妗�
+            this.addBasicCodeSettingBox = false
+          }
+        },
+        // 鍥犱负elementui鐨勮〃鍗曟牎楠岃缃笉涓婃墍浠ラ噰鐢ㄥ垽鏂殑鏂瑰紡鏉ュ仛琛ㄥ崟妫�楠屾柟寮�
+        checkForm(){
+          let form = this.form;
+          //console.log(form);
+          const regNumber = /^[0-9]+\.{0,1}[0-9]*$/; //鏁板瓧鎴栧皬鏁版鍒欐牎楠�
+          const regPos =  /^[0-9]*[1-9][0-9]*$/; //闈炶礋鏁存暟姝e垯鏍¢獙
+          const tipsMsg = "蹇呭~椤逛笉鑳戒负绌�";
+          if(form.id == ''){
+            this.$message.warning("(鐮佹缂栧彿)"+tipsMsg);
+            this.$refs.id.$el.querySelector('input').focus();
+            return false;
+          }
+          if(form.name == ''){
+            this.$message.warning("(鐮佹鍚嶇О)"+tipsMsg);
+            this.$refs.name.$el.querySelector('input').focus();
+            return false;
+          }
+          if(form.secType == ''){
+            this.$message.warning("(鐮佹绫诲瀷)"+tipsMsg);
+            this.$refs.secType.$el.querySelector('select').focus();
+            return false;
+          }
+          if(form.secType==='codefixedsec'){
+            //鍥哄畾鐮佹
+            if(form.codeSecLengthType == ''){
+              this.$message.warning("(鐮佹闀垮害绫诲瀷)"+tipsMsg);
+              // this.$refs.codeSecLengthType.$el.querySelector('select').focus();
+              return false;
+            }
+            if(form.codeSecLength == ''){
+              this.$message.warning("(鐮佹闀垮害)"+tipsMsg);
+              this.$refs.codeSecLength.$el.querySelector('input').focus();
+              return false;
+            }
+            if(!regNumber.test(form.codeSecLength)){
+              this.$message.warning("鐮佹鐨勯暱搴﹀繀椤讳负鏁板瓧鍊�");
+              this.$refs.codeSecLength.$el.querySelector('input').focus();
+              return false;
+            }
+          }else if(this.form.secType==='codeattrsec'){
+            //灞炴�х爜娈�
+            if(form.referAttributeId == ''){
+              this.$message.warning('(灞炴��)'+tipsMsg);
+              this.$refs.referAttributeId.$el.querySelector('input').focus();
+              return false;
+            }
+          }else if(this.form.secType==='codeserialsec'){
+            //console.log(form.codeFillType);
+            //娴佹按鐮佹
+            if(form.codeSecLength == ''){
+              this.$message.warning('(鐮佹鐨勯暱搴�)'+tipsMsg);
+              this.$refs.seriaCodeSecLength.$el.querySelector('input').focus();
+              return false;
+            }
+            if(!regNumber.test(form.codeSecLength)){
+              this.$message.warning('鐮佹鐨勯暱搴﹀繀椤讳负鏁板瓧鍊�');
+              this.$refs.seriaCodeSecLength.$el.querySelector('input').focus();
+              return false;
+            }
+            if(!regNumber.test(form.serialStart)){
+              this.$message.warning('娴佹按鍙风殑璧峰鍊煎繀椤讳负鏁板瓧鍊�');
+              this.$refs.serialStart.$el.querySelector('input').focus();
+              return false;
+            }
+            if(!regNumber.test(form.serialStep)){
+              this.$message.warning('娴佹按鐨勬闀垮繀椤讳负鏁板瓧鍊�');
+              this.$refs.serialStep.$el.querySelector('input').focus();
+              return false;
+            }
+            if(form.codeFillType == ''){
+              this.$message.warning('(缂栫爜琛ヤ綅鏂瑰紡)'+tipsMsg);
+              return false;
+            }
+            if(form.codeFillType != '涓嶈ˉ浣�' && form.codeFillSeparator == ''){
+              this.$message.warning('褰撹ˉ浣嶆柟寮忎负宸﹁ˉ浣嶆垨鑰呭彸琛ヤ綅鐨勬椂鍊欙紝琛ヤ綅瀛楃涓嶈兘涓虹┖');
+              return false;
+            }
+            if(form.codeFillLength == ''){
+              this.$message.warning('濉厖闀垮害涓嶈兘涓虹┖');
+              this.$refs.codeFillLength.$el.querySelector('input').focus();
+              return false;
+            }
+            if(!regNumber.test(form.codeFillLength)){
+              this.$message.warning('濉厖闀垮害蹇呴』涓烘暟瀛楀��');
+              this.$refs.codeFillLength.$el.querySelector('input').focus();
+              return false;
+            }
+            if(form.codeFillLimit == ''){
+              this.$message.warning('(娴佹按涓婇檺)'+tipsMsg);
+              this.$refs.codeFillLimit.$el.querySelector('input').focus();
+              return false;
+            }
+            if(!regNumber.test(form.codeFillLimit)){
+              this.$message.warning('娴佹按涓婇檺蹇呴』涓烘暟瀛楀��');
+              this.$refs.codeFillLimit.$el.querySelector('input').focus();
+              return false;
+            }
+            // if(form.codeFillFlag == '' || ){
+            //   this.$message.warning('(娴佹按鏄惁琛ョ爜)'+tipsMsg);
+            //   return false;
+            // }
+          }else if(this.form.secType==='codelevelsec'){
+            //灞傜骇鐮佹
+            if(form.codeLevelType == ''){
+              this.$message.warning('(灞傜骇绫诲瀷)'+tipsMsg);
+              return false;
+            }
+            if(form.codeLevelType != 'code_level_min'&& !regNumber.test(form.codeLevelValue)){
+              this.$message.warning('(灞傜骇鐨勫��)鍙兘濉啓鏁板瓧');
+              this.$refs.codeLevelValue.$el.querySelector('input').focus();
+              return false;
+            }
+            if(form.valueCutType == ''){
+              this.$message.warning('(瀛楃鎴彇绫诲瀷)'+tipsMsg);
+              // this.$refs.valueCutType.$el.querySelector('select').focus();
+              return false;
+            }
+            if(form.valueCutType != 'code_cut_none' && !regPos.test(form.valueCutLength)){
+              this.$message.warning('(鍊兼埅鍙栭暱搴�)鍙兘濉啓姝f暣鏁�');
+              this.$refs.valueCutLength.$el.querySelector('input').focus();
+              return false;
+            }
+          }else if(this.form.secType==='coderefersec'){
+            //寮曠敤鐮佹
+            if(form.referBtmId == ''){
+              this.$message.warning('(鍙傜収寮曠敤鐨勪笟鍔$被鍨�)'+tipsMsg);
+              this.$refs.referBtmId.$el.querySelector('input').focus();
+              return false;
+            }
+            if(form.referConfig == ''){
+              this.$message.warning('(鍙傜収閰嶇疆)'+tipsMsg);
+              this.$refs.referConfig.$el.querySelector('input').focus();
+              return false;
+            }
+          }else if(this.form.secType==='codedatesec'){
+            //鏃ユ湡鐮佹
+            if(form.codeDateFormatStr == ''){
+              this.$message.warning('(鏃ユ湡鏍煎紡)'+tipsMsg);
+              this.$refs.codeDateFormatStr.$el.querySelector('input').focus();
+              return false;
+            }
+          }else if(this.form.secType==='codeclassifysec'){
+            //鍒嗙被鐮佹
+            if(form.codeSecLengthType == ''){
+              this.$message.warning('(鐮佹闀垮害绫诲瀷)'+tipsMsg);
+              return false;
+            }
+            if(form.codeSecLength == ''){
+              this.$message.warning('(鐮佹闀垮害)'+tipsMsg);
+              this.$refs.classCodeSecLength.$el.querySelector('input').focus();
+              return false;
+            }
+            if(!regNumber.test(form.codeSecLength)){
+              this.$message.warning('鐮佹鐨勯暱搴﹀繀椤讳负鏁板瓧鍊�');
+              this.$refs.classCodeSecLength.$el.querySelector('input').focus();
+              return false;
+            }
+          }else if(this.form.secType==='codevariablesec'){
+            //鍙彉鐮佹
+            if(form.codeSecLength == ''){
+              this.$message.warning('(鐮佹闀垮害)'+tipsMsg);
+              this.$refs.varCodeSecLength.$el.querySelector('input').focus();
+              return false;
+            }
+            if(!regNumber.test(form.codeSecLength)){
+              this.$message.warning('鐮佹鐨勯暱搴﹀繀椤讳负鏁板瓧鍊�');
+              this.$refs.classCodeSecLength.$el.querySelector('input').focus();
+              return false;
+            }
+            if(form.codeFillType == ''){
+              this.$message.warning('(缂栫爜琛ヤ綅鏂瑰紡)'+tipsMsg);
+              return false;
+            }
+            // console.log(form);
+            if(form.codeFillType != 'code_fill_none' && form.codeFillSeparator == ''){
+              this.$message.warning('褰撹ˉ浣嶆柟寮忎负宸﹁ˉ浣嶆垨鑰呭彸琛ヤ綅鐨勬椂鍊欙紝琛ヤ綅瀛楃涓嶈兘涓虹┖');
+              return false;
+            }
+          }
+          return true;
+        },
+        // 鍒ゆ柇鏁版嵁鏄惁閫夋嫨浠ュ強鍙兘閫夋嫨鍗曟潯鏁版嵁
+        tipsMessage(list){
+          if(list.length != 1){
+            this.$message.warning("璇烽�夋嫨涓�鏉$紪鐮佽鍒欐暟鎹�!");
+            return false;
+          }
+          return true;
+        },
+        // 鍩虹鐮佹鍒犻櫎
+        deleteBasicCode(){
+          if(!this.tipsMessage(this.selectionBasicList)){
+            return;
+          }
+          let oid = this.selectionBasicList[0].oid;
+          this.$confirm("鏄惁鍒犻櫎杩欐潯鏁版嵁锛熷鏋滆寮曠敤灏嗕笉鑳借鍒犻櫎锛�", {
+            confirmButtonText: "纭畾",
+            cancelButtonText: "鍙栨秷",
+            type: "warning"
+          })
+          .then(() => {
+            let ts = new Date(this.selectionBasicList[0].ts).getTime();
+            return deleteData({"oid": oid,"ts": ts});
+          })
+          .then(() => {
+            this.loadBasic({"oid":this.currentCodeRuleOid == null || this.currentCodeRuleOid == '' ? this.selectionList[0].oid:this.currentCodeRuleOid});
+            this.$message({
+              type: "success",
+              message: "鎿嶄綔鎴愬姛!"
+            });
+            this.$refs.crudBasic.toggleSelection();
+          });
+        },
+        // 鐐瑰嚮瑙﹀彂鍔犺浇鍩虹鐮佹淇℃伅
+        loadBasic(row){
+          if(this.cloneSettingBox){
+            this.cloneTableLoading = true;
+          }else{
+            this.loadingBasic = true;
+          }
+          // console.log(row.oid);
+          //瀛樺偍褰撳墠鍏宠仈鐨勭紪鐮佽鍒欑浉鍏充俊鎭�
+          if(row!='' || row!=null){
+            this.currentCodeRuleOid = row.oid;
+            this.currentRuleLcStatus = row.lcStatus;
+            this.sendGridCodeBasicSec({"pkCodeRule":row.oid},false);
+          }
+        },
+        // 鍙戦�佸姞杞藉熀纭�鐮佹鐨勮姹�
+        sendGridCodeBasicSec(condition,isAdancedQuery/** 鏄惁楂樼骇鏌ヨ */){
+          // 濡傛灉褰撳墠鍩虹鐮佹琛ㄤ腑鐨勬悳绱㈡寜閽闅愯棌锛屽氨闇�瑕佸湪姝ゅ紑鍚�
+          if(this.selectionList.length>=0 && !this.$refs.crudBasic.option.column[0].search){
+            this.hideBasicTable(true);
+          }
+          let conditionMaps = {};
+          if(condition && !isAdancedQuery){
+            Object.keys(condition).forEach(key=>{
+              conditionMaps['conditionMap['+key+']'] = condition[key].trim();
+            });
+          }
+          if(isAdancedQuery){
+            condition['conditionMap[pkCodeRule]'] = this.currentCodeRuleOid == null || this.currentCodeRuleOid == ''
+            ? this.selectionList[0].oid:this.currentCodeRuleOid;
+          }
+          gridCodeBasicSec(1, -1,isAdancedQuery ? condition:conditionMaps).then(res => {
+            const data = res.data.data;
+            if(this.cloneSettingBox){
+              this.cloneData = data.records;
+              // console.log(tihs.cloneData);
+              this.cloneTableLoading = false;
+            }else {
+              this.basicData = data.records;
+              // console.log(this.basicData);
+              this.loadingBasic = false;
+            }
+          });
+        },
+        // 鍩虹鐮佹閫変腑鏃惰Е鍙�
+        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}),false);
+          done();
+        },
+        basicSearchReset(){
+          this.sendGridCodeBasicSec({"pkCodeRule":this.selectionList[this.selectionList.length-1].oid},false);
+        },
+        // 涓婄Щ涓嬬Щ鍩虹鐮佹
+        async upOrderNum(row){
+          if(!this.tipsMessage(this.selectionList)){
+            return;
+          }
+          if (this.selectionList[0].lcStatus != 'Editing') {
+            this.$message.warning("鍙湁缂栫爜瑙勫垯鐨勭姸鎬佹槸 [缂栬緫涓璢 鐨勬椂鍊欙紝鎵嶈兘璋冩暣鐮佹椤哄簭!");
+            return;
+          }
+          if(row.oid==null || row.oid==''){
+            this.$message.warning("鏈幏鍙栧埌蹇呭~鍙傛暟!");
+            return;
+          }
+          await upOrderNum(row.oid).then(() => {
+            this.loadBasic(this.selectionList[0]);
+            this.$message({
+              type: "success",
+              message: "鎿嶄綔鎴愬姛!"
+            });
+          })
+        },
+        downOrderNum(row){
+          //console.log(row.oid);
+          if(!this.tipsMessage(this.selectionList)){
+            return;
+          }
+          let codeRuleOid = this.selectionList[0].oid;
+          //console.log(this.selectionList);
+          if (this.selectionList[0].lcStatus != 'Editing') {
+            this.$message.warning("鍙湁缂栫爜瑙勫垯鐨勭姸鎬佹槸 [缂栬緫涓璢 鐨勬椂鍊欙紝鎵嶈兘璋冩暣鐮佹椤哄簭!");
+            return;
+          }
+          if(row.oid==null || row.oid==''){
+            this.$message.warning("鏈幏鍙栧埌蹇呭~鍙傛暟!");
+            return;
+          }
+          downOrderNum(row.oid).then(() => {
+            this.loadBasic({"oid":codeRuleOid});
+            this.$message({
+              type: "success",
+              message: "鎿嶄綔鎴愬姛!"
+            });
+          })
+        },
+        // 鍩虹鐮佹鍒锋柊鏃舵煡璇�
+        refreshChangeBasicSec(){
+          this.loadBasic(this.selectionList.at(-1));
+        },
+        // 鎿嶄綔鍩虹鐮佹涓悳绱㈡竻绌虹瓑鎸夐挳鐨勬樉绀�/闅愯棌
+        hideBasicTable(hideBoolean){
+          this.$refs.crudBasic.option.refreshBtn = hideBoolean;
+          this.$refs.crudBasic.option.column[0].search = hideBoolean;
+          this.$refs.crudBasic.option.column[1].search = hideBoolean;
+          if(!hideBoolean){
+            this.selectionList = [];
+            this.basicData = [];
+          }
+        },
+        changeCutType(value){
+          if (value != 'code_cut_none'){
+            if(this.form.valueCutLength == ''){
+              this.form.valueCutLength = 1;
+            }
+          }else{
+            this.form.valueCutLength = '';
+          }
         },
 
         /** 绗竴灞傚璇濇鐩稿叧鏂规硶 */
@@ -2371,49 +2552,14 @@
             // 璋冪敤瀛愮粍浠跺埛鏂拌〃鏍兼暟鎹�
             this.$refs[this.referBtmDialogParams.ref].referBtmOnLoad();
           }else if(condition === 'referConfig'){
-            if(func.notEmpty(this.form.referConfig) || func.notEmpty(this.form.referBtmName)){
-              this.openReconfigInterFace(this.form);
-            }else{
-              this.openTipsChooseOrCust();
+            this.referConfigVisble = true;
+            this.referConfigOption = {
+              referBtmName: this.form.referBtmName,
+              referBtmId: this.form.referBtmId,
+              referConfig: this.form.referConfig || '',
             }
+            this.$refs.referConfig.$el.querySelector('input').blur();
           }
-        },
-
-        // 褰撳墠宸插瓨鍦ㄧ紪杈戣繃鐨勫弬鐓ч厤缃紝鎵�浠ョ洿鎺ユ墦寮�鍙傜収閰嶇疆鐣岄潰
-        openReconfigInterFace(preReferConfigForm){
-          // console.log(preReferConfigForm);
-          this.$refs.referConfigFormDialog.isShowReferConfigForm = true;
-              let value = {
-                referTypeName: preReferConfigForm.referBtmName,
-                referType: preReferConfigForm.referBtmId,
-                referConfig: preReferConfigForm.referConfig,
-              }
-              this.$refs.referConfigFormDialog.initPageData(value);
-        },
-        // 鎵撳紑鑷畾涔夊弬鐓ч厤缃垨鐩存帴閫夋嫨鍙傜収閰嶇疆鐨勬彁绀烘
-        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();
         },
 
         // 鐐瑰嚮杈撳叆妗嗙殑脳鍙凤紝娓呯┖杈撳叆妗嗕腑鐨勫唴瀹�
@@ -2437,13 +2583,13 @@
         },
         // 琛ヤ綅鏃剁殑瀛楃锛屽疄鐜板彲杈撳彲閫�
         inputSelectBlur(e){
-          if (e.target.value) {  
-            this.form.codeFillSeparatorSelect = e.target.value;
+          if (e.target.value) {
+            this.form.codeFillSeparator = e.target.value;
           }
         },
         // 鐮佹绫诲瀷鏀瑰彉鏃讹紝澧炲姞瀵瑰簲鐨刦orm琛ㄥ崟涓殑灞炴��
-        changeSectypeFormItems(row){     
-          //console.log(row);   
+        changeSectypeFormItems(row){
+          //console.log(row);
           if(this.enumParam.secTypeList.length==0){
             this.loadCodeSecType();
           }
@@ -2499,8 +2645,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,      //娴佹按鏄惁琛ョ爜
@@ -2526,6 +2672,7 @@
               referBtmId: row!=null&&row.referBtmId != '' ? row.referBtmId:'',   //鍙傜収寮曠敤鐨勪笟鍔$被鍨嬶紝鐨刬d
               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'){
             //鏃ユ湡鐮佹
@@ -2547,51 +2694,64 @@
             //鍙彉鐮佹
             this.form = Object.assign({}, this.form,{
               codeSecLength: row!=null&&row.codeSecLength != '' ? row.codeSecLength:'',             //鐮佹鐨勯暱搴�
-              codeFillType: row!=null&&row.codeFillType != '' ? row.codeFillType:'code_fill_right', //缂栫爜閮ㄤ綅鏂瑰紡锛屾灇涓炬煡璇�
-              codeFillSeparatorSelect: row!=null&&row.codeFillSeparatorSelect != '' ? row.codeFillSeparatorSelect:0,  //閫変腑鐨勮ˉ浣嶆椂鐨勫瓧绗︾殑涓嬫爣
-              codeFillSeparator: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparator:'', //琛ヤ綅鏃剁殑瀛楃锛屽彲杈撳彲閫夋煡璇�
+              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:'0', //琛ヤ綅鏃剁殑瀛楃锛屽彲杈撳彲閫夋煡璇�
             });
             this.loadCodeFillType();
             this.loadCodeFillSeparator();
           }
           // console.log(this.form);
         },
+        // 绗竴娆¤姹傜殑鏋氫妇鏁版嵁鏀剧紦瀛�
+        getLocalStorageEnum(enumKey){
+          let enumCach = JSON.parse(localStorage.getItem(enumKey));
+          if(enumCach == null) {
+            getDictionary({code: enumKey}).then(res=>{
+              enumCach = res.data.data;
+              localStorage.setItem(enumKey,JSON.stringify(res.data.data));
+            })
+          }
+          return enumCach;
+        },
+        // 缁熶竴鍔犺浇鎵�鏈夋灇涓炬煡璇紝涓昏鏄负閬垮厤鍒囨崲鐮佹绫诲瀷鏃惰繕鏈姞杞藉畬鎴愮殑鎯呭喌
+        loadTotalEnum(){
+          this.loadCodeSecType();
+          this.loadCodeSecLength();
+          this.loadCodeFillType();
+          this.loadCodeFillSeparator();
+          this.loadCodeLevelType();
+          this.loadCodeCutType();
+          this.loadCodeGetValueType();
+        },
         //鏋氫妇鍜屽彲杈撳彲閫夊唴瀹规煡璇�
         loadCodeSecType(){
-          getDictionary({code: "codeSecType"}).then(res=>{
-            this.enumParam.secTypeList = res.data.data;
-          })
+          this.enumParam.secTypeList = this.getLocalStorageEnum("codeSecType");
           this.loadCodeSecLength();
         },
         loadCodeSecLength(){
-          getDictionary({code: "codeSecLength"}).then(res=>{
-            this.enumParam.codeSecLengthType = res.data.data;
-          })
+          this.enumParam.codeSecLengthType = this.getLocalStorageEnum("codeSecLength");
         },
         loadCodeFillType(){
-          getDictionary({code: "codeFillType"}).then(res=>{
-            this.enumParam.codeFillType = res.data.data;
-          })
+          this.enumParam.codeFillType = this.getLocalStorageEnum("codeFillType");
         },
         loadCodeFillSeparator(){
-          getDictionary({code: "codeFillSeparator"}).then(res=>{
-            this.enumParam.codeFillSeparator = res.data.data;
-          })
+          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(){
-          getDictionary({code: "codeLevelType"}).then(res=>{
-            this.enumParam.codeLevelType = res.data.data;
-          })
+          this.enumParam.codeLevelType = this.getLocalStorageEnum("codeLevelType");
         },
         loadCodeCutType(){
-          getDictionary({code: "codeCutType"}).then(res=>{
-            this.enumParam.codeCutType = res.data.data;
-          })
+          this.enumParam.codeCutType = this.getLocalStorageEnum("codeCutType");
         },
         loadCodeGetValueType(){
-          getDictionary({code: "codeGetValueType"}).then(res=>{
-            this.enumParam.codeGetValueType = res.data.data;
-          })
+          this.enumParam.codeGetValueType =  this.getLocalStorageEnum("codeGetValueType");
         },
         
       }
@@ -2608,7 +2768,7 @@
   .code-rule-crud > .avue-crud__pagination {
     padding: 14px 0 2px 20px;
   }
-  
+
   .clone-input-textarea > .el-form-item__content {
     width: 495px;
   }
@@ -2628,7 +2788,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;
   }
@@ -2670,8 +2830,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;
@@ -2726,4 +2886,8 @@
     padding: 5px 10px 10px;
  }
 
-</style>
\ No newline at end of file
+ .seloption{
+  margin-left: 10px;
+}
+
+</style>

--
Gitblit v1.9.3