From a71535cf11e40a03585366f016266e3fbb1df15a Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期四, 07 十二月 2023 15:34:58 +0800
Subject: [PATCH] 编码规则样式处理

---
 Source/UBCS-WEB/src/views/code/code.vue |  344 ++++++++++++++++++++++++++++----------------------------
 1 files changed, 173 insertions(+), 171 deletions(-)

diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue
index 023dbcb..e5f4d23 100644
--- a/Source/UBCS-WEB/src/views/code/code.vue
+++ b/Source/UBCS-WEB/src/views/code/code.vue
@@ -2,144 +2,147 @@
   <basic-container class="code-total" style=" height: 100%">
     <!-- 缂栫爜瑙勫垯淇℃伅灞曠ず鍖哄煙 -->
     <basic-container class="code-rule-container">
-      <p
-        style="
+      <div style="height: 40vh;overflow: auto;">
+        <p
+          style="
           margin-top: -5px;
           margin-bottom: 4px;
           font-weight: 570;
           font-size: 19px;
           color: #0e2d5f;
         "
-      >
-        缂栫爜瑙勫垯
-      </p>
-      <avue-crud
-        ref="crud"
-        v-model="ruleForm"
-        :before-open="beforeOpen"
-        :data="data"
-        :option="optionRule"
-        :page.sync="page"
-        :permission="permissionList"
-        :table-loading="loading"
-        class="code-rule-crud"
-        @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 v-if="permissionList.editBtn && (scope.row.lcStatus == 'Editing' ? true : false)"
-                     icon="el-icon-edit"
-                     plain
-                     size="small"
-                     type="text"
-                     @click="openEdit(scope.row)"
-          >缂� 杈�
-          </el-button>
-          <el-button v-if="permissionList.releaseBtn && (scope.row.lcStatus == 'Editing' ? true : false)"
-                     :loading="releadDisabled"
-                     icon="el-icon-position"
-                     plain
-                     size="small"
-                     type="text"
-                     @click="enableOrDeactivatse(scope.row.oid, 'release')"
-          >鍙� 甯�
-          </el-button>
-          <el-button v-if="permissionList.deactivateBtn && (scope.row.lcStatus == 'Released' ? true : false)"
-                     icon="el-icon-video-pause"
-                     plain
-                     size="small"
-                     type="text"
-                     @click="enableOrDeactivatse(scope.row.oid, 'disable')"
-          >鍋� 鐢�
-          </el-button>
-          <el-button v-if="permissionList.enableBtn && (scope.row.lcStatus == 'Disabled' ? true : false)"
-                     icon="el-icon-video-play"
-                     plain
-                     size="small"
-                     type="text"
-                     @click="enableOrDeactivatse(scope.row.oid, 'enable')"
-          >鍚� 鐢�
-          </el-button>
-        </template>
-        <!-- 琛ㄦ牸涓婃柟鎸夐挳鍖哄煙 -->
-        <template slot="menuLeft" slot-scope="scope">
-          <el-button v-if="permissionList.rulDelBtn"
-                     icon="el-icon-delete"
-                     plain
-                     size="small"
-                     type="danger"
-                     @click="handleDelete"
-          >
-            鍒� 闄�
-          </el-button>
-          <el-button v-if="permissionList.advancedQueryBtn"
-                     icon="el-icon-search"
-                     plain
-                     size="small"
-                     type="primary"
-                     @click="openAdvancedQuery('codeRule')">
-            楂樼骇鏌ヨ
-          </el-button>
-          <el-button v-if="permissionList.cloneBtn"
-                     icon="icon-kelong"
-                     plain
-                     size="small"
-                     @click="openCodeRuleDialog"
-          >
-            鍏� 闅�
-          </el-button>
-          <el-button v-if="permissionList.otherCloneBtn"
-                     icon="icon-lianjiekelong"
-                     plain
-                     size="small"
-                     style="font-size: 12px"
-                     @click="openOtherCodeRuleDialog"
-          >
-            浠庡叾浠栬鍒欎腑鍏嬮殕鐮佹
-          </el-button>
-          <el-button v-if="permissionList.usescopeBtn"
-                     icon="el-icon-s-help"
-                     plain
-                     size="small"
-                     @click="handleRange"
-          >
-            浣跨敤鑼冨洿
-          </el-button>
-          <el-button v-if="permissionList.clearBtn"
-                     icon="icon-qingkong"
-                     plain
-                     size="small"
-                     @click="clearAllCodeSec"
-          >
-            娓呯┖鐮佸��
-          </el-button>
-          <el-button v-if="permissionList.escapeOwnerBtn"
-                     icon="el-icon-guide"
-                     plain
-                     size="small"
-                     @click="escapeOwner"
-          >
-            杞Щ鎵�鏈夎��
-          </el-button>
-          <el-button v-if="permissionList.maxSerialnumBtn"
-                     icon="el-icon-data-analysis"
-                     plain
-                     size="small"
-                     @click="maxSerialNum"
-          >
-            鏈�澶ф祦姘村彿
-          </el-button>
-        </template>
-      </avue-crud>
+        >
+          缂栫爜瑙勫垯
+        </p>
+        <avue-crud
+          ref="crud"
+          v-model="ruleForm"
+          :before-open="beforeOpen"
+          :data="data"
+          :option="optionRule"
+          :page.sync="page"
+          :permission="permissionList"
+          :table-loading="loading"
+          class="code-rule-crud"
+          @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 v-if="permissionList.editBtn && (scope.row.lcStatus == 'Editing' ? true : false)"
+                       icon="el-icon-edit"
+                       plain
+                       size="small"
+                       type="text"
+                       @click="openEdit(scope.row)"
+            >缂� 杈�
+            </el-button>
+            <el-button v-if="permissionList.releaseBtn && (scope.row.lcStatus == 'Editing' ? true : false)"
+                       :loading="releadDisabled"
+                       icon="el-icon-position"
+                       plain
+                       size="small"
+                       type="text"
+                       @click="enableOrDeactivatse(scope.row.oid, 'release')"
+            >鍙� 甯�
+            </el-button>
+            <el-button v-if="permissionList.deactivateBtn && (scope.row.lcStatus == 'Released' ? true : false)"
+                       icon="el-icon-video-pause"
+                       plain
+                       size="small"
+                       type="text"
+                       @click="enableOrDeactivatse(scope.row.oid, 'disable')"
+            >鍋� 鐢�
+            </el-button>
+            <el-button v-if="permissionList.enableBtn && (scope.row.lcStatus == 'Disabled' ? true : false)"
+                       icon="el-icon-video-play"
+                       plain
+                       size="small"
+                       type="text"
+                       @click="enableOrDeactivatse(scope.row.oid, 'enable')"
+            >鍚� 鐢�
+            </el-button>
+          </template>
+          <!-- 琛ㄦ牸涓婃柟鎸夐挳鍖哄煙 -->
+          <template slot="menuLeft" slot-scope="scope">
+            <el-button v-if="permissionList.rulDelBtn"
+                       icon="el-icon-delete"
+                       plain
+                       size="small"
+                       type="danger"
+                       @click="handleDelete"
+            >
+              鍒� 闄�
+            </el-button>
+            <el-button v-if="permissionList.advancedQueryBtn"
+                       icon="el-icon-search"
+                       plain
+                       size="small"
+                       type="primary"
+                       @click="openAdvancedQuery('codeRule')">
+              楂樼骇鏌ヨ
+            </el-button>
+            <el-button v-if="permissionList.cloneBtn"
+                       icon="icon-kelong"
+                       plain
+                       size="small"
+                       @click="openCodeRuleDialog"
+            >
+              鍏� 闅�
+            </el-button>
+            <el-button v-if="permissionList.otherCloneBtn"
+                       icon="icon-lianjiekelong"
+                       plain
+                       size="small"
+                       style="font-size: 12px"
+                       @click="openOtherCodeRuleDialog"
+            >
+              浠庡叾浠栬鍒欎腑鍏嬮殕鐮佹
+            </el-button>
+            <el-button v-if="permissionList.usescopeBtn"
+                       icon="el-icon-s-help"
+                       plain
+                       size="small"
+                       @click="handleRange"
+            >
+              浣跨敤鑼冨洿
+            </el-button>
+            <el-button v-if="permissionList.clearBtn"
+                       icon="icon-qingkong"
+                       plain
+                       size="small"
+                       @click="clearAllCodeSec"
+            >
+              娓呯┖鐮佸��
+            </el-button>
+            <el-button v-if="permissionList.escapeOwnerBtn"
+                       icon="el-icon-guide"
+                       plain
+                       size="small"
+                       @click="escapeOwner"
+            >
+              杞Щ鎵�鏈夎��
+            </el-button>
+            <el-button v-if="permissionList.maxSerialnumBtn"
+                       icon="el-icon-data-analysis"
+                       plain
+                       size="small"
+                       @click="maxSerialNum"
+            >
+              鏈�澶ф祦姘村彿
+            </el-button>
+          </template>
+        </avue-crud>
+      </div>
+
     </basic-container>
 
     <!-- 楂樼骇鏌ヨ瀵硅瘽妗� -->
@@ -217,6 +220,7 @@
 
     <!-- 鍩虹鐮佹灞曠ず鍖哄煙 -->
     <basic-container class="code-basicsec-container">
+    <div style="height: 38.5vh;overflow: auto">
       <p
         style="margin-top: -5px;
           margin-bottom: 4px;
@@ -316,6 +320,7 @@
           </el-button>
         </template>
       </avue-crud>
+    </div>
     </basic-container>
 
     <!-- 鐮佹鐮佸�肩鐞嗗璇濇 -->
@@ -886,14 +891,10 @@
                         :referConfig="this.referConfig || {}"
                         :display="true"
                         :value="form.customCodeSerialClass"
-                        :text="form.customCodeSerialClass"
+                        :text="form.customCodeSerialClassText"
+                        :serialType="form.serialType"
                         @setReferValue="setReferValue"
                       ></vciWebRefer>
-<!--                                    <el-input-->
-<!--                                      v-model="form.customCodeSerialClass"-->
-<!--                                      :readonly="basicSecOnlyRead"-->
-<!--                                      @focus="streamFocusHandler"-->
-<!--                                    ></el-input>-->
                   </template>
 
 
@@ -1369,13 +1370,15 @@
         title: '鑷畾涔夋祦姘村弬鐓�',
         showField: 'customCodeSerialClassText',
         field: 'customCodeSerialClass',
-        fieldMap:  {},
+        fieldMap:  {
+          serialType:"serialType"
+        },
         placeholder:'璇烽�夋嫨鑷畾涔夋祦姘�',
         options:   {
           // 璁剧疆榛樿鐨勫睘鎬�
           url: 'api/ubcs-code/codeSerialAlgorithmController/gridCodeSerialAlgorithm',
+          textField:'name',
           valueField:'classFullName',
-          textField:'classFullName',
           isMuti: false,
           type: "grid",
           method: 'get',
@@ -1388,6 +1391,7 @@
               {title: '绠楁硶缂栧彿', field: 'id', width: 200},
               {title: '绠楁硶鍚嶇О', field: 'name', width: 150},
               {title: '绫诲叏璺緞', field: 'classFullName', width: 300},
+              {title: '绫诲瀷', field: 'serialType', width: 300},
               {title: '鎻忚堪', field: 'description'}
             ],
             queryColumns: [
@@ -1717,10 +1721,11 @@
   methods: {
     //鑷畾涔夋祦姘村け鐒�
     setReferValue(data){
-      console.log(data)
       if(data.field){
         this.form[data.field] = data.value || "";
-        // this.form[data.showField] = data.text || "";
+        this.form[data.showField] = data.text || "";
+        this.form.serialType = data.rawData[0].serialType || "";
+
       }
     },
     /** 杞Щ瑙勫垯鎵�鏈夎�呭璇濇 */
@@ -2779,12 +2784,11 @@
       }
       //console.log(this.form);
       //涓篺orm缁戝畾鍊�
-      this.changeSectypeFormItems(condition == "add" ? null : row);
+      this.changeSectypeFormItems(condition == "add" ? null:row);
       this.addBasicCodeSettingBox = true;
     },
     /** 鏂板鍩虹鐮佹*/
     async saveOrEditBasicCode() {
-      this.isLoadingSecCodeAddBtn = true;
       if (
         this.selectionList[0].oid == null ||
         this.selectionList[0].oid == ""
@@ -2792,26 +2796,28 @@
         this.$message.warning("缂哄け蹇呰鍙傛暟锛岃閲嶆柊閫夋嫨缂栫爜瑙勫垯鍚庡啀璇�!");
         return;
       }
+      if (!this.checkForm()) {
+        return;
+      }
+      this.isLoadingSecCodeAddBtn = true;
       this.form.pkCodeRule = this.selectionList[0].oid;
       if (this.form.oid == "" || this.form.oid == null) {
-        if (this.checkForm()) {
-          await addSave(this.form).then(
-            () => {
-              this.$message({
-                type: "success",
-                message: "鎿嶄綔鎴愬姛!",
-              });
-              console.log(this.form)
-              // 鍏抽棴瀵硅瘽妗�
-              this.addBasicCodeSettingBox = false;
-              // 鐐瑰嚮鏂板鍩虹鐮佹,鍏抽棴绐楀彛涔嬪悗瑙﹀彂閲嶆柊鍔犺浇
-              this.loadBasic(this.selectionList[0]);
-            },
-            (error) => {
-              window.console.log(error);
-            }
-          );
-        }
+        await addSave(this.form).then(
+          () => {
+            this.$message({
+              type: "success",
+              message: "鎿嶄綔鎴愬姛!",
+            });
+            console.log(this.form)
+            // 鍏抽棴瀵硅瘽妗�
+            this.addBasicCodeSettingBox = false;
+            // 鐐瑰嚮鏂板鍩虹鐮佹,鍏抽棴绐楀彛涔嬪悗瑙﹀彂閲嶆柊鍔犺浇
+            this.loadBasic(this.selectionList[0]);
+          },
+          (error) => {
+            window.console.log(error);
+          }
+        );
       } else {
         // 鍙兘鍙傜収寮曠敤鐨勪笟鍔$被鍨嬩細鍙戠敓鏀瑰彉鎵�浠ヨ繖鍎跨洿鎺ュreferConfig鐨刯son杩涜鏀瑰彉
         if (
@@ -2825,7 +2831,7 @@
           // let referValueInfo = JSON.parse(this.form.referValueInfo);
           // referValueInfo.referType = this.form.referBtmId;
         }
-        let oldBasicSec = this.selectionBasicList.at(-1);
+        let oldBasicSec = this.selectionBasicList.slice(-1)[0];
         let secType = this.form.secType;
         Vue.set(this.form, 'isClearValue', false);
         if ((oldBasicSec.secType == "codefixedsec" || oldBasicSec.secType === "codeclassifysec") && oldBasicSec.secType != secType) {
@@ -3066,7 +3072,7 @@
       if (!this.tipsMessage(this.selectionBasicList)) {
         return;
       }
-      if (this.selectionList.at(-1).lcStatus != "Editing") {
+      if (this.selectionList.slice(-1)[0].lcStatus != "Editing") {
         this.$message.warning('缂栫爜瑙勫垯鐘舵�佷笉鏄�"缂栬緫涓�"锛屼笉鍏佽鍒犻櫎鐮佹!');
         return;
       }
@@ -3212,7 +3218,7 @@
     },
     /** 鍩虹鐮佹鍒锋柊鏃舵煡璇�*/
     refreshChangeBasicSec() {
-      this.loadBasic(this.selectionList.at(-1));
+      this.loadBasic(this.selectionList.slice(-1)[0]);
     },
     /** 鎿嶄綔鍩虹鐮佹涓悳绱㈡竻绌虹瓑鎸夐挳鐨勬樉绀�/闅愯棌*/
     hideBasicTable(hideBoolean) {
@@ -3288,7 +3294,7 @@
     },
     /** 鐮佹绫诲瀷鏀瑰彉鏃讹紝澧炲姞瀵瑰簲鐨刦orm琛ㄥ崟涓殑灞炴��*/
     changeSectypeFormItems(row) {
-      console.log(row)
+      //console.log(row)
       if (
         func.isEmpty(this.enumParam.secTypeList) ||
         this.enumParam.secTypeList.length == 0
@@ -3548,10 +3554,6 @@
   font-size: 12px !important;
 }
 
-.code-rule-crud > .avue-crud__search,
-.code-basic-crud > .avue-crud__search {
-  margin-bottom: -15px;
-}
 
 .clone-input-textarea > .el-form-item__content {
   width: 495px;
@@ -3670,7 +3672,7 @@
 
 .right {
   /* float: right; */
-  margin-right: 2vw;
+  /* margin-right: 1vw; */
   height: 100%;
   width: auto;
 }

--
Gitblit v1.9.3