From 7f0570d20aac189f1b170942bd7100b281a1c824 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期三, 26 四月 2023 00:07:37 +0800
Subject: [PATCH] 代码整合,新增codefixedcontroller

---
 Source/UBCS-WEB/src/views/code/code.vue | 2298 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 2,119 insertions(+), 179 deletions(-)

diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue
index c684910..3a0f97e 100644
--- a/Source/UBCS-WEB/src/views/code/code.vue
+++ b/Source/UBCS-WEB/src/views/code/code.vue
@@ -5,52 +5,52 @@
     <basic-container>
       <p style="margin-top: -12px; margin-bottom: 4px; font-weight: 570; font-size: 19px; color: #0e2d5f;">缂栫爜瑙勫垯</p>
       <avue-crud :option="optionRule"
-                :table-loading="loading"
-                :data="data"
-                :page.sync="page"
-                :permission="permissionList"
-                v-model="form"
-                ref="crud"
-                :before-open="beforeOpen"
-                @cell-click="loadBasic"
-                @row-update="rowUpdate"
-                @row-save="rowSave"
-                @search-change="searchChange"
-                @search-reset="searchReset"
-                @selection-change="selectionChange"
-                @current-change="currentChange"
-                @size-change="sizeChange"
-                @refresh-change="refreshChange"
-                @on-load="onLoad">
+        :table-loading="loading"
+        :data="data"
+        :page.sync="page"
+        :permission="permissionList"
+        v-model="ruleForm"
+        ref="crud"
+        :before-open="beforeOpen"
+        @row-click="codeRuleRowClick"
+        @row-update="rowUpdate"
+        @row-save="rowSave"
+        @search-change="searchChange"
+        @search-reset="searchReset"
+        @selection-change="selectionChange"
+        @current-change="currentChange"
+        @size-change="sizeChange"
+        @refresh-change="refreshChange"
+        @on-load="onLoad">
         <!-- 琛ㄦ牸鍐呮搷浣滄寜閽� -->
         <template slot="menu" slot-scope="scope">
           <el-button type="text"
-                    size="small"
-                    icon="el-icon-edit"
-                    v-show="scope.row.lcStatus=='Editing' ? true:false"
-                    plain
-                    @click="openEdit(scope.row)">缂� 杈�
+              size="small"
+              icon="el-icon-edit"
+              v-show="scope.row.lcStatus=='Editing' ? true:false"
+              plain
+              @click="openEdit(scope.row)">缂� 杈�
           </el-button>
           <el-button type="text"
-                    size="small"
-                    icon="el-icon-position"
-                    v-show="scope.row.lcStatus=='Editing' ? true:false"
-                    plain
-                    @click="enableOrDeactivatse(scope.row.oid,'release')">鍙� 甯�
+            size="small"
+            icon="el-icon-position"
+            v-show="scope.row.lcStatus=='Editing' ? true:false"
+            plain
+            @click="enableOrDeactivatse(scope.row.oid,'release')">鍙� 甯�
           </el-button>
           <el-button type="text"
-                    size="small"
-                    v-show="scope.row.lcStatus=='Released' ? true:false"
-                    icon="el-icon-video-pause"
-                    plain
-                    @click="enableOrDeactivatse(scope.row.oid,'disable')">鍋� 鐢�
+            size="small"
+            v-show="scope.row.lcStatus=='Released' ? true:false"
+            icon="el-icon-video-pause"
+            plain
+            @click="enableOrDeactivatse(scope.row.oid,'disable')">鍋� 鐢�
           </el-button>
           <el-button type="text"
-                    size="small"
-                    v-show="scope.row.lcStatus=='Disabled' ? true:false"
-                    icon="el-icon-video-play"
-                    plain
-                    @click="enableOrDeactivatse(scope.row.oid,'enable')">鍚� 鐢�
+            size="small"
+            v-show="scope.row.lcStatus=='Disabled' ? true:false"
+            icon="el-icon-video-play"
+            plain
+            @click="enableOrDeactivatse(scope.row.oid,'enable')">鍚� 鐢�
           </el-button>
         </template>
         <!-- 琛ㄦ牸宸︿笂鏂规寜閽尯鍩� -->
@@ -86,110 +86,798 @@
       </avue-crud>
     </basic-container>
 
-    <!-- 瀵硅瘽妗� -->
+    <!-- 缂栫爜瑙勫垯鐩稿叧瀵硅瘽妗� -->
     <el-dialog title="缂栫爜瑙勫垯浣跨敤鑼冨洿"
-                append-to-body
-                :visible.sync="codeRangeSettingBox"
-                width="800px">
+        append-to-body
+        :visible.sync="codeRangeSettingBox"
+        width="800px">
       <avue-crud
-              :option="dialogeOption" 
-              :table-loading="dialogLoading"
-              :data="useRangeData"
-              @refresh-change="refreshUseRangeChange"></avue-crud>
+        :option="dialogeOption" 
+        :table-loading="dialogLoading"
+        :data="useRangeData"
+        @refresh-change="refreshUseRangeChange">
+      </avue-crud>
     </el-dialog>
-    <!-- 鍏嬮殕瀵硅瘽妗� -->
+    <!--  缂栫爜瑙勫垯鐩稿叧鍏嬮殕瀵硅瘽妗� -->
     <el-dialog title="鍏嬮殕缂栫爜瑙勫垯"
-                append-to-body
-                :visible.sync="cloneSettingBox"
-                width="800px">
+      append-to-body
+      :visible.sync="cloneSettingBox"
+      width="800px">
       <clone-code></clone-code>
     </el-dialog>
 
     <!-- 鍩虹鐮佹灞曠ず鍖哄煙 -->
     <basic-container>
-        <p style="margin-top: -12px; margin-bottom: 4px; font-weight: 570; font-size: 19px; color: #0e2d5f;">鐮佹绠$悊</p>
-        <avue-crud :option="optionBasic"
+      <p style="margin-top: -12px; margin-bottom: 4px; font-weight: 570; font-size: 19px; color: #0e2d5f;">鐮佹绠$悊</p>
+      <avue-crud :option="optionBasic"
+        ref="crudBasic"
         :table-loading="loadingBasic"
         :data="basicData"
         :permission="permissionList"
         @selection-change="selectionBasicChange"
         @refresh-change="refreshChangeBasicSec">
 
-        <!-- 鍩虹鐮佹琛ㄦ牸鍐呮搷浣滄寜閽� -->
-        <template slot="menu" slot-scope="scope">
+      <!-- 鍩虹鐮佹琛ㄦ牸鍐呮搷浣滄寜閽� -->
+      <template slot="menu" slot-scope="scope">
+        <el-button
+          type="text"
+          size="small"
+          icon="el-icon-view"
+          v-show="currentRuleLcStatus != 'Editing'"
+          plain
+          @click="openBasicDialog('view',scope.row)">鏌ョ湅
+        </el-button>
+        <el-button
+          type="text"
+          size="small"
+          icon="el-icon-edit"
+          v-show="currentRuleLcStatus === 'Editing'"
+          plain
+          @click="openBasicDialog('edit',scope.row)">缂栬緫
+        </el-button>
+        <el-button
+          type="text"
+          size="small"
+          icon="el-icon-setting"
+          v-show="scope.row.secType === 'codeclassifysec' || scope.row.secType == 'codefixedsec'"
+          plain
+          @click="openBasicSecCodeValueMgr(scope.row)">鐮佸�肩鐞�
+        </el-button>
+        <el-button
+          type="text"
+          size="small"
+          icon="el-icon-arrow-up"
+          v-show="scope.row.orderNum > 1"
+          plain
+          @click="upOrderNum(scope.row)">涓婄Щ
+        </el-button>
+        <el-button
+          type="text"
+          size="small"
+          icon="el-icon-arrow-down"
+          plain
+          @click="downOrderNum(scope.row)">涓嬬Щ
+        </el-button>
+      </template>
 
-          <el-button type="text"
-                    size="small"
-                    icon="icon-shangyi"
-                    v-show="scope.row.lcStatus != 'Editing' ? true:false"
-                    plain
-                    @click="openEdit(scope.row)">鏌� 鐪�
-          </el-button>
+      <!-- 鍩虹鐮佹琛ㄦ牸宸︿笂鏂规寜閽尯鍩� -->
+      <template slot="menuLeft" slot-scope="scope">
+        <el-button type="primary"
+                  size="small"
+                  icon="el-icon-plus"
+                  @click="addBasicCodeSec">鏂� 澧�
+        </el-button>
+        <el-button type="danger"
+                  size="small"
+                  icon="el-icon-delete"
+                  plain
+                  @click="deleteBasicCode(scope.row)">鍒� 闄�
+        </el-button>
+      </template>
 
-          <el-button type="text"
-                    size="small"
-                    icon="icon-shangyi"
-                    v-show="scope.row.lcStatus == 'Editing' ? true:false"
-                    plain
-                    @click="openEdit(scope.row)">缂� 杈�
-          </el-button>
-
-          <el-button type="text"
-                    size="small"
-                    icon="icon-shangyi"
-                    v-show="scope.row.secType == 'codeclassifysec' || scope.row.secType == 'codefixedsec' ? true:false"
-                    plain
-                    @click="openEdit(scope.row)">鐮佸�肩鐞�
-          </el-button>
-
-          <el-button type="text"
-                    size="small"
-                    icon="icon-shangyi"
-                    v-show="scope.row.orderNum > 1 ? true:false"
-                    plain
-                    @click="upOrderNum(scope.row)">涓� 绉�
-          </el-button>
-          
-          <el-button type="text"
-                    size="small"
-                    icon="icon-xiayi"
-                    plain
-                    @click="downOrderNum(scope.row)">涓� 绉�
-          </el-button>
-          
-        </template>
-
-        <!-- 鍩虹鐮佹琛ㄦ牸宸︿笂鏂规寜閽尯鍩� -->
-        <template slot="menuLeft" slot-scope="scope">
-          <el-button type="primary"
-                    size="small"
-                    icon="el-icon-plus"
-                    @click="addBasicCodeSec">鏂� 澧�
-          </el-button>
-          <el-button type="danger"
-                    size="small"
-                    icon="el-icon-delete"
-                    plain
-                    @click="deleteBasicCode(scope.row)">鍒� 闄�
-          </el-button>
-        </template>
-
-    </avue-crud>
+      </avue-crud>
     </basic-container>
 
-     <!-- 鍩虹缂栫爜瑙勫垯瀵硅瘽妗� @closed="closeRefresh"-->
-     <el-dialog title="娣诲姞鐮佹淇℃伅"
-                    append-to-body
-                    :visible.sync="addBasicCodeSettingBox"
-                    width="780px"
-                    style=" margin-top: -8vh;"
-                    destroy-on-close>
-        <add-basic-code ref='addBasicChild'></add-basic-code>
+      <!-- 鐮佹鐮佸�肩鐞嗗璇濇 -->
+      <el-dialog title="鐮佹鐮佸�肩鐞�"
+        :visible.sync="isShowBasicSecCodeValueMgr"
+        :width="isShowFixedForm ? '68vw':'50vw'"
+        append-to-body
+        style="height: 116vh; margin-top: -10vh;"
+        @close="clearFixedOrClassifyForm('close')"
+        destroy-on-close>
+        <!-- 鍒嗙被鐮佹鐮佸�肩鐞� -->
+        <el-row v-show="!isShowFixedForm">
+          <el-col :span="11">
+            <basic-container>
+              <div class="box" style="height:65vh; margin-bottom:-40px">
+                <el-scrollbar style="border-bottom-right-radius:8px ">
+                  <basic-container>
+                    <div class="abox" style="height:54vh">
+                      <avue-tree
+                        :data="attrClassifyTreeData" 
+                        :option="treeOption" 
+                        @node-click="nodeClick"
+                        style="overflow-y: auto; height: 54vh"/>
+                    </div>
+                  </basic-container>
+                </el-scrollbar>
+              </div>
+              <div style="margin-top:20px; display: flex; align-items:center; justify-content:center;">
+                <el-button size="mini" type="primary" icon="el-icon-arrow-up" class="button">涓婄Щ</el-button>
+                <el-button size="mini" type="primary" icon="el-icon-arrow-down" class="button">涓嬬Щ</el-button>
+              </div>
+            </basic-container>
+          </el-col>
+          <el-col :span="13">
+            <basic-container>
+              <div class="box" style="height:65vh; margin-bottom:-40px">
+                <el-form>
+                  <el-form-item label="鐮佸��:" :label-width="50" required>
+                    <el-input style="width: 18vw" v-model="codeClassifyForm.id"></el-input>
+                  </el-form-item >
+                  <el-form-item label="鍚嶇О:" :label-width="50" required>
+                    <el-input style="width: 18vw" v-model="codeClassifyForm.name"></el-input>
+                  </el-form-item>
+                </el-form>
+              </div>
+              <div style="margin-top:20px; display: flex; align-items:center; justify-content:center;">
+                <el-button size="mini" type="primary" icon="el-icon-circle-plus" class="button">娣诲姞</el-button>
+                <el-button size="mini" type="success" plain icon="el-icon-edit-outline" class="button">淇敼</el-button>
+                <el-button size="mini" type="danger" icon="el-icon-close" class="button">鍒犻櫎</el-button>
+                <el-button size="mini" type="warning" plain icon="el-icon-close" class="button">鍙栨秷</el-button>
+              </div>
+            </basic-container>
+          </el-col>
+        </el-row>
+        <!-- 鍥哄畾鐮佹鐮佸�肩鐞� -->
+        <el-row v-show="isShowFixedForm">
+          <el-col :span="15">
+            <basic-container>
+              <div class="box fixedbox" style="height:65vh; margin-bottom:-40px">
+                <avue-crud
+                  ref="crudFixedValue"
+                  :data="fixedValueData"
+                  :option="fixedValueOption"
+                  :table-loading="fixedValueOptionLoading"
+                  @row-click="selectedCodeValueRow">
+                  <!-- 琛ㄦ牸鍐呮寜閽厤缃� -->
+                  <template slot="menu" slot-scope="scope">
+                    <el-button size="mini" type="text" icon="el-icon-arrow-up" @click="codeFixedValueOpetion('up',scope.row)">涓婄Щ</el-button>
+                    <el-button size="mini" type="text" icon="el-icon-arrow-down" @click="codeFixedValueOpetion('down',scope.row)">涓嬬Щ</el-button>
+                    <el-button size="mini" type="text"icon="el-icon-minus" @click="codeFixedValueOpetion('remove',scope.row)">绉婚櫎</el-button>
+                  </template>
+                </avue-crud>
+              </div>
+              <div style="margin-top:20px;">
+                <el-button size="mini" type="primary" icon="el-icon-success" class="button" @click="saveCodeFixedValueOption">淇濆瓨</el-button>
+              </div>
+            </basic-container>
+          </el-col>
+          <el-col :span="9">
+            <basic-container>
+              <div class="box" style="height: 65vh; margin-bottom:-40px; overflow:hidden;" >
+                <div style="overflow-y:auto;height: 60vh;">
+                  <el-form>
+                    <el-form-item label="鐮佸��:" label-width="54px" required>
+                      <el-input style="width: 19.5vw" v-model="codeFixdForm.id"></el-input>
+                    </el-form-item >
+                    <el-form-item label="鎻忚堪:">
+                      <el-input type="textarea" style="width: 20vw; "v-model="codeFixdForm.description"></el-input>
+                    </el-form-item>
+                  </el-form>
+                </div>
+              </div>
+              <div style="margin-top:20px; display: flex; align-items:center; justify-content:center;">
+                <el-button :disabled="selectedFixedOrCodeclassifyValue!=''" size="mini" type="primary" icon="el-icon-circle-plus" class="button" @click="addCodeSecValue('codefixedsec')">娣诲姞</el-button>
+                <el-button :disabled="selectedFixedOrCodeclassifyValue==''" size="mini" type="success" plain plain icon="el-icon-edit-outline" class="button" @click="editCodeSecValue('codefixedsec')">淇敼</el-button>
+                <el-button :disabled="selectedFixedOrCodeclassifyValue==''" size="mini" type="danger" icon="el-icon-close" class="button"  @click="delCodeSecValue('codefixedsec')">鍒犻櫎</el-button>
+                <el-button size="mini" type="warning" plain icon="el-icon-close" class="button" @click = "clearFixedOrClassifyForm('codefixedsec')">鍙栨秷</el-button>
+              </div>
+            </basic-container>
+          </el-col>
+        </el-row>
+      </el-dialog>
+
+     <!-- 鍩虹鐮佹鏂板鐩稿叧瀵硅瘽妗� -->
+     <el-dialog :title="basicSecDialogTitle"
+        :visible.sync="addBasicCodeSettingBox"
+        width="60vw"
+        append-to-body
+        style="height: 115vh; margin-top: -13vh; overflow: hidden"
+        destroy-on-close
+        @close="clearBasicAddForm">
+
+
+        <!--  绗竴灞傚璇濇,娣诲姞鐮佹淇℃伅瀵硅瘽妗嗕腑鐨勫唴瀹� -->
+        <div class="total" style="overflow-y: auto; height: 70vh">
+          <el-form :model="form" :rules="formRules" ref="form" >
+            <span class="left">
+              <el-form-item label="鐮佹缂栧彿:" :label-width="leftFormLabelWidth" required prop="id">
+                <el-input v-model="form.id" :readonly="basicSecOnlyRead"></el-input>
+              </el-form-item>
+
+              <el-form-item label="鐮佹鍚嶇О:" :label-width="leftFormLabelWidth" required prop="name">
+                <el-input v-model="form.name" :readonly="basicSecOnlyRead"></el-input>
+              </el-form-item>
+              <el-form-item label="鐮佹绫诲瀷" :label-width="leftFormLabelWidth" required prop="secType">
+                <el-select v-model="form.secType" placeholder="璇烽�夋嫨" @change="changeSectypeFormItems(null)" :disabled="basicSecOnlyRead">
+                  <el-option
+                    v-for="item in sectypeList"
+                    :key="item.dictValue"
+                    :label="item.dictValue"
+                    :value="item.dictKey">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+
+              <el-form-item label="鎻忚堪:" :label-width="leftFormLabelWidth">
+                <el-input type="textarea" v-model="form.description" :readonly="basicSecOnlyRead"></el-input>
+              </el-form-item>
+
+              <el-form-item label="鏄惁娴佹按渚濊禆:" :label-width="leftFormLabelWidth">
+                <el-switch v-model="form.serialDependFlag" :disabled="basicSecOnlyRead"></el-switch>
+                <el-input-number v-show="form.serialDependFlag" v-model="form.serialDependOrder" controls-position="right" :readonly="basicSecOnlyRead"></el-input-number>
+              </el-form-item>
+
+              <el-form-item label="鏄惁涓虹┖:" :label-width="leftFormLabelWidth">
+                <el-switch v-model="form.nullableFlag"  :disabled="basicSecOnlyRead"></el-switch>
+              </el-form-item>
+            </span>
+            <el-divider direction="vertical"></el-divider>
+            <span class="right">
+              <!-- 鍥哄畾鐮佹 -->
+              <div v-show="form.secType==='codefixedsec' ? true:false">
+                <el-form-item label="鐮佹闀垮害绫诲瀷:" :label-width="rightFormLabelWidth" required prop="codeSecLengthType">
+                  <el-select v-model="form.codeSecLengthType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
+                    <el-option
+                    v-for="item in codeSecLengthType"
+                    :key="item.dictValue"
+                    :label="item.dictValue"
+                    :value="item.dictKey">
+                  </el-option>
+                  </el-select>
+                </el-form-item>
+                <el-form-item label="鐮佹鐨勯暱搴�:" :label-width="rightFormLabelWidth" required prop="codeSecLength">
+                  <el-input v-model="form.codeSecLength" :readonly="basicSecOnlyRead"></el-input>
+                </el-form-item>
+              </div>
+              <!-- 灞炴�х爜娈� -->
+              <div v-show="form.secType==='codeattrsec' ? true:false">
+                <el-form-item label="灞炴��:" :label-width="rightFormLabelWidth" required prop="referAttributeName">
+                  <el-input
+                    placeholder="璇烽�夋嫨"
+                    prefix-icon="el-icon-search"
+                    readonly="true"
+                    v-model="form.referAttributeName"
+                    @focus="openAttrSelectOrGetValue('attr')"
+                    :disabled="basicSecOnlyRead">
+                    <i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('attr')" style="cursor: pointer;"></i>
+                  </el-input>
+                </el-form-item>
+                <el-form-item label="灞炴�ф墍鍦ㄥ垎绫�:" :label-width="rightFormLabelWidth">
+                  <el-input 
+                    v-model="form.referCodeClassifyOidName"
+                    disabled>
+                </el-input>
+                </el-form-item>
+                <el-form-item label="鍙栧�艰鍒�:" :label-width="rightFormLabelWidth">
+                  <el-input
+                    placeholder="璇烽�夋嫨"
+                    prefix-icon="el-icon-search"
+                    readonly="true"
+                    v-model="form.getValueClass"
+                    :disabled="basicSecOnlyRead"
+                    @focus="openAttrSelectOrGetValue('value')">
+                    <i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('value')" style="margin-right: 5px;cursor: pointer;"></i>
+                  </el-input>
+                </el-form-item>
+              </div>
+              <!-- 娴佹按鐮佹 -->
+              <div v-show="form.secType==='codeserialsec' ? true:false">
+                <el-form-item label="鐮佹鐨勯暱搴�:" :label-width="rightFormLabelWidth" required prop="codeSecLength">
+                  <el-input v-model="form.codeSecLength" :readonly="basicSecOnlyRead"></el-input>
+                </el-form-item>
+                <el-form-item label="娴佹按鍙风殑璧峰鍊�:" :label-width="rightFormLabelWidth" prop="serialStart">
+                  <el-input v-model="form.serialStart" :readonly="basicSecOnlyRead"></el-input>
+                </el-form-item>
+                <el-form-item label="娴佹按鐨勬闀�:" :label-width="rightFormLabelWidth" prop="serialStep">
+                  <el-input v-model="form.serialStep" :readonly="basicSecOnlyRead"></el-input>
+                </el-form-item>
+                <el-form-item label="缂栫爜琛ヤ綅鏂瑰紡:" :label-width="rightFormLabelWidth" required prop="codeFillType">
+                  <el-select v-model="form.codeFillType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
+                    <el-option label="宸﹁ˉ浣�" value="codeattrsec"
+                        v-for="item in codeFillType"
+                        :key="item.dictValue"
+                        :label="item.dictValue"
+                        :value="item.dictKey">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+                <el-form-item label="琛ヤ綅鏃剁殑瀛楃:" :label-width="rightFormLabelWidth" prop="codeFillSeparatorSelect">
+                  <el-select v-model="form.codeFillSeparatorSelect" filterable placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
+                    <el-option
+                        v-for="item in codeFillSeparator"
+                        :key="item.dictValue"
+                        :label="item.dictValue"
+                        :value="item.dictKey">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+                <el-form-item label="濉厖闀垮害:" :label-width="rightFormLabelWidth" required prop="codeFillLength">
+                  <el-input v-model="form.codeFillLength" :readonly="basicSecOnlyRead"></el-input>
+                </el-form-item>
+                <el-form-item label="娴佹按涓婇檺:" :label-width="rightFormLabelWidth" required prop="codeFillLimit">
+                  <el-input v-model="form.codeFillLimit" :readonly="basicSecOnlyRead"></el-input>
+                </el-form-item>
+                <el-form-item label="娴佹按鏄惁琛ョ爜:" :label-width="rightFormLabelWidth" required>
+                  <el-switch v-model="form.codeFillFlag" :disabled="basicSecOnlyRead"></el-switch>
+                </el-form-item>
+                <el-form-item label="鑷畾涔夌殑娴佹按绠楁硶:" :label-width="rightFormLabelWidth">
+                  <el-input v-model="form.customCodeSerialClass" :readonly="basicSecOnlyRead"></el-input>
+                </el-form-item>
+              </div>
+              <!-- 灞傜骇鐮佹 -->
+              <div v-show="form.secType==='codelevelsec' ? true:false">
+                <el-form-item label="灞傜骇绫诲瀷:" :label-width="rightFormLabelWidth" required prop="codeLevelType">
+                  <el-select v-model="form.codeLevelType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
+                    <el-option
+                        v-for="item in codeLevelType"
+                        :key="item.dictValue"
+                        :label="item.dictValue"
+                        :value="item.dictKey">
+                      </el-option>
+                  </el-select>
+                </el-form-item>
+                <el-form-item label="灞傜骇鐨勫��:" :label-width="rightFormLabelWidth" prop="codeLevelValue">
+                  <el-input v-model="form.codeLevelValue" :readonly="basicSecOnlyRead"></el-input>
+                </el-form-item>
+                <el-form-item label="瀛楃鎴彇绫诲瀷:" :label-width="rightFormLabelWidth" required prop="valueCutType">
+                  <el-select v-model="form.valueCutType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
+                    <el-option
+                      v-for="item in codeCutType"
+                      :key="item.dictValue"
+                      :label="item.dictValue"
+                      :value="item.dictKey">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+                <el-form-item label="鍙栧�肩被鍨�:" :label-width="rightFormLabelWidth">
+                  <el-select v-model="form.codeGetValueType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
+                    <el-option
+                      v-for="item in codeGetValueType"
+                      :key="item.dictValue"
+                      :label="item.dictValue"
+                      :value="item.dictKey">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </div>
+              <!-- 寮曠敤鐮佹 -->
+              <div v-show="form.secType==='coderefersec' ? true:false">
+                <el-form-item label="鍙傜収寮曠敤鐨勪笟鍔$被鍨�:" label-width="152px" required prop="referBtmId">
+                  <el-input
+                    placeholder="璇烽�夋嫨"
+                    prefix-icon="el-icon-search"
+                    readonly="true"
+                    v-model="form.referBtmId"
+                    @focus="openAttrSelectOrGetValue('referBtmId')"
+                    :disabled="basicSecOnlyRead">
+                    <i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('referBtmId')" style="margin-right: 5px;cursor: pointer;"></i>
+                  </el-input>
+                </el-form-item>
+                <el-form-item label="鍙傜収閰嶇疆:" label-width="152px" required prop="referConfig">
+                  <el-input
+                    placeholder="璇烽�夋嫨"
+                    prefix-icon="el-icon-search"
+                    readonly="true"
+                    v-model="form.referConfig"
+                    @focus="openAttrSelectOrGetValue('referConfig')"
+                    :disabled="basicSecOnlyRead">
+                    <i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('referConfig')" style="margin-right: 5px;cursor: pointer;"></i>
+                  </el-input>
+                </el-form-item>
+              </div>
+              <!-- 鏃ユ湡鐮佹 -->
+              <div v-show="form.secType==='codedatesec' ? true:false">
+                <el-form-item label="鏃ユ湡鏍煎紡:" :label-width="rightFormLabelWidth" required prop="codeDateFormatStr">
+                  <el-input v-model="form.codeDateFormatStr" :readonly="basicSecOnlyRead"></el-input>
+                </el-form-item>
+              </div>
+              <!-- 鍒嗙被鐮佹 -->
+              <div v-show="form.secType==='codeclassifysec' ? true:false">
+                <el-form-item label="鐮佹闀垮害绫诲瀷:" :label-width="rightFormLabelWidth" required prop="codeSecLengthType">
+                  <el-select v-model="form.codeSecLengthType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
+                    <el-option
+                        v-for="item in codeSecLengthType"
+                        :key="item.dictValue"
+                        :label="item.dictValue"
+                        :value="item.dictKey">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+                <el-form-item label="鐮佹鐨勯暱搴�:" :label-width="rightFormLabelWidth" required prop="codeSecLength">
+                  <el-input v-model="form.codeSecLength" :readonly="basicSecOnlyRead"></el-input>
+                </el-form-item>
+                <el-form-item label="鏄惁鑷姩鍒嗛厤鍒嗙被鍊�:" :label-width="rightFormLabelWidth">
+                  <el-switch v-model="form.matchClassifyValueFlag" :disabled="basicSecOnlyRead"></el-switch>
+                </el-form-item>
+                <el-form-item label="鐖跺垎绫荤爜娈�:" :label-width="rightFormLabelWidth">
+                  <el-input
+                    placeholder="璇烽�夋嫨"
+                    prefix-icon="el-icon-search"
+                    readonly="true"
+                    v-model="form.parentClassifySecOid"
+                    @focus="openAttrSelectOrGetValue('parentClassifySecOid')"
+                    :disabled="basicSecOnlyRead">
+                    <i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('parentClassifySecOid')" style="margin-right: 5px;cursor: pointer;"></i>
+                  </el-input>
+                </el-form-item>
+              </div>
+              <!-- 鍙彉鐮佹 -->
+              <div v-show="form.secType==='codevariablesec' ? true:false">
+                <el-form-item label="鐮佹鐨勯暱搴�:" :label-width="rightFormLabelWidth" required prop="codeSecLength">
+                  <el-input v-model="form.codeSecLength" :readonly="basicSecOnlyRead"></el-input>
+                </el-form-item>
+                <el-form-item label="缂栫爜琛ヤ綅鏂瑰紡:" :label-width="rightFormLabelWidth" required prop="codeFillType">
+                  <el-select v-model="form.codeFillType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
+                    <el-option
+                        v-for="item in codeFillType"
+                        :key="item.dictValue"
+                        :label="item.dictValue"
+                        :value="item.dictKey">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+                <el-form-item label="琛ヤ綅鏃剁殑瀛楃:" :label-width="rightFormLabelWidth">
+                  <el-select v-model="form.codeFillSeparatorSelect" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead">
+                    <el-option
+                        v-for="item in codeFillSeparator"
+                        :key="item.dictValue"
+                        :label="item.dictValue"
+                        :value="item.dictKey">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </div>
+            </span>
+          </el-form>
+        </div>
+        <!-- 绗竴灞傚璇濇鐨勬寜閽拰锛岀嚎鏉� -->
         <el-divider direction="horizontal"></el-divider>
         <div slot="footer" class="dialog-footer">
-          <el-button @click="addBasicCodeSettingBox = false">鍙� 娑�</el-button>
-          <el-button type="primary" @click="saveBasicCode">淇� 瀛�</el-button>
+          <el-button @click="addBasicCodeSettingBox = false" v-show="showbtn">鍙� 娑�</el-button>
+          <el-button type="primary" @click="saveOrEditBasicCode" v-show="showbtn">淇� 瀛�</el-button>
         </div>
+
+        <!--  绗簩灞傚璇濇,灞炴�х爜娈碉紝灞炴�ч�夋嫨寮圭獥 -->
+        <el-dialog title="涓恒�愬睘鎬с�戦�夊彇鍊�"
+          append-to-body
+          :visible.sync="isShowSelectAttrOption"
+          width="78%"
+          style="height: 100%; margin-top: -8vh; overflow: hidden">
+          <div style="overflow-y: auto; height: 60vh">
+            <el-row>
+              <!-- 宸︿晶涓婚搴撳垎绫绘爲 -->
+              <el-col :span="5">
+                <div class="box">
+                  <el-scrollbar style="height: auto; border-bottom-right-radius:8px ">
+                    <basic-container>
+                      <div class="abox">
+                        <avue-tree :data="attrClassifyTreeData" :option="treeOption" @node-click="nodeClick"/>
+                      </div>
+                    </basic-container>
+                  </el-scrollbar>
+                </div>
+              </el-col>
+
+              <!-- 鍙充晶琛ㄦ牸鏄剧ず鍖哄煙 -->
+              <el-col span="19">
+                <basic-container>
+                  <div class="bbox">
+                  <avue-crud
+                    :data="selectattrData"
+                    :option="attrOption"
+                    :table-loading="selectAttrOptionLoading"
+                    @search-change="selectAttrOptionSearchChange"
+                    @search-reset="searchAttrReset"
+                    @selection-change="selectionChangeAttr">
+                  </avue-crud>
+                  </div>
+                </basic-container>
+              </el-col>
+
+            </el-row>
+          </div>
+
+          <div slot="footer" class="dialog-footer">
+            <el-button @click="isShowSelectAttrOption = false">鍙� 娑�</el-button>
+            <el-button type="primary" @click="selectedListClassifyLinkAttr">纭� 瀹�</el-button>
+          </div>
+          
+        </el-dialog>
+
+         <!-- 绗簩灞傚璇濇,灞炴�х爜娈碉紝鍏紡缂栬緫妗嗗脊绐� -->
+        <el-dialog title="鍏紡缂栬緫妗�"
+          append-to-body
+          :visible.sync="isShowformulaEdit"
+          @close="closeFormulaEdit"
+          width="78%"
+          style="height: 150vh; margin-top: -13vh; overflow: hidden">
+
+          <div style="overflow-y: auto; height: 80vh">
+            <el-row>
+              <!-- 宸︿晶鍏紡鍐呭 -->
+              <el-col :span="14" style="overflow: hidden">
+                <el-card class="box-card" style="height: 33vh; overflow-y: auto; overflow-x: auto;">
+                    <div slot="header" class="clearfix">
+                      <span style="font-size: medium;" >鍏紡鍐呭</span>
+                      <el-button type="primary" size="mini" style="float: right;" @click="saveFormulaContent">纭畾</el-button>
+                      <el-button type="warning" size="mini" style="margin-right: 10px; float: right;" @click="resetFormulaContent">娓呯┖鍐呭</el-button>
+                    </div>
+                    <div class="text item">
+                      <el-input type="textarea" :rows="5" style="width: 560px;" v-model="formulaContent"></el-input>
+                    </div>
+
+                </el-card>
+              </el-col>
+              <!-- 鍙充晶杩愮畻绗� -->
+              <el-col :span="10">
+                <el-card class="box-card" style="height: 33vh; overflow-y: auto; overflow-x: auto;">
+                  <div slot="header" class="clearfix">
+                    <span style="font-size: medium;">杩愮畻绗�</span>
+                  </div>
+                  <div class="text item">
+                    <div class="formula-editor">
+                      <div class="one">
+                        <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'7'})">7</button>
+                        <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'8'})">8</button>
+                        <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'9'})">9</button>
+                        <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'/'})">/</button><br/>
+                      </div>
+                      <div class="one">
+                        <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'4'})">4</button>
+                        <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'5'})">5</button>
+                        <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'6'})">6</button>
+                        <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'*'})">*</button><br/>
+                      </div>
+                      <div class="one">
+                        <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'1'})">1</button>
+                        <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'2'})">2</button>
+                        <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'3'})">3</button>
+                        <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'>'})">-</button><br/>
+                      </div>
+                      <div class="one">
+                        <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'0'})">0</button>
+                        <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'00'})">00</button>
+                        <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'.'})">.</button>
+                        <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'+'})">+</button><br/>
+                      </div>
+                      <div class="one">
+                        <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'->'})">-></button>
+                        <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'=='})">==</button>
+                        <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'('})">(</button>
+                        <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':')'})">)</button><br/>
+                      </div>
+                      <div class="one">
+                        <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'<'})">&lt;</button>
+                        <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'>'})">&gt;</button>
+                        <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'<='})">&lt;=</button>
+                        <button class="formula-editor-btn-sm" @click="dbClickAddContent({'formula':'>='})">&gt;=</button>
+                      </div>
+                    </div>
+                  </div>
+                </el-card>
+              </el-col>
+            </el-row>
+
+            <el-row>
+              <!-- 宸︿晶鍏紡閫夋嫨鍖哄煙 -->
+              <el-col :span="14" style="overflow: hidden">
+                <el-card class="box-card" style="height: 40vh; overflow-y: auto; overflow-x: auto;">
+                  <div slot="header" class="clearfix">
+                    <span style="font-size: medium;">鍏紡閫夋嫨</span>
+                  </div>
+                  <div class="text item">
+                    <el-tabs v-model="activeName">
+
+                      <el-tab-pane label="甯哥敤" name="first">
+                        <el-table
+                          :data="commonFormulaTableData"
+                          :show-header="false"
+                          @row-dblclick="dbClickAddContent"
+                          style="width: 100%">
+                          <el-table-column
+                            prop="formula"
+                            width="300">
+                          </el-table-column>
+                          <el-table-column
+                            prop="desc"
+                            width="300">
+                          </el-table-column>
+                        </el-table>
+                      </el-tab-pane>
+
+                      <el-tab-pane label="璐㈠姟" name="second">
+                        <el-table
+                          :data="financialFormulaTableData"
+                          @row-dblclick="dbClickAddContent"
+                          :show-header="false"
+                          style="width: 100%">
+                          <el-table-column
+                            prop="formula"
+                            width="300">
+                          </el-table-column>
+                          <el-table-column
+                            prop="desc"
+                            width="300">
+                          </el-table-column>
+                        </el-table>
+                      </el-tab-pane>
+
+                      <el-tab-pane label="鏃ユ湡" name="third">
+                        <el-table
+                          :data="dateFormulaTableData"
+                          :show-header="false"
+                          @row-dblclick="dbClickAddContent"
+                          style="width: 100%">
+                          <el-table-column
+                            prop="formula"
+                            width="300">
+                          </el-table-column>
+                          <el-table-column
+                            prop="desc"
+                            width="300">
+                          </el-table-column>
+                        </el-table>
+                      </el-tab-pane>
+
+                      <el-tab-pane label="鏁板" name="fourth">
+                        <el-table
+                          :data="mathFormulaTableData"
+                          :show-header="false"
+                          @row-dblclick="dbClickAddContent"
+                          style="width: 100%">
+                          <el-table-column
+                            prop="formula"
+                            width="300">
+                          </el-table-column>
+                          <el-table-column
+                            prop="desc"
+                            width="300">
+                          </el-table-column>
+                        </el-table>
+                      </el-tab-pane>
+
+                      <el-tab-pane label="鍏朵粬" name="five">
+                        <el-table
+                          :data="otherFormulaTableData"
+                          @row-dblclick="dbClickAddContent"
+                          :show-header="false"
+                          style="width: 100%">
+                          <el-table-column
+                            prop="formula"
+                            width="300">
+                          </el-table-column>
+                          <el-table-column
+                            prop="desc"
+                            width="300">
+                          </el-table-column>
+                        </el-table>
+                      </el-tab-pane>
+
+                    </el-tabs>
+                    
+                  </div>
+                </el-card>
+              </el-col>
+              <!-- 鍙充晶鍙橀噺閫夋嫨鍖哄煙 -->
+              <el-col :span="10" style="overflow: hidden">
+                <el-card class="box-card" style="height: 40vh; overflow-y: auto; overflow-x: auto;">
+                  <div slot="header" class="clearfix">
+                    <span style="font-size: medium;">鍙橀噺</span>
+                  </div>
+                  <div class="text item">
+                    <el-tabs v-model="activeNameAttr">
+                      <el-tab-pane label="鏈満鏅彉閲�" name="first">
+                        <el-table
+                          :data="thisSceneTableData"
+                          @row-dblclick="dbClickAddContent"
+                          :show-header="false"
+                          style="width: 100%">
+                          <el-table-column
+                            prop="formula"
+                            width="40">
+                          </el-table-column>
+                          <el-table-column
+                            prop="desc"
+                            width="100">
+                          </el-table-column>
+                        </el-table>
+                      </el-tab-pane>
+                      <el-tab-pane label="绯荤粺鍙橀噺" name="second">
+                        <el-table
+                          :data="systemVariableTableData"
+                          @row-dblclick="dbClickAddContent"
+                          :show-header="false"
+                          style="width: 100%">
+                          <el-table-column
+                            prop="formula"
+                            width="150">
+                          </el-table-column>
+                          <el-table-column
+                            prop="desc"
+                            width="150">
+                          </el-table-column>
+                        </el-table>
+                      </el-tab-pane>
+                    </el-tabs>
+                  </div>
+                </el-card>
+              </el-col>
+            </el-row>
+          </div>
+          
+        </el-dialog>
+
+        <!-- 绗簩灞傚璇濇,涓恒�愮埗鍒嗙被鐮佹銆戦�夊彇鍊煎脊绐� -->
+        <el-dialog title="涓恒�愮埗鍒嗙被鐮佹銆戦�夊彇鍊�"
+          append-to-body
+          :visible.sync="isShowParentClassifyOption"
+          width="65%"
+          style="height: 150vh; margin-top: -13vh;"
+          destroy-on-close>
+
+          <avue-crud
+            :page.sync="parentClassifyDataPage"
+            ref="crudParentClassify"
+            :option="parentClassifyParentOption" 
+            :table-loading="classifyDialogLoading"
+            :data="parentClassifyData"
+            @refresh-change="refreshParentClassifyDataChange"
+            @search-change="parentClassifySearchChange"
+            @search-reset="parentClassifySearchReset"
+            @selection-change="parentClassifySelectionChange"
+            @current-change="parentClassifyCurrentChange"
+            @size-change="parentClassifySizeChange"
+            @on-load="parentClassifyOnLoad">
+          </avue-crud>
+
+          <div slot="footer" class="dialog-footer">
+            <el-button @click="isShowParentClassifyOption = false">鍙� 娑�</el-button>
+            <el-button type="primary" @click="saveSelectedParentClassify">淇� 瀛�</el-button>
+          </div>
+        </el-dialog>
+
+        <!-- 绗簩灞傚璇濇,涓恒�愬弬鐓у紩鐢ㄧ殑涓氬姟绫诲瀷銆戦�夊彇鍊煎脊绐� -->
+        <el-dialog title="涓恒�愬弬鐓у紩鐢ㄧ殑涓氬姟绫诲瀷銆戦�夊彇鍊�"
+          append-to-body
+          :visible.sync="isShowSelectReferBtmOption"
+          width="65%"
+          style="height: 150vh; margin-top: -13vh;"
+          destroy-on-close>
+
+          <avue-crud
+            :page.sync="referBtmDataPage"
+            ref="crudReferBtm"
+            :option="referBtmOption" 
+            :table-loading="referBtmDialogLoading"
+            :data="referBtmData"
+            @refresh-change="referBtmDataChange"
+            @search-change="referBtmSearchChange"
+            @search-reset="referBtmSearchReset"
+            @selection-change="referBtmSelectionChange"
+            @current-change="referBtmCurrentChange"
+            @size-change="referBtmSizeChange"
+            @on-load="referBtmOnLoad">
+          </avue-crud>
+
+          <div slot="footer" class="dialog-footer">
+            <el-button @click="isShowSelectReferBtmOption = false">鍙� 娑�</el-button>
+            <el-button type="primary" @click="saveSelectedreferBtm">淇� 瀛�</el-button>
+          </div>
+        </el-dialog>
+
       </el-dialog>
 
   </basic-container>
@@ -198,15 +886,35 @@
 
 <script>
   import { gridCodeRule, getDetail, add, update, remove, listUseRange, updateStatus } from "@/api/code/mdmrule";
-  import { gridCodeBasicSec, downOrderNum, upOrderNum, deleteData, editSave, getObjectByOid, listDataByOids, refDataGrid} from "@/api/code/codebasic";
+  import { 
+    gridCodeBasicSec, 
+    downOrderNum, 
+    upOrderNum, 
+    deleteData, 
+    editSave, 
+    getObjectByOid, 
+    listDataByOids, 
+    refDataGrid,
+    addSave,
+    refDataGridClassifySec,
+  } from "@/api/code/codebasic";
+  import { treeTopCodeClassify, listClassifyLinkAttr } from "@/api/code/codeclassify";
+  import { gridCodeFixedValue,addSaveCodeFixedValue,deleteCodeFixedValue,editCodeFixedValue,saveOrder } from "@/api/code/codeFixedValue";
+  import { treeCodeClassifyValue } from "@/api/code/codeClassifyValue";
   import optionBasic from "@/const/code/codebasic";
   import optionRule from "@/const/code/mdmrule";
+  import attrOption from "@/const/code/selectAttrOptionDialog";
+  import treeOption from "@/const/code/classifyTreeOptionDialog";
+  import parentClassifyParentOption from "@/const/code/parentClassifyParentOptionDialog";
+  import referBtmOption from "@/const/code/referBtmDialog";
+  import fixedValueOption from "@/const/code/fixedValueMgrDialog";
+  import { getDictionary } from "@/api/omd/dict";
   import {mapGetters} from "vuex";
 
 export default {
     data() {
       return {
-        form: {},
+        ruleForm: {},
         query: {},
         loading: true,
         currentCodeRuleOid: '',
@@ -216,55 +924,556 @@
           total: 0
         },
         selectionList: [],
-        //缂栫爜瑙勫垯琛ㄦ牸閰嶇疆
+        /*缂栫爜瑙勫垯琛ㄦ牸閰嶇疆*/
         optionRule: optionRule,
-
         data: [],
-
+        currentRuleLcStatus: '',
         /*鍏嬮殕鎸夐挳瀵硅瘽妗嗘帶鍒�*/
         cloneSettingBox: false,
-        optionBasic: optionBasic,
+        optionBasic: optionBasic,   
+        /*浣跨敤鑼冨洿瀵硅瘽妗嗘樉绀烘帶鍒�*/
+        codeRangeSettingBox: false,
+        useRangeData: [],
+        dialogLoading: true,
+        /*浣跨敤鑼冨洿瀵硅瘽妗嗛厤缃�*/
+        dialogeOption: {
+          height: 'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: false,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          disablePage:false,
+          viewBtn: false,
+          addBtn: false,
+          menu: false,
+          selection: false,
+          dialogClickModal: false,
+          align: 'center',
+          dialogWidth: 400,
+          column: [
+            {
+              label: "鍒嗙被缂栧彿",
+              prop: "id",
+              span: 24
+            },
+            {
+              label: "鍒嗙被鍚嶇О",
+              prop: "name",
+              span: 24,
+            }
+          ]
+        },
 
-        //鍩虹鐮佹灞曠ず
+        /*鍩虹鐮佹鐩稿叧鏁版嵁*/
         basicData:[],
         loadingBasic: true,
         selectionBasicList: [],
         addBasicCodeSettingBox: false,
-        
-        /*浣跨敤鑼冨洿瀵硅瘽妗嗘帶鍒�*/
-        codeRangeSettingBox: false,
-        useRangeData: [],
-        dialogLoading: true,
-        /*浣跨敤鑼冨洿瀵硅瘽妗�*/
-        dialogeOption: {
-        height: 'auto',
-        calcHeight: 30,
-        tip: false,
-        searchShow: false,
-        searchMenuSpan: 6,
-        border: true,
-        index: true,
-        disablePage:false,
-        viewBtn: false,
-        addBtn: false,
-        menu: false,
-        selection: false,
-        dialogClickModal: false,
-        align: 'center',
-        dialogWidth: 400,
-        column: [
-          {
-            label: "鍒嗙被缂栧彿",
-            prop: "id",
-            span: 24
+        showbtn: false, //鍩虹鐮佹鏂板鏄惁鏄剧ず鍩虹鐮佹
+        basicSecDialogTitle: '', //鍩虹鐮佹绗竴灞傚璇濇鏍囬
+        basicSecOnlyRead: false, //鏂板鍩虹鐮佹琛ㄥ崟鏄惁鍙
+
+
+        /** 鐮佸�肩鐞嗙浉鍏虫暟鎹� */
+        isShowBasicSecCodeValueMgr: false, //鐮佹鐮佸�肩鐞嗗璇濇
+        codefixedsecOrCodeclassifysecOid: '', //瀛樻斁鍩虹鐮佹鐐瑰嚮鐮佸�肩鐞嗘椂鐨勫綋鍓嶈id锛岀敤浜庝繚瀛樼爜鍊兼椂浣跨敤
+        selectedFixedOrCodeclassifyValue: '', //褰撳墠閫変腑鐨勭爜鍊兼暟鎹�
+        //鍥哄畾鐮佹鐮佸�艰〃鍗�
+        codeFixdForm: {
+          codeFixedSecOid: "",
+          description: "",
+          id: "",
+        }, 
+        isShowFixedForm: true, //true鏄剧ず鍥哄畾鐮佹鐮佸�肩鐞嗙晫闈紝false鏄剧ず鍒嗙被鐮佹鐮佸�肩鐞嗙晫闈�
+        fixedValueData: [], //鍥哄畾鐮佹鐮佸�艰〃鏍兼暟鎹�
+        fixedValueOption: fixedValueOption, //琛ㄦ牸閰嶇疆
+        fixedValueOptionLoading: false,  //鍔犺浇琛ㄦ牸鐨勫姩鎬佹晥鏋�
+        fixedValueSelectList: [],  //鍥哄畾鐮佹鐮佸�煎綋鍓嶉�変腑鐨勮
+
+        //鍒嗙被鐮佹鐮佸�艰〃鍗�
+        codeClassifyForm: {
+          codeclassifysecoid: "",
+          id: "",
+          name: "",
+          oid: "",
+          parentclassifyvalueoid: "",
+        },
+
+
+        /* 涓哄睘鎬ч�夊彇鍊肩獥鍙f樉绀烘墦寮�鎺у埗鍙橀噺 */
+        isShowSelectAttrOption: false,
+        /* 涓哄睘鎬ч�夊�煎乏渚ф爲鏁版嵁 */
+        attrClassifyTreeData: [],
+        treeOption: treeOption,
+        currentSelectTreeData: '', //褰撳墠閫変腑鐨勬爲鑺傜偣
+        /* 涓哄睘鎬ч�夊�煎彸渚ц〃鏍肩浉鍏虫暟鎹� */
+        attrOption: attrOption,
+        selectattrData: [],
+        selectAttrOptionLoading: false,
+        selectionChangeAttrList: [],
+
+        /*鍏紡缂栬緫妗嗗璇濇鐩稿叧鏁版嵁*/
+        isShowformulaEdit: false, //鍏紡缂栬緫妗嗗璇濇鏄剧ず鎺у埗
+        formulaContent: '', //鍏紡缂栬緫妗嗗唴瀹�
+        activeName: 'first', //褰撳墠娲诲姩鐨則ab
+        activeNameAttr: 'first', //鍙橀噺涓殑褰撳墠娲诲姩tab
+        //甯哥敤鍏紡
+        commonFormulaTableData: [{
+            "formula": 'if(compare,trueResult,falseResult)',
+            "desc": '濡傛灉compare鐨勮〃杈惧紡涓簍rue锛屽垯鎵цtrueResult鐨勮〃杈惧紡锛屽惁鍒欐墽琛宖laseResult.渚嬪if(3>2,2*(3+2),3/(2-4)),鍊肩瓑浜�10',
           },
           {
-            label: "鍒嗙被鍚嶇О",
-            prop: "name",
-            span: 24,
+            "formula": 'sum(douber1,douber2)',
+            "desc": '涓や釜鏍煎紡涓篸ouber鐨勫弬鏁版眰鍜�',
+          },
+          {
+            "formula": 'sub(douber1,douber2)',
+            "desc": '鏍煎紡涓篸ouber鐨勫弬鏁癲ouber1鍑忓幓鏍煎紡涓篸ouber鐨勫弬鏁癲ouber2',
+          },
+          {
+            "formula": 'mul(douber1,douber2)',
+            "desc": '涓や釜鏍煎紡涓篸ouber鐨勫弬鏁扮浉涔�',
+          },
+          {
+            "formula": 'div(douber1,douber2)',
+            "desc": '鏍煎紡涓篸ouber鐨勫弬鏁癲ouber1闄や互鏍煎紡涓篸ouber鐨勫弬鏁癲ouber2.褰揹ouber2绛変簬0鐨勬椂鍊欙紝杩斿洖0;濡傛灉闄や笉灏界殑鏃跺�欎繚鐣�10浣嶅皬鏁�',
+          },
+          {
+            "formula": 'mod(int,int)',
+            "desc": '姹備綑鏁�',
+          },
+          {
+            "formula": 'toInt(string)',
+            "desc": '杞崲涓篿nt鏍煎紡',
+          },
+          {
+            "formula": 'doubleRound(string,count)',
+            "desc": '澶勭悊douber鐨勫皬鏁颁綅鏁帮紝count琛ㄧず灏忔暟浣嶆暟',
+          },
+          {
+            "formula": 'zeroIfNull(value)',
+            "desc": '濡傛灉鍙傛暟鐨勫�间负null鎴栬��"",灏嗚繑鍥�0',
+          },
+          {
+            "formula": 'endsWith(string,str1)',
+            "desc": '瀛楃涓瞫tring鏄笉鏄互str1缁撳熬',
+          },
+          {
+            "formula": 'startsWith(string,str1)',
+            "desc": '瀛楃涓瞫tring鏄惁浠tr1寮�澶�',
+          },
+          {
+            "formula": 'charAt(string,index)',
+            "desc": '鑾峰彇瀛楃涓瞫tring涓index浣嶇疆鐨勫瓧绗︼紝濡傛灉闀垮害灏忎簬index锛屽垯杩斿洖',
+          },
+          {
+            "formula": 'equalsIgnoreCase(str1,str2)',
+            "desc": '瀛楃涓瞫tr1鍜屽瓧绗︿覆str2鏄惁鐩哥瓑',
+          },
+          {
+            "formula": 'indexOf(str1,str2)',
+            "desc": '瀛楃涓瞫tr2鍦ㄥ瓧绗︿覆str1涓娆″嚭鐜扮殑浣嶇疆',
+          },
+          {
+            "formula": 'isEmpty(str1)',
+            "desc": '鍙傛暟str1鏄惁涓虹┖锛屽叾涓璶ull杩欎釜瀛楃涓蹭篃琛ㄧず涓虹┖',
+          },
+          {
+            "formula": 'lastIndexOf(str1,str2)',
+            "desc": '瀛楃涓瞫tr2鍦ㄥ瓧绗︿覆str1涓渶鍚庡嚭鐜扮殑浣嶇疆',
+          },
+          {
+            "formula": 'leftStr(str1,index)',
+            "desc": '鑾峰彇index浣嶇疆宸︿晶鐨勬墍鏈夊瓧绗�',
+          },
+          {
+            "formula": 'rightStr(str1,str2)',
+            "desc": '鑾峰彇index浣嶇疆鍙充晶鐨勬墍鏈夊瓧绗�',
+          },
+          {
+            "formula": 'length(str1)',
+            "desc": '鍙傛暟str1鐨勯暱搴�',
+          },
+          {
+            "formula": 'mid(str1,start,end)',
+            "desc": '鑾峰彇str1鐨勪粠start鍒癳nd鐩存帴鐨勫瓧绗︿覆锛屽嚭鐜板紓甯告椂杩斿洖',
+          },
+          {
+            "formula": 'tolowercase(str1)',
+            "desc": '灏嗗瓧绗︿覆str1杞负灏忓啓',
+          },
+          {
+            "formula": 'touppercase(str1)',
+            "desc": '灏嗗瓧绗︿覆str1杞负澶у啓',
+          },
+          {
+            "formula": 'trimzero(str1)',
+            "desc": '鍘婚櫎瀛楃涓瞫tr1涓殑0',
+          },
+          {
+            "formula": 'MD5(str1)',
+            "desc": '灏嗗瓧绗︿覆杩涜MD5鍔犲瘑',
+          },
+        ],
+       //璐㈠姟鍏紡
+        financialFormulaTableData: [{
+            "formula": 'toChinese(value)',
+            "desc": '灏嗛樋鎷変集鏁板瓧杞负涓烘眽瀛楀ぇ鍐欐柟寮�'
+          },
+          {
+            "formula": 'getChineseCurrency(value)',
+            "desc": '灏嗛樋鎷変集鏁板瓧杞负涓烘眽瀛楅噾棰濆ぇ鍐欐柟寮忥紝涓巘ochiness鐨勫尯鍒槸杩欎釜浼氭樉绀哄厓銆佽銆佸垎'
+          },
+          {
+            "formula": 'setThmark(value)',
+            "desc": '涓哄弬鏁皏alue璁剧疆鍗冨垎浣�'
           }
-        ]
-      },
+        ],
+        //鏃ユ湡鍏紡
+        dateFormulaTableData: [{
+            "formula": 'compareDate(d1,d2)',
+            "desc": '瀵规瘮鍙傛暟d1,d2鐨勫ぇ灏忋�俤1,d2涓簓yyy-MM-dd鏍煎紡鐨勬棩鏈熷瓧绗︿覆'
+          },
+          {
+            "formula": 'nowDate()',
+            "desc": '鑾峰彇褰撳墠鏃ユ湡'
+          },
+          {
+            "formula": 'chinaDate(d1)',
+            "desc": '灏嗘椂闂磋浆鎹负鍐滃巻锛宒1鏄痽yyy-MM-dd鏍煎紡鐨勬棩鏈熷瓧绗︿覆'
+          },
+          {
+            "formula": 'dateAdd(d1,count)',
+            "desc": '鍦╠1鐨勫熀纭�涓婃坊鍔燾ount澶�,d1涓簓yyy-MM-dd HH:mm:ss鏍煎紡鐨勬椂闂村瓧绗︿覆'
+          },
+          {
+            "formula": 'dateBalanceYear(sourceDate,targetDate,false)',
+            "desc": '璁$畻鐩稿樊鐨勫勾浠斤紝姣斿璁$畻骞撮緞锛宼argetDate涓�""琛ㄧず褰撳墠鏃堕棿锛岀涓変釜鍙傛暟涓簍rue琛ㄧず鏈夊浣欑殑鏈堜唤鎴栬�呭ぉ鏁版椂锛屽氨鍔�1;'
+          },
+          {
+            "formula": 'dateBalanceDay(sourceDate,targetDate)',
+            "desc": '璁$畻鐩稿樊鐨勫ぉ鏁帮紝targetDate涓�""琛ㄧず褰撳墠鏃堕棿'
+          },
+          {
+            "formula": 'dateformat(d1,format)<',
+            "desc": '灏嗗綋鍓嶇殑鏃ユ湡锛堟椂闂达級瀛楃涓茶浆涓烘寚瀹氱殑瀛楃涓诧紝濡傛灉format鐨勫唴瀹规湁绌烘牸锛岃浣跨敤&浠f浛'
+          },
+          {
+            "formula": 'nowDatetime()',
+            "desc": '鑾峰彇褰撳墠鏃ユ湡鍜屾椂闂淬�傛牸寮忎负yyyy-MM-dd HH:mm:ss'
+          },
+          {
+            "formula": 'dayOf(d1)',
+            "desc": '鑾峰彇鏍煎紡涓簓yyy-MM-dd鐨勬棩鏈熺殑澶╂暟'
+          },
+          {
+            "formula": 'nowMon()',
+            "desc": '鑾峰彇褰撳墠鐨勬湀浠斤紝鏍煎紡涓篗M'
+          },
+          {
+            "formula": 'monOf(d1)',
+            "desc": '鑾峰彇鏃ユ湡d1鐨勬湀浠芥暟'
+          },
+          {
+            "formula": 'nowTime()',
+            "desc": '鑾峰彇褰撳墠鏃堕棿锛屾牸寮忎负HH:mm:ss'
+          },
+          {
+            "formula": 'nowYear()',
+            "desc": '鑾峰彇骞翠唤锛屾牸寮忎负yyyy'
+          },
+          {
+            "formula": 'yearOf()',
+            "desc": '鑾峰彇鏃堕棿d1鐨勫勾浠�'
+          }
+        ],
+        //鏁板鍏紡
+        mathFormulaTableData: [{
+            "formula": 'abs(value)',
+            "desc": '姹傚弬鏁皏alue鐨勭粷瀵瑰�硷紝value蹇呴』涓烘暟瀛楁牸寮�'
+          },
+          {
+            "formula": 'acos(value)',
+            "desc": '姹傚弬鏁皏alue鐨勫弽浣欏鸡锛寁alue蹇呴』涓烘暟瀛楁牸寮�'
+          },
+          {
+            "formula": 'asin(value)',
+            "desc": '姹傚弬鏁皏alue鐨勫弽姝e鸡锛寁alue蹇呴』涓烘暟瀛楁牸寮�'
+          },
+          {
+            "formula": 'atan(value)',
+            "desc": '姹傚弬鏁皏alue鐨勫弽姝e垏锛寁alue蹇呴』涓烘暟瀛楁牸寮�'
+          },
+          {
+            "formula": 'cbrt(value)',
+            "desc": '姹傚弬鏁皏alue鐨勭珛鏂规牴锛寁alue蹇呴』涓烘暟瀛楁牸寮�'
+          },
+          {
+            "formula": 'ceil(value)',
+            "desc": '杩斿洖涓嶅ぇ浜庡弬鏁皏alue鐨勬渶灏忔暣鏁帮紝渚嬪ceil(1.7)灏辩瓑浜�2锛寁alue蹇呴』涓烘暟瀛楁牸寮�'
+          },
+          {
+            "formula": 'cos(value)',
+            "desc": '姹傚弬鏁皏alue鐨勪綑寮﹀�硷紝value蹇呴』涓烘暟瀛楁牸寮�'
+          },
+          {
+            "formula": 'cosh(value)',
+            "desc": '姹傚弬鏁皏alue鐨勫弻鏇蹭綑寮﹀�硷紝value蹇呴』涓烘暟瀛楁牸寮�'
+          },
+          {
+            "formula": 'exp(n)',
+            "desc": '娆ф媺鏁� e 鐨刵娆″箓锛宯蹇呴』涓烘暟瀛楁牸寮�'
+          },
+          {
+            "formula": 'floor(n)',
+            "desc": '娆ф媺鏁� e 鐨刵娆″箓鍑�1锛宯蹇呴』涓烘暟瀛楁牸寮�'
+          },
+          {
+            "formula": 'log(value)',
+            "desc": '杩斿洖涓嶅皬浜庡弬鏁皏alue鐨勬渶澶ф暣鏁帮紝渚嬪floor(1.7)绛変簬1锛宯蹇呴』涓烘暟瀛楁牸寮�'
+          },
+          {
+            "formula": 'log10(value)',
+            "desc": '鑷劧瀵规暟,value蹇呴』涓烘暟瀛楁牸寮�'
+          },
+          {
+            "formula": 'log1p(value)',
+            "desc": '璁$畻搴曟暟涓� 10 鐨勫鏁�,value蹇呴』涓烘暟瀛楁牸寮�'
+          },
+          {
+            "formula": 'random()',
+            "desc": '杩斿洖鍙傛暟涓� 1 涔嬪拰鐨勮嚜鐒跺鏁帮紝value蹇呴』涓烘暟瀛楁牸寮�'
+          },
+          {
+            "formula": 'rint(value)',
+            "desc": '杩斿洖涓�涓吉闅忔満鏁帮紝璇ュ�煎ぇ浜庣瓑浜� 0.0 涓斿皬浜� 1.0'
+          },
+          {
+            "formula": 'round(value)',
+            "desc": '杩斿洖鍏跺�兼渶鎺ヨ繎鍙傛暟骞朵笖鏄暣鏁扮殑 double 鍊笺�傚鏋滀袱涓暣鏁扮殑 double 鍊奸兘鍚屾牱鎺ヨ繎锛岄偅涔堢粨鏋滃彇鍋舵暟銆傜壒娈婃儏鍐垫槸锛氬鏋滃弬鏁板�兼槸鏁存暟锛岄偅涔堢粨鏋滃氨鏄鍙傛暟銆傚鏋滃弬鏁版槸 NaN 鎴栨棤绌峰ぇ鎴栨闆舵垨璐熼浂锛岄偅涔堢粨鏋滀笌鍙傛暟鐩稿悓'
+          },
+          {
+            "formula": 'signum(value)',
+            "desc": '绗﹀彿鍑芥暟锛涘鏋滃弬鏁颁负 0锛屽垯杩斿洖 0锛涘鏋滃弬鏁板ぇ浜� 0锛� 鍒欒繑鍥� 1.0锛涘鏋滃弬鏁板皬浜� 0锛屽垯杩斿洖 -1.0'
+          },
+          {
+            "formula": 'sin(value)',
+            "desc": '姹傚弬鏁皏alue鐨勬寮﹀�硷紝value蹇呴』涓烘暟瀛楁牸寮�'
+          },
+          {
+            "formula": 'sinh(value)',
+            "desc": '姹傚弬鏁皏alue鐨勫弻鏇叉寮﹀�硷紝value蹇呴』涓烘暟瀛楁牸寮�'
+          },
+          {
+            "formula": 'tan(value)',
+            "desc": '姹傚弬鏁皏alue鐨勬鍒囧�硷紝value蹇呴』涓烘暟瀛楁牸寮�'
+          },
+          {
+            "formula": 'tanh(value)',
+            "desc": '姹傚弬鏁皏alue鐨勫弻鏇叉鍒囧�硷紝value蹇呴』涓烘暟瀛楁牸寮�'
+          },
+          {
+            "formula": 'max(v1,v2)',
+            "desc": '姹備袱涓暟涓殑杈冨ぇ鐨勫�硷紝v1,v2閮藉繀椤讳负鏁板瓧鏍煎紡锛屼緥濡俶ax(3.2,3)灏辩瓑浜�3.2'
+          },
+          {
+            "formula": 'min(v1,v2)',
+            "desc": '姹備袱涓暟涓殑杈冨皬鐨勫�硷紝v1,v2閮藉繀椤讳负鏁板瓧鏍煎紡锛屼緥濡俶ax(3.2,3)灏辩瓑浜�3'
+          },
+          {
+            "formula": 'sqrt(value)',
+            "desc": '姹傚钩鏂规牴'
+          },
+        ],
+        //鍏朵粬鍏紡
+        otherFormulaTableData: [{
+            "formula": 'getcolvalue(servername,tablename,fieldname,pkField,pkValue)',
+            "desc": '鏌ヨservername涓璽ablename鏁版嵁搴撹〃涓璮ieldname瀛楁鐨勫�硷紝pkfield琛ㄧず涓婚敭鐨勫瓧娈靛悕绉帮紝pkValue琛ㄧず涓婚敭鐨勫�硷紝serverName鐜板湪榛樿涓簂ocalServer'
+          },
+        ],
+        //鏈満鏅彉閲�
+        thisSceneTableData: [{
+            "formula": '${}',
+            "desc": ' '
+          },
+        ],
+        //绯荤粺鍙橀噺
+        systemVariableTableData: [{
+            "formula": '#CURRENTUSER.OID#',
+            "desc": '褰撳墠鐢ㄦ埛鐨勪富閿�'
+          },
+          {
+            "formula": '#CURRENTUSER.ID#',
+            "desc": '褰撳墠鐢ㄦ埛鐨勮处鎴�'
+          },
+          {
+            "formula": '#CURRENTTIME#',
+            "desc": '褰撳墠鏃堕棿'
+          },
+          {
+            "formula": '#CURRENTDATE#',
+            "desc": '褰撳墠鏃ユ湡'
+          },
+          {
+            "formula": '#CURRENTDATETIME#',
+            "desc": '褰撳墠鏃ユ湡鏃堕棿'
+          },
+          {
+            "formula": '#CURRENTUSER_NAME#',
+            "desc": '褰撳墠鐢ㄦ埛鐨勫鍚�'
+          },
+          {
+            "formula": '#CURRENTUSER.SECRETGRADE#',
+            "desc": '褰撳墠鐢ㄦ埛瀵嗙骇'
+          },
+          {
+            "formula": '#CURRENTUSER.IPSECRET#',
+            "desc": '褰撳墠鐢ㄦ埛鐨処P瀵嗙骇'
+          },
+          {
+            "formula": '#CURRENTUSER.BUSINESSUNIT#',
+            "desc": '褰撳墠鐢ㄦ埛鎵�灞炰笟鍔″崟鍏�'
+          },
+          {
+            "formula": '#CURRENTUSER.BUSINESSUNITNAME#',
+            "desc": '褰撳墠鐢ㄦ埛鎵�灞炰笟鍔″崟鍏冨悕绉�'
+          },
+          {
+            "formula": '#CURRENTUSER.GROUPOID#',
+            "desc": '褰撳墠鐢ㄦ埛鐨勯儴闂ㄤ富閿�'
+          },
+          {
+            "formula": '#CURRENTUSER.GROUPNAME#',
+            "desc": '褰撳墠鐢ㄦ埛鎵�灞為儴闂ㄥ悕绉�'
+          },
+          {
+            "formula": '#CURRENTUSER.EMAIL#',
+            "desc": '褰撳墠鐢ㄦ埛閭欢鍦板潃'
+          },
+          {
+            "formula": '#CURRENTUSER.ROLENAME#',
+            "desc": '褰撳墠鐢ㄦ埛鎵�灞炶鑹插悕绉�'
+          }
+        ],
+
+
+        /* 鐖跺垎绫荤爜娈靛璇濇 */
+        isShowParentClassifyOption: false, //鐖跺垎绫荤爜娈靛璇濇鏄剧ず鎺у埗
+        classifyDialogLoading: true, //琛ㄦ牸鏁版嵁鍔犺浇鎻愮ず
+        parentClassifyParentOption: parentClassifyParentOption,  //琛ㄦ牸閰嶇疆
+        parentClassifyData: [], //琛ㄦ牸鏁版嵁
+        //鍒嗛〉鍙傛暟閰嶇疆
+        parentClassifyDataPage: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        parentClassifyQuery: {}, //鏌ヨ鏉′欢
+        parentClassifySelectionList: [], //褰撳墠閫変腑琛�
+
+        
+        /** 鍙傜収寮曠敤鐨勪笟鍔$被鍨嬪璇濇鐩稿叧鏁版嵁 */
+        isShowSelectReferBtmOption: false,   //瀵硅瘽妗嗘樉绀烘帶鍒�
+        referBtmDialogLoading: true,   //琛ㄦ牸鏁版嵁鍔犺浇鎻愮ず
+        referBtmDataPage: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        referBtmOption: referBtmOption, //琛ㄦ牸閰嶇疆
+        referBtmData: [], //琛ㄦ牸鏁版嵁
+        referBtmQuery: {}, //鏌ヨ鏉′欢
+        referBtmSelectionList: [], //褰撳墠閫変腑琛�
+
+        /** 鍩虹鐮佹鏂板琛ㄥ崟 */
+        form: {
+          id: '', //缂栧彿
+          name: '', //鍚嶇О
+          secType: 'codefixedsec', //鐮佹绫诲瀷
+          description: '', //鎻忚堪
+          serialDependFlag: false, //鏄惁娴佹按渚濊禆
+          serialDependOrder: '', //娴佹按渚濊禆椤哄簭
+          nullableFlag: false, //鏄惁涓虹┖
+          displayFlag: false, //
+          componentCodeFlag: false, //鏄惁鍙備笌缂栫爜
+          pkCodeRule: '', //鎵�灞炵紪鐮佽鍒�
+        },
+        formRules: {
+          id: [
+            { required: true, message: '璇疯緭鍏ョ爜娈电紪鍙�', trigger: 'blur' },
+          ],
+          name: [
+            { required: true, message: '璇疯緭鍏ョ爜娈靛悕绉�', trigger: 'blur' },
+          ],
+          secType: [
+            { required: true, message: '璇疯緭鍏ョ爜娈靛悕绉�', trigger: 'blur' },
+          ],
+          codeSecLengthType: [
+            { required: true, message: '璇烽�夋嫨鐮佹闀垮害绫诲瀷', trigger: 'change' },
+          ],
+          codeSecLength: [
+            { required: true, message: '璇疯緭鍏ョ爜娈电殑闀垮害', trigger: 'blur' },
+            { type: 'number', message: '鐮佹鐨勯暱搴﹀繀椤讳负鏁板瓧鍊�'}
+          ],
+          referAttributeName: [
+            { required: true, message: '璇烽�夋嫨灞炴��', trigger: 'blur' },
+          ],
+          serialStart: [
+            { type: 'number', message: '鐮佹鐨勯暱搴﹀繀椤讳负鏁板瓧鍊�'}
+          ],
+          serialStep: [
+            { type: 'number', message: '鐮佹鐨勯暱搴﹀繀椤讳负鏁板瓧鍊�'}
+          ],
+          codeFillType: [
+            { required: true, message: '璇烽�夋嫨缂栫爜琛ヤ綅鏂瑰紡', trigger: 'blur' },
+          ],
+          // 璁剧疆琛ヤ綅鏃剁殑瀛楃锛岄渶瑕佽嚜瀹氫箟鏂规硶鏉ュ仛鍒ゆ柇
+          codeFillSeparatorSelect: [
+            { required: true, message: '璇疯緭鍏ヨˉ浣嶆椂鐨勫瓧绗�', trigger: 'blur' },
+          ],
+          codeFillLength: [
+            { required: true, message: '璇疯緭鍏ュ~鍏呴暱搴�', trigger: 'blur' },
+            { type: 'number', message: '濉厖闀垮害蹇呴』涓烘暟瀛楀��'}
+          ],
+          codeFillLimit: [
+            { required: true, message: '璇疯緭鍏ユ祦姘翠笂闄�', trigger: 'blur' },
+            { type: 'number', message: '娴佹按涓婇檺蹇呴』涓烘暟瀛楀��'}
+          ],
+          codeLevelType: [
+            { required: true, message: '璇烽�夋嫨灞傜骇绫诲瀷', trigger: 'change' },
+          ],
+          codeLevelValue: [
+            { type: 'number', message: '灞傜骇鐨勫�煎繀椤讳负鏁板瓧鍊�'}
+          ],
+          valueCutType: [
+            { required: true, message: '璇烽�夋嫨瀛楃鎴彇绫诲瀷', trigger: 'change' },
+          ],
+          referBtmId: [
+            { required: true, message: '璇烽�夊弬鐓у簲鐢ㄧ殑涓氬姟绫诲瀷', trigger: 'change' },
+          ],
+          referConfig: [
+            { required: true, message: '璇烽�夋嫨鍙傜収閰嶇疆', trigger: 'change' },
+          ],
+          codeDateFormatStr: [
+            { required: true, message: '璇疯緭鍏ユ棩鏈熸牸寮�', trigger: 'blur' },
+          ],
+
+        },
+        //鏋氫妇鍜屽彲杈撳彲閫夋煡璇�
+        sectypeList:[],    //鐮佹绫诲瀷
+        codeSecLengthType:[],  //鐮佹闀垮害绫诲瀷
+        codeFillType:[],   //缂栫爜琛ヤ綅鏂瑰紡
+        codeFillSeparator:[], //琛ヤ綅鏃剁殑瀛楃锛屽彲杈撳彲閫夊唴瀹�
+        codeLevelType:[],     //灞傜骇绫诲瀷
+        codeCutType:[],       //瀛楃鎴彇绫诲瀷
+        codeGetValueType:[],  //鍙栧�肩被鍨�
+
+        //琛ㄥ崟鍏冪礌鏍囩瀹藉害
+        leftFormLabelWidth: '110px',
+        rightFormLabelWidth: '150px',
+
       };
     },
     computed: {
@@ -279,7 +1488,388 @@
       },
     },
     methods: {
+      
+      /** 閫変腑鍙傜収寮曠敤鐨勪笟鍔$被鍨嬶紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉�  */
+      saveSelectedreferBtm(){
+        if(this.referBtmSelectionList.length != 1){
+          this.$message.warning("鍙兘閫夋嫨涓�鏉℃暟鎹�!");
+          return false;
+        }
+        //璋冪敤瀛愮粍浠跺苟浼犻�掑綋鍓嶉�変腑鐨勫弬鏁板�硷紝瀹炵幇鍥炴樉
+        this.form.referBtmId = this.referBtmSelectionList[0].id;
+        this.form.referBtmName = this.referBtmSelectionList[0].name;
+        //娓呯┖褰撳墠閫変腑鐨勮
+        this.referBtmSelectionClear();
+        this.isShowSelectReferBtmOption = false;
+      },
+      referBtmSearchReset() {
+        this.referBtmQuery = {};
+        this.referBtmOnLoad(this.referBtmDataPage);
+      },
+      referBtmSearchChange(params, done) {
+        this.referBtmQuery = params;
+        this.referBtmDataPage.currentPage = 1;
+        this.referBtmOnLoad(this.page, params);
+        done();
+      },
+      referBtmSelectionChange(list) {
+        //console.log(list);
+        this.referBtmSelectionList = list;
+      },
+      referBtmSelectionClear() {
+        this.referBtmSelectionList = [];
+        this.$refs.crudReferBtm.toggleSelection();
+      },
+      referBtmCurrentChange(currentPage){
+        this.referBtmDataPage.currentPage = currentPage;
+      },
+      referBtmSizeChange(pageSize){
+        this.referBtmDataPage.pageSize = pageSize;
+      },
+      refreshReferBtmDataChange() {
+        this.referBtmOnLoad(this.referBtmDataPage, this.referBtmQuery);
+      },
+      //鍔犺浇涓弬鐓у紩鐢ㄧ殑涓氬姟绫诲瀷鐨勬暟鎹�
+      referBtmOnLoad(page, params = {}) {
+        this.referBtmDialogLoading = 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, this.parentClassifyQuery)).then(res => {
+          //console.log(res.data);
+          const data = res.data.data;
+          this.referBtmDataPage.total = data.total;
+          this.referBtmData = data.records;
+          this.referBtmDialogLoading = false;
+          this.referBtmSelectionClear();
+        });
+      },
 
+
+      /** 鐖跺垎绫婚�夋嫨瀵硅瘽妗嗭紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */ 
+      // 淇濆瓨褰撳墠鐖跺垎绫荤爜娈电殑閫変腑琛岋紝骞惰繘琛屽瓙缁勪欢鍥炴樉
+      saveSelectedParentClassify(){
+        //console.log(this.parentClassifySelectionList.length);
+        if(this.parentClassifySelectionList.length != 1){
+          this.$message.warning("鍙兘閫夋嫨涓�鏉℃暟鎹�!");
+          return false;
+        }
+        //璋冪敤瀛愮粍浠跺苟浼犻�掑綋鍓嶉�変腑鐨勫弬鏁板�硷紝瀹炵幇鍥炴樉
+        this.form.parentClassifySecOid = this.parentClassifySelectionList[0].id;
+        this.form.parentClassifySecText = this.parentClassifySelectionList[0].name;
+        //娓呯┖褰撳墠閫変腑鐨勮
+        this.parentClassifySelectionClear();
+        this.isShowParentClassifyOption = false;
+      },
+      parentClassifySearchReset() {
+        this.parentClassifyQuery = {};
+        this.parentClassifyOnLoad(this.parentClassifyDataPage);
+      },
+      parentClassifySearchChange(params, done) {
+        this.parentClassifyQuery = params;
+        this.parentClassifyDataPage.currentPage = 1;
+        this.parentClassifyOnLoad(this.page, params);
+        done();
+      },
+      parentClassifySelectionChange(list) {
+        //console.log(this.parentClassifyCurrentChange);
+        this.parentClassifySelectionList = list;
+      },
+      parentClassifySelectionClear() {
+        this.parentClassifySelectionList = [];
+        this.$refs.crudParentClassify.toggleSelection();
+      },
+      parentClassifyCurrentChange(currentPage){
+        this.parentClassifyDataPage.currentPage = currentPage;
+      },
+      parentClassifySizeChange(pageSize){
+        this.parentClassifyDataPage.pageSize = pageSize;
+      },
+      refreshParentClassifyDataChange() {
+        this.parentClassifyOnLoad(this.parentClassifyDataPage, this.parentClassifyQuery);
+      },
+      parentClassifyOnLoad(page, params = {}) {
+        this.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, this.parentClassifyQuery)).then(res => {
+          //console.log(res.data);
+          const data = res.data.data;
+          this.parentClassifyDataPage.total = data.total;
+          this.parentClassifyData = data.records;
+          this.classifyDialogLoading = false;
+          this.parentClassifySelectionClear();
+        });
+      },
+      
+      
+      /** 鎵撳紑鍏紡缂栬緫妗嗭紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */ 
+      openformulaEdit(){
+        this.isShowformulaEdit = true;
+      },
+      //鍙屽嚮娣诲姞鍏紡鍐呭
+      dbClickAddContent(row){
+        //console.log(row.formula);
+        this.formulaContent = this.formulaContent + row.formula;
+      },
+      //娓呯┖鍏紡鍐呭
+      resetFormulaContent(){
+        this.formulaContent = '';
+      },
+      //鍏抽棴鏃舵竻绌轰笂娆″叕寮忓唴瀹�
+      closeFormulaEdit(){
+        this.resetFormulaContent();
+      },
+      //缂栬緫瀹屾垚鍏紡鍐呭骞跺洖鏄�
+      saveFormulaContent(){
+        //console.log(this.formulaContent);
+        if(this.formulaContent.trim == null || this.formulaContent.trim == ''){
+          this.$message.warning("鍏紡鍐呭涓嶈兘涓虹┖锛�");
+          return;
+        }
+        //鍏紡鍐呭鍥炴樉
+        this.form.getValueClass = this.formulaContent;
+        this.isShowformulaEdit = false;  
+      },
+
+      /** 鎵撳紑灞炴�ч�夊彇鍊硷紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */ 
+      // 鑾峰彇褰撳墠琚�変腑鏍戣妭鐐圭殑oid
+      nodeClick(data) {
+        this.currentSelectTreeData = data;
+        this.loadlistClassifyLinkAttr()
+      },
+      // 鍔犺浇鍒嗙被杩炴帴灞炴�ц〃鏍兼暟鎹�
+      loadlistClassifyLinkAttr(){
+        this.selectAttrOptionLoading = true;
+        listClassifyLinkAttr({"page": 1,"limit": -1,'conditionMap[codeClassifyOid]':this.currentSelectTreeData.oid}).then(res=>{
+         //console.log(res.data.data);
+         //閫犲亣鏁版嵁
+         let dataInfo =[ 
+          {"id":"address","name":"浼氳瀹ゅ湴鍧�","oid":"058D840D-1010-A7DE-7C52-B39C03CE89C1","attrLength":"150","description":"","attributeDataTypeText":"瀛楃涓�"},
+          {"id":"businesslicensetype","name":"钀ヤ笟鎵х収绫诲瀷","oid":"BDAC6D3E-1827-35A0-F3CA-0E58A43F6A07","attrLength":"255","description":"钀ヤ笟鎵х収绫诲瀷","attributeDataTypeText":"瀛楃涓�"},
+          {"id":"certificatenumber","name":"淇濆瘑璇佺紪鍙�","oid":"E2BC8332-A721-3713-26C3-C9F6340C2C1D","attrLength":"255","description":"淇濆瘑璇佺紪鍙�","attributeDataTypeText":"瀛楃涓�"},
+        ]
+        this.selectattrData = dataInfo;
+        this.selectAttrOptionLoading = false;
+        })
+      },
+      // 鐐瑰嚮鎼滅储鍚庤Е鍙戣浜嬩欢
+      selectAttrOptionSearchChange(params, done) {
+        this.query = params;
+        console.log(params);  //杩欏効闇�瑕佹敼
+        this.loadlistClassifyLinkAttr({"page":1,"limit":-1 ,'conditionMap[codeClassifyOid]':this.currentSelectTreeData.oid});
+        done();
+      },
+      // 灞炴�у彇鍊煎綋鍓嶉�変腑琛屽彂鐢熷彉鍖栨椂瑙﹀彂
+      selectionChangeAttr(list){
+        this.selectionChangeAttrList = list;
+      },
+      // 閲嶇疆浣嶅睘鎬ч�夊彇鍊艰〃鏍肩殑鎼滅储妗嗕箣鍚庣殑鍥炶皟
+      searchAttrReset() {
+        this.loadlistClassifyLinkAttr()
+      },
+      // 涓哄睘鎬ч�夊彇鍊间箣鍚庣殑鍥炴樉
+      selectedListClassifyLinkAttr(){
+        if(this.selectionChangeAttrList.length != 1){
+          this.$message.warning("鍙兘閫夋嫨涓�鏉℃暟鎹�!");
+          return false;
+        }
+        //璋冪敤瀛愮粍浠跺苟浼犻�掑綋鍓嶉�変腑鐨勫弬鏁板�硷紝瀹炵幇鍥炴樉
+        this.form = Object.assign({}, this.form, {
+          referAttributeId:this.selectionChangeAttrList[0].id,
+          referAttributeName:this.selectionChangeAttrList[0].name,
+          referCodeClassifyOid: this.currentSelectTreeData.key,
+          referCodeClassifyOidName: this.currentSelectTreeData.title,
+        })
+        this.isShowSelectAttrOption = false;
+      },
+      
+
+      /** 鍩虹鐮佹琛ㄤ腑鐨勭爜鍊肩鐞嗙殑鐩稿叧鏂规硶 */
+      // 鐮佸�肩鐞嗗脊绐楁帶鍒�
+      openBasicSecCodeValueMgr(row){
+        //褰撳墠涓哄浐瀹氱爜娈电爜鍊肩鐞嗙爜鍊肩鐞�
+        if(row.secType === "codefixedsec"){
+          this.isShowFixedForm = true;
+          this.loadFixedValueTableData(row);
+        }else{
+          //鍒嗙被鐮佹
+          this.isShowFixedForm = false;
+        }
+        this.codefixedsecOrCodeclassifysecOid = row.oid;
+        this.isShowBasicSecCodeValueMgr = true;
+      },
+      //鍔犺浇鍥哄畾鐮佹鐮佸�艰〃鏁版嵁
+      loadFixedValueTableData(row){
+        this.fixedValueOptionLoading = true;
+        gridCodeFixedValue(1, -1, {"codeFixedSecOid":row.oid}).then(res=>{
+          this.fixedValueData = res.data.data.records;
+          //console.log(this.fixedValueData);
+          this.fixedValueOptionLoading = false;
+        })
+      },
+      //鍔犺浇鍒嗙被鐮佹鐮佸�肩鐞嗛〉闈ree鏁版嵁
+      
+      //鍗曞嚮鍥哄畾鐮佹鐨勭爜鍊艰〃涓鏃惰Е鍙戠殑浜嬩欢
+      selectedCodeValueRow(row){
+        //console.log(row);
+        this.selectedFixedOrCodeclassifyValue = row;
+        this.codeFixdForm.id = row.id;
+        this.codeFixdForm.description = row.description;
+        this.codeFixdForm.codeFixedSecOid = row.codefixedsecoid;
+      },
+      //鏂板鐮佸��
+      addCodeSecValue(condition){
+        if(condition === "codefixedsec"){
+          if(this.codeFixdForm.id.trim() == ''){
+            this.$message.warning("鐮佸�间笉鑳戒负绌猴紒");
+            return;
+          }
+          this.codeFixdForm.codeFixedSecOid = this.codefixedsecOrCodeclassifysecOid;
+          addSaveCodeFixedValue(this.codeFixdForm).then(() => {
+            this.loadFixedValueTableData({"oid":this.codefixedsecOrCodeclassifysecOid});
+            this.clearFixedOrClassifyForm('codefixedsec');
+            this.$message({
+              type: "success",
+              message: "鎿嶄綔鎴愬姛!"
+            });
+          }, error => {
+            window.console.log(error);
+          });
+        }else {
+          
+        }
+      },
+      // 娓呯┖鐮佸�艰〃鍗�
+      clearFixedOrClassifyForm(condition){
+        //鐐瑰嚮鍙栨秷鏃舵竻绌鸿〃鍗曚笌褰撳墠閫変腑鐨勭爜鍊硷紝骞剁鐢ㄦ寜閽�
+        this.selectedFixedOrCodeclassifyValue = '';
+        if(condition === "close"){
+          this.codeFixdForm.id = '';
+        }
+        if(condition === "codefixedsec" || condition === "close"){
+          this.codeFixdForm.description = '';
+          this.codeFixdForm.codeFixedSecOid = '';
+        }else {
+          this.codeClassifyForm = '';
+        }
+      },
+      //淇敼鐮佸��
+      editCodeSecValue(condition){
+        if(condition=='codefixedsec'){
+          //浠ュ墠鏄洿鎺ユ妸褰撳墠閫変腑琛岀殑鎵�鏈夋暟鎹兘杩涜鎻愪氦锛屼絾鍏跺疄鍙渶瑕佷紶杈撲竴浜涙瘮瑕佸弬鏁板嵆鍙紝杩欏効鍋氫簡淇敼锛岄渶瑕佺┛鍏朵粬鍙傛暟鐨勮鑷娣诲姞
+          let editData = {
+           "oid": this.selectedFixedOrCodeclassifyValue.oid,
+           "ts": new Date().getTime(),
+           "description": this.codeFixdForm.description,
+           "id": this.codeFixdForm.id,
+           "codeFixedSecOid":  this.selectedFixedOrCodeclassifyValue.codefixedsecoid
+          }
+          editCodeFixedValue(editData).then(() => {
+              this.loadFixedValueTableData({"oid":this.codefixedsecOrCodeclassifysecOid})
+              this.$message({
+                type: "success",
+                message: "鎿嶄綔鎴愬姛!"
+              });
+            }, error => {
+              window.console.log(error);
+          });
+        }else {
+          
+        }
+          
+      },
+      //鍒犻櫎鐮佸��
+      delCodeSecValue(condition){ 
+        //鍥哄畾鐮佹鐮佸�煎垹闄�
+        if(condition == 'codefixedsec'){
+          console.log(this.selectedFixedOrCodeclassifyValue.oid);
+          this.$confirm("鏄惁鍒犻櫎杩欐潯鏁版嵁锛熷鏋滆寮曠敤灏嗕笉鑳借鍒犻櫎锛�", {
+          confirmButtonText: "纭畾",
+          cancelButtonText: "鍙栨秷",
+          type: "warning"
+          })
+          .then(() => {
+            let ts = new Date(this.selectedFixedOrCodeclassifyValue.ts).getTime();
+            return deleteCodeFixedValue({"oid": this.selectedFixedOrCodeclassifyValue.oid,"ts": ts});
+          })
+          .then(() => {
+            this.loadFixedValueTableData({"oid":this.codefixedsecOrCodeclassifysecOid})
+            this.clearFixedOrClassifyForm('codefixedsec');
+            this.$message({
+              type: "success",
+              message: "鎿嶄綔鎴愬姛!"
+            });
+          });
+        }else{
+          //鍒嗙被鐮佹鐮佸�煎垹闄�
+
+          this.selectedFixedOrCodeclassifyValue = '';
+        }            
+        
+      },
+      //瀵圭爜鍊艰〃杩涜锛氫笂绉汇�佷笅绉汇�佺Щ闄ゆ搷浣�
+      codeFixedValueOpetion(condition,row){
+        //console.log(this.fixedValueData[row.$index].orderNum);
+        const index = row.$index;
+        if(condition == 'up'){
+          //瀵筼rdeNum鎺掑簭瀛楁杩涜璋冩暣
+          this.fixedValueData[index].orderNum = this.fixedValueData[index].orderNum-1
+          this.fixedValueData[index-1].orderNum = this.fixedValueData[index].orderNum+1
+          //褰撲笅鏍囧噺鍘�1灏忎簬0鎴栬�卭rderNum瀛楁鍑忓幓1灏忎簬0鐨勬椂鍊欎笉鎵ц涓婄Щ鎿嶄綔
+          if(index-1<0 || this.fixedValueData[row.$index].orderNum-1<0){
+            return;
+          }
+          //璋冩暣鏁扮粍鍊奸『搴�
+          let tempOption = this.fixedValueData[index-1];
+          this.$set(this.fixedValueData, index - 1, this.fixedValueData[index])
+          this.$set(this.fixedValueData, index , tempOption)
+
+          //console.log(this.fixedValueData);
+        }else if(condition == 'down'){
+          //瀵筼rdeNum鎺掑簭瀛楁杩涜璋冩暣
+          this.fixedValueData[index].orderNum = this.fixedValueData[index].orderNum+1
+          this.fixedValueData[index+1].orderNum = this.fixedValueData[index].orderNum-1
+          //璋冩暣鏁扮粍鍊奸『搴�
+          let tempOption = this.fixedValueData[index+1];
+          this.$set(this.fixedValueData, index + 1, this.fixedValueData[index]);
+          this.$set(this.fixedValueData, index, tempOption)
+        }else {
+          for(let i=index+1; i<this.fixedValueData.length-1; i++){
+            //console.log(this.fixedValueData[i].orderNum);
+            this.fixedValueData[i].orderNum = this.fixedValueData[i].orderNum-1;
+            //console.log(this.fixedValueData[i].orderNum);
+          }
+          this.$delete(this.fixedValueData, index);
+        }
+        //console.log(this.fixedValueData);
+      },
+      //淇濆瓨瀵瑰浐瀹氱爜娈电爜鍊肩殑鎿嶄綔
+      saveCodeFixedValueOption(){
+        let data = {
+          "codeFixedSecOid": this.codefixedsecOrCodeclassifysecOid,
+          "dtoList": JSON.stringify(this.fixedValueData),
+        }
+        saveOrder(data).then(() => {
+          this.$message({
+            type: "success",
+            message: "淇濆瓨鎴愬姛!"
+          });
+          }, error => {
+            window.console.log(error);
+        });
+      },
+
+
+      /** 鍩虹鐮佹鐩稿叧鏂规硶 */
+      //闃叉鎵撳紑杩囩紪杈戠獥鍙d箣鍚庤〃鍗曚腑瀛樺湪鍊硷紝鎵�浠ラ渶瑕佹竻绌轰箣鍚庡垵濮嬪寲form琛ㄥ崟
+      clearBasicAddForm(){
+        this.form = '';
+        this.form = {
+          secType:'codefixedsec'
+        };
+        this.changeSectypeFormItems(null);
+      },
       // 鎵撳紑鏂板绐楀彛
       addBasicCodeSec(){
         if(!this.tipsMessage(this.selectionList)){
@@ -289,21 +1879,66 @@
           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缁戝畾鍊�
+          this.changeSectypeFormItems(row);
+        }else{
+          this.basicSecDialogTitle = '鏌ョ湅鐮佹淇℃伅';
+          this.showbtn = false;
+          this.basicSecOnlyRead = true;
+          this.changeSectypeFormItems(row);
+        }
+        //console.log(this.form);
         this.addBasicCodeSettingBox = true;
-        this.$nextTick(() => {
-          this.$refs.addBasicChild.loadCodeSecType();
-        })
       },
       // 鏂板鍩虹鐮佹
-      saveBasicCode(){
-        if(this.selectionList[0].oid == null){
+      saveOrEditBasicCode(){
+        if(this.selectionList[0].oid == null ||  this.selectionList[0].oid == ''){
           this.$message.warning('缂哄け蹇呰鍙傛暟锛岃閲嶆柊閫夋嫨缂栫爜瑙勫垯鍚庨噸璇�!');
           return;
+        }        
+        this.form.pkCodeRule = this.selectionList[0].oid;
+        //console.log(this.form);
+        if(this.form.oid == '' || this.form.oid == null){
+           addSave(this.form).then(() => {
+            this.$message({
+              type: "success",
+              message: "鎿嶄綔鎴愬姛!"
+            });
+            }, error => {
+              window.console.log(error);
+          });
+        }else{
+          editSave(this.form).then(() => {
+            this.$message({
+              type: "success",
+              message: "鎿嶄綔鎴愬姛!"
+            });
+            }, error => {
+              window.console.log(error);
+          });
         }
-        this.$refs.addBasicChild.addSave(this.selectionList[0].oid);
+       
         // 鍏抽棴绐楀彛
         this.addBasicCodeSettingBox = false
-        // 鐐瑰嚮鏂板鍩虹鐮佹涔嬪悗鍏抽棴绐楀彛涔嬪悗瑙﹀彂閲嶆柊鍔犺浇
+        // 鐐瑰嚮鏂板鍩虹鐮佹,鍏抽棴绐楀彛涔嬪悗瑙﹀彂閲嶆柊鍔犺浇
         this.loadBasic(this.selectionList[0]);
       },
       // 鍒ゆ柇鏁版嵁鏄惁閫夋嫨浠ュ強鍙兘閫夋嫨鍗曟潯鏁版嵁
@@ -326,23 +1961,25 @@
           type: "warning"
         })
         .then(() => {
-          let ts = this.selectionBasicList[0].ts;
+          let ts = new Date(this.selectionBasicList[0].ts).getTime();
           return deleteData({"oid": oid,"ts": ts});
         })
         .then(() => {
-          this.loadBasic({"oid":this.currentCodeRuleOid == null ? this.selectionList[0].oid:this.currentCodeRuleOid});
+          this.loadBasic({"oid":this.currentCodeRuleOid == null || this.currentCodeRuleOid == '' ? this.selectionList[0].oid:this.currentCodeRuleOid});
           this.$message({
             type: "success",
             message: "鎿嶄綔鎴愬姛!"
           });
-          //this.$refs.crud.toggleSelection();
+          this.$refs.crudBasic.toggleSelection();
         });
       },
       // 鐐瑰嚮瑙﹀彂鍔犺浇鍩虹鐮佹淇℃伅
       loadBasic(row){
         this.loadingBasic = true;
         //console.log(row.oid);
+        //瀛樺偍褰撳墠鍏宠仈鐨勭紪鐮佽鍒欑浉鍏充俊鎭�
         this.currentCodeRuleOid = row.oid;
+        this.currentRuleLcStatus = row.lcStatus;
         gridCodeBasicSec(1, -1, {"pkCodeRule":row.oid}).then(res => {
           const data = res.data.data;
           this.basicData = data.records;
@@ -350,6 +1987,7 @@
           this.loadingBasic = false;
         });
       },
+      // 鍩虹鐮佹閫変腑鏃惰Е鍙�
       selectionBasicChange(list) {
         this.selectionBasicList = list;
         //console.log(this.selectionBasicList);
@@ -402,8 +2040,11 @@
       },
       //鍩虹鐮佹鏌ヨ
       refreshChangeBasicSec(){
-        this.loadBasic({"oid":this.currentCodeRuleOid == null ? this.selectionList[0].oid:this.currentCodeRuleOid});
+        this.loadBasic({"oid":this.currentCodeRuleOid == null || this.currentCodeRuleOid == '' ? this.selectionList[0].oid:this.currentCodeRuleOid});
       },
+
+ 
+      /** 缂栫爜瑙勫垯鐩稿叧鏂规硶 */
       // 鏌ヨ浣跨敤鑼冨洿
       handleRange(){
         if(!this.tipsMessage(this.selectionList)){
@@ -412,6 +2053,7 @@
         this.codeRangeSettingBox = true;
         this.getRangeCodeList()
       },
+      //鍔犺浇浣跨敤鑼冨洿鍒楄〃
       getRangeCodeList(){        
         this.dialogLoading = true;
         if(this.selectionList[0].oid==null){
@@ -424,8 +2066,15 @@
           this.dialogLoading = false;
         });
       },
+      //鍒锋柊浣跨敤鑼冨洿鍒楄〃
       refreshUseRangeChange(){
         this.getRangeCodeList();
+      },
+      //鍗曞嚮缂栫爜瑙勫垯瀹炵幇琛岄�夋嫨
+      codeRuleRowClick (row) {
+        //console.log(row);
+        this.$refs.crud.toggleRowSelection(row);
+        this.loadBasic(row);
       },
       // 鍚敤涓庡仠鐢�
       enableOrDeactivatse(oId,update){
@@ -497,7 +2146,7 @@
           .then(() => {
             // 鍙敮鎸佹瘡娆″崟鏉¤褰曞垹闄�
             let oid = this.selectionList[0].oid;
-            let ts = this.selectionList[0].ts;
+            let ts = new Date(this.selectionList[0].ts).getTime();
             return remove({oid: oid,ts: ts});
           })
           .then(() => {
@@ -512,8 +2161,8 @@
       // 鎵撳紑淇敼
       beforeOpen(done, type) {
         if (["edit", "view"].includes(type)) {
-          getDetail(this.form.oid).then(res => {
-            this.form = res.data.data;
+          getDetail(this.ruleForm.oid).then(res => {
+            this.ruleForm = res.data.data;
           });
         }
         done();
@@ -527,11 +2176,15 @@
         this.page.currentPage = 1;
         this.onLoad(this.page, params);
         done();
-      },
+      }, 
+      // 缂栫爜瑙勫垯褰撳墠閫変腑琛屽彉鍖栫殑鏃跺�欒Е鍙�
       selectionChange(list) {
         this.selectionList = list;
+        this.$refs.crud.setCurrentRow(this.selectionList [list.length-1]);
         if(this.selectionList.length > 0){
-          this.currentCodeRuleOid = this.selectionList [list.length-1];
+          this.currentCodeRuleOid = this.selectionList[list.length-1].oid;
+          this.currentRuleLcStatus = this.selectionList [list.length-1].lcStatus;
+          //console.log(this.currentRuleLcStatus);
           this.loadBasic(this.selectionList[list.length-1]);
         }
       },
@@ -551,17 +2204,216 @@
       onLoad(page, params = {}) {
         this.loading = true;
         gridCodeRule(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
-          //console.log(res);
+          //console.log(res.data);
           const data = res.data.data;
           this.page.total = data.total;
           this.data = data.records;
           this.loading = false;
-          this.loadBasic(data.records[0])
-          this.selectionClear();
+          this.loadBasic(this.data[0])
+          this.$nextTick(() => {
+            this.$refs.crud.toggleRowSelection(this.data[0]);
+            this.$refs.crud.setCurrentRow(this.data[0]);
+          })
+          this.selectionList = data.records[0];
+          //this.selectionClear();
         });
-      }
+      },
+
+
+      /** 绗竴灞傚璇濇鐩稿叧鏂规硶 */
+      // 鎵撳紑浜屽眰寮圭獥鏂规硶
+      openAttrSelectOrGetValue(condition){
+        if(condition === 'attr'){
+          this.isShowSelectAttrOption = true;
+        }else if(condition === 'value'){
+          this.isShowformulaEdit = true;
+        }else if(condition === 'parentClassifySecOid'){
+          this.isShowParentClassifyOption = true;
+        }else if(condition === 'referBtmId'){
+          this.isShowSelectReferBtmOption = true;
+        }else if(condition === 'referConfig'){
+          //this.$emit('openSelectreferConfig')
+        }
+      },
+
+      // 鐐瑰嚮杈撳叆妗嗙殑脳鍙凤紝娓呯┖杈撳叆妗嗕腑鐨勫唴瀹�
+      clearAttrDataByIcon(condition){
+        if(condition === 'attr'){
+          this.form.referAttributeName = '';
+          this.form.referAttributeId = '';
+          this.form.referCodeClassifyOid = '';
+          this.form.referCodeClassifyOidName = '';
+        }else if(condition === 'value'){
+          this.form.getValueClass = '';
+        }else if(condition === 'parentClassifySecOid'){
+          this.form.parentClassifySecOid = '';
+        }else if(condition === 'referBtmId'){
+          this.form.referBtmId = '';
+        }else if(condition === 'referConfig'){
+          this.form.referBtmId = '';
+        }
+      },
+
+      // 鐮佹绫诲瀷鏀瑰彉鏃讹紝澧炲姞瀵瑰簲鐨刦orm琛ㄥ崟涓殑灞炴��
+      changeSectypeFormItems(row){     
+        console.log(row);   
+        if(this.sectypeList.length==0){
+          this.loadCodeSecType();
+        }
+        if(row != null){
+          this.form = {};
+          this.form = Object.assign({},this.form,{
+              oid: row.oid,
+              id: row.id, //缂栧彿,
+              name: row.name,//鍚嶇О
+              secType: row.secType,//鐮佹绫诲瀷
+              description: row.description,//鎻忚堪
+              serialDependFlag: row.serialDependFlag=='true' ?  true:false,//鏄惁娴佹按渚濊禆
+              serialDependOrder: row.serialDependOrder,//娴佹按渚濊禆椤哄簭
+              nullableFlag: row.nullableFlag=='true' ?  true:false,//鏄惁涓虹┖
+              displayFlag: row.displayFlag=='true' ?  true:false,
+              componentCodeFlag: row.componentCodeFlag=='true' ?  true:false,//鏄惁鍙備笌缂栫爜
+              pkCodeRule: row.pkCodeRule, //鎵�灞炵紪鐮佽鍒�
+            }
+          );
+        }else {
+          this.form = {
+            oid: this.form.oid,
+            id: this.form.id, //缂栧彿
+            name: this.form.name, //鍚嶇О
+            secType: this.form.secType, //鐮佹绫诲瀷
+            description: this.form.description, //鎻忚堪
+            serialDependFlag:  this.form.serialDependFlag, //鏄惁娴佹按渚濊禆
+            serialDependOrder: this.form.serialDependOrder, //娴佹按渚濊禆椤哄簭
+            nullableFlag:  this.form.nullableFlag, //鏄惁涓虹┖
+            displayFlag:  this.form.displayFlag, //
+            componentCodeFlag:  this.form.componentCodeFlag, //鏄惁鍙備笌缂栫爜
+            pkCodeRule: this.form.pkCodeRule, //鎵�灞炵紪鐮佽鍒�
+          };
+          //console.log(this.form);
+        }
+        if(this.form.secType==='codefixedsec'){
+          //鍥哄畾鐮佹
+          this.form = Object.assign({}, this.form,{
+            codeSecLength: row!=null&&row.codeSecLength != '' ? row.codeSecLength:'',
+            codeSecLengthType: row!=null&&row.codeSecLengthType != '' ? row.codeSecLengthType:'code_sec_length_variable'
+          });
+          this.loadCodeSecLength();
+        }else if(this.form.secType==='codeattrsec'){
+          //灞炴�х爜娈�
+          this.form = Object.assign({}, this.form, {
+            referCodeClassifyOid: row!=null&&row.referCodeClassifyOid != '' ? row.referCodeClassifyOid:'',     //灞炴�d
+            referCodeClassifyOidName: row!=null&&row.referCodeClassifyOidName != '' ? row.referCodeClassifyOidName:'', //灞炴�ф墍鍦ㄥ垎绫�
+            referAttributeId: row!=null&&row.referAttributeId != '' ? row.referAttributeId:'',    //灞炴�х紪鍙�
+            referAttributeName: row!=null&&row.referAttributeName != '' ? row.referAttributeName:'',   //灞炴��
+            getValueClass: row!=null&&row.getValueClass != '' ? row.getValueClass:''         //鍙栧�艰鍒�
+          });
+        }else if(this.form.secType==='codeserialsec'){
+          //娴佹按鐮佹
+          this.form = Object.assign({}, this.form,{
+            codeSecLength: row!=null&&row.codeSecLength != '' ? row.codeSecLength:'', //鐮佹鐨勯暱搴�
+            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_right', //缂栫爜琛ヤ綅鏂瑰紡
+            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,      //娴佹按鏄惁琛ョ爜
+            customCodeSerialClass: row!=null&&row.customCodeSerialClass != '' ? row.customCodeSerialClass:'',     //鑷畾涔夋祦姘寸畻娉�
+          });
+          this.loadCodeFillType();
+          this.loadCodeFillSeparator();
+        }else if(this.form.secType==='codelevelsec'){
+          //灞傜骇鐮佹
+          this.form = Object.assign({}, this.form,{
+            codeLevelType: row!=null&&row.codeLevelType != '' ? row.codeLevelType:'code_level_min',     //灞傜骇绫诲瀷  鏋氫妇鏌ヨ
+            codeLevelValue: row!=null&&row.codeLevelValue != '' ? row.codeLevelValue:'',    //灞傜骇鐨勫��
+            valueCutType: row!=null&&row.valueCutType != '' ? row.valueCutType:'code_cut_none',      //瀛楃鎴彇绫诲瀷 鏋氫妇鏌ヨ
+            valueCutLength: row!=null&&row.valueCutLength != '' ? row.valueCutLength:'',    //
+            codeGetValueType: row!=null&&row.codeGetValueType != '' ? row.codeGetValueType:'code_get_value_all_up',  //鍙栧�肩被鍨� 鏋氫妇鏌ヨ
+          });
+          this.loadCodeLevelType();
+          this.loadCodeCutType();
+          this.loadCodeGetValueType();
+        }else if(this.form.secType==='coderefersec'){
+          //寮曠敤鐮佹
+          this.form = Object.assign({}, this.form,{
+            referBtmId: row!=null&&row.referBtmId != '' ? row.referBtmId:'',   //鍙傜収寮曠敤鐨勪笟鍔$被鍨嬶紝鐨刬d
+            referBtmName: row!=null&&row.referBtmName != '' ? row.referBtmName:'', //鍙傜収寮曠敤鐨勪笟鍔$被鍨�
+            referConfig: row!=null&&row.referConfig != '' ? row.referConfig:'',  //鍙傜収閰嶇疆
+          });
+        }else if(this.form.secType==='codedatesec'){
+          //鏃ユ湡鐮佹
+          this.form = Object.assign({}, this.form,{
+            codeDateFormatStr:  row!=null&&row.codeDateFormatStr != '' ? row.codeDateFormatStr:'',   //鏃ユ湡鏍煎紡
+          });
+        }else if(this.form.secType==='codeclassifysec'){
+          //鍒嗙被鐮佹
+          this.form = Object.assign({}, this.form,{
+            codeSecLengthType: row!=null&&row.codeSecLengthType != '' ? row.codeSecLengthType:'code_sec_length_variable',    //鐮佹闀垮害绫诲瀷
+            codeSecLength: row!=null&&row.codeSecLength != '' ? row.codeSecLength:'',  //鐮佹鐨勯暱搴�
+            matchClassifyValueFlag: row!=null&&row.matchClassifyValueFlag != '' ? row.matchClassifyValueFlag=='true' ?  true:false :false,  //鏄惁鑷姩鍖归厤鍊�
+            parentClassifySecOid: row!=null&&row.parentClassifySecOid != '' ? row.parentClassifySecOid:'',    //鐖跺垎绫荤爜娈甸�変腑鐨刬d
+            parentClassifySecText: row!=null&&row.parentClassifySecText != '' ? row.parentClassifySecText:'',  //鐖跺垎绫荤爜娈�
+          });
+          this.loadCodeSecLength();
+        }else if(this.form.secType==='codevariablesec'){
+          //鍙彉鐮佹
+          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:'', //琛ヤ綅鏃剁殑瀛楃锛屽彲杈撳彲閫夋煡璇�
+          });
+          this.loadCodeFillType();
+          this.loadCodeFillSeparator();
+        }
+        //console.log(this.form);
+      },
+      //鏋氫妇鍜屽彲杈撳彲閫夊唴瀹规煡璇�
+      loadCodeSecType(){
+        getDictionary({code: "codeBasicSecType"}).then(res=>{
+          this.sectypeList = res.data.data;
+        })
+        this.loadCodeSecLength();
+        //console.log(this.sectypeList);
+      },
+      loadCodeSecLength(){
+        getDictionary({code: "codeSecLength"}).then(res=>{
+          this.codeSecLengthType = res.data.data;
+        })
+      },
+      loadCodeFillType(){
+        getDictionary({code: "codeFillType"}).then(res=>{
+          this.codeFillType = res.data.data;
+        })
+      },
+      loadCodeFillSeparator(){
+        getDictionary({code: "codeFillSeparator"}).then(res=>{
+          this.codeFillSeparator = res.data.data;
+        })
+      },
+      loadCodeLevelType(){
+        getDictionary({code: "codeLevelType"}).then(res=>{
+          this.codeLevelType = res.data.data;
+        })
+      },
+      loadCodeCutType(){
+        getDictionary({code: "codeCutType"}).then(res=>{
+          this.codeCutType = res.data.data;
+        })
+      },
+      loadCodeGetValueType(){
+        getDictionary({code: "codeGetValueType"}).then(res=>{
+          this.codeGetValueType = res.data.data;
+          //console.log(this.codeGetValueType);
+        })
+      },
+      
+      
     }
-  };
+};
 </script>
 
 <style>
@@ -571,7 +2423,95 @@
       margin-bottom: -20px !important;
       height: 2px;
       margin: 0;
+      position: fixed;
+      width: 57.5vw;
   }
 
+  .el-card__body > .abox {
+    height: 50vh;
+  }
+
+  .el-col-5 > .box {
+    height: 55vh;
+  }
+
+  .operator_,filter, .layui-btn{
+    width:60px;
+  }
+
+  .el-input-number {
+    width: 120px;
+  }
+
+  .el-input-number >.el-input > .el-input__inner {
+    width:120px;
+  } 
+
+  .formula-editor{
+    margin-top: -15px;
+    margin-left: 2vw;
+    /*璁剧疆寮规�х洅瀛�*/
+    display: flex;
+    /*瀛愬厓绱犱互绔栧垪鎺掑垪锛屼竴鍏辨湁6鍒�*/
+    flex-direction:column;
+    width: 360px;
+    height: 285px;
+    /*宸﹀彸鍧囧寑鎺掑垪*/
+    justify-content: space-around;
+    /*涓婁笅鍧囧寑鎺掑垪*/
+    align-items: center;
+  }
+
+  .one{
+    display: flex;
+    /*浠ヨ鎺掑垪*/
+    flex-direction: row;
+    width: 296px;
+    height: 60px;
+    justify-content: space-between;
+    align-items: center;
+	}    
+
+  .formula-editor-btn-sm {
+    width: 72px;
+    height: 45px;
+    background: rgb(153, 214, 240);
+    border-radius: 10%;
+  }
+  
+  .el-col>.el-card > .el-card__header {
+    background: rgb(213 231 239);
+    border-radius: inherit;
+  }
+
+  /** 鏂板鐮佹 */
+  .total{
+    height: 500px;
+    width: 100%;
+  }
+
+  .total .el-input__inner,.total .el-textarea__inner {
+    width: 220px;
+  }
+
+  .el-divider--vertical {
+    width: 2px;
+    height: 72vh;
+    margin: 0 5px;
+    position: fixed;
+  }
+
+ .left {
+    float: left;
+    width: 49%;
+ }
+ .right {
+    float: right;
+    margin-right: 2.5vw;
+    /* width: 40%; */
+ }
+ .right > .el-form > .el-form-item{
+    margin-bottom: 8px;
+ }
 
 </style>
\ No newline at end of file

--
Gitblit v1.9.3