From 5b15fa354b982d1bcad3678159349ed8f9bfe135 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期五, 08 九月 2023 16:57:07 +0800
Subject: [PATCH] 分类码值管理 左侧树样式滚动条

---
 Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue |  115 +++++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 75 insertions(+), 40 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
index 4030c0d..c7cd494 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -63,11 +63,13 @@
           </el-dialog>
           <!--        淇敼瀵硅瘽妗�-->
           <el-dialog :visible.sync="TreeEditFormVisible" append-to-body title="淇敼鍒嗙被">
-            <classifyTreeform ref="childForm" :Editclose=" ()=>{TreeEditFormVisible=false}" :TreeFlag="editTreeFLagCode" :flag="'edit'"
+            <classifyTreeform ref="childForm" :Editclose=" ()=>{TreeEditFormVisible=false}" :TreeFlag="editTreeFLagCode"
+                              :flag="'edit'"
                               :loneTreeNewForm="TreeList" :nodeClickList="nodeClickList"
                               :nodeList="nodeList" @MasterHandler="MasterHandler" @flushed="flushed"
                               @referTreeForm="referTreeForm"></classifyTreeform>
           </el-dialog>
+<!--          宸︿晶鏍�-->
           <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata"
                      :defaultExpandAll="false"
                      :option="Treeoption"
@@ -233,7 +235,8 @@
                        :rowIndex="this.selectRow"></templatePro>
         </span>
         <!--     缂栫爜瑙勫垯-->
-        <el-dialog :visible.sync="MasterdialogVisible" append-to-body title="涓恒�愮紪鐮佽鍒欍�戦�夊彇鍊�" :before-close="masterEscHandler">
+        <el-dialog :before-close="masterEscHandler" :visible.sync="MasterdialogVisible" append-to-body
+                   title="涓恒�愮紪鐮佽鍒欍�戦�夊彇鍊�">
           <template>
             <el-select v-model="SelectValue" placeholder="璇烽�夋嫨" style="width: 135px">
               <el-option
@@ -248,7 +251,7 @@
             <el-button plain size="small" style="margin-left: 20px" type="primary" @click="SelectFindeHandler">鏌ヨ
             </el-button>
           </template>
-          <avue-crud :data="masterData" :option="masterOption" @row-click="masterSelect">
+          <avue-crud :data="masterData" :option="Option" @row-click="masterSelect">
             <template slot="radio" slot-scope="{row}">
               <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{ '' }}
               </el-radio>
@@ -266,7 +269,7 @@
           </div>
         </el-dialog>
         <!--      鍏抽敭灞炴�ф煡璇㈣鍒�-->
-        <el-dialog :visible.sync="KeydialogVisible" append-to-body title="涓恒�愬叧閿睘鎬ф煡璇㈣鍒欍�戦�夊彇鍊�" :before-close="KeyEscHandler">
+        <el-dialog :before-close="KeyEscHandler" :visible.sync="KeydialogVisible" append-to-body title="涓恒�愬叧閿睘鎬ф煡璇㈣鍒欍�戦�夊彇鍊�">
           <template>
             <el-select v-model="SelectValue" placeholder="璇烽�夋嫨" style="width: 135px">
               <el-option
@@ -281,7 +284,7 @@
             <el-button plain size="small" style="margin-left: 20px" type="primary" @click="KeySelectFindeHandler">鏌ヨ
             </el-button>
           </template>
-          <avue-crud :data="KeyData" :option="masterOption" @row-click="KeySelect">
+          <avue-crud :data="KeyData" :option="Option" @row-click="KeySelect">
             <template slot="radio" slot-scope="{row}">
               <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{ '' }}
               </el-radio>
@@ -290,7 +293,9 @@
           <div style="height: 30px">
             <div
               style="display: inline-block;float: left;border: 1px solid #eeeeee;padding: 5px;margin-top: 5px;font-size: 14px ">
-              宸茶缃殑鍊间负:[{{ this.TreeAddform.codeKeyAttrRepeatOidName == '' ? '鏈缃��' : this.TreeAddform.codekeyattrrepeatoidName }}]
+              宸茶缃殑鍊间负:[{{
+                this.TreeAddform.codeKeyAttrRepeatOidName == '' ? '鏈缃��' : this.TreeAddform.codekeyattrrepeatoidName
+              }}]
             </div>
             <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden">
               <el-button size="small" type="primary" @click="KeyHandlerClick">纭畾</el-button>
@@ -299,7 +304,7 @@
           </div>
         </el-dialog>
         <!--      鐩镐技椤规煡璇㈣鍒�-->
-        <el-dialog :visible.sync="SimidialogVisible" append-to-body title="涓恒�愮浉浼奸」鏌ヨ瑙勫垯銆戦�夊彇鍊�" :before-close="simEscHandler">
+        <el-dialog :before-close="simEscHandler" :visible.sync="SimidialogVisible" append-to-body title="涓恒�愮浉浼奸」鏌ヨ瑙勫垯銆戦�夊彇鍊�">
           <template>
             <el-select v-model="SelectValue" placeholder="璇烽�夋嫨" style="width: 135px">
               <el-option
@@ -314,7 +319,7 @@
             <el-button plain size="small" style="margin-left: 20px" type="primary" @click="SimSelectFindeHandler">鏌ヨ
             </el-button>
           </template>
-          <avue-crud :data="simData" :option="masterOption" @row-click="simSelect">
+          <avue-crud :data="simData" :option="Option" @row-click="simSelect">
             <template slot="radio" slot-scope="{row}">
               <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{ '' }}
               </el-radio>
@@ -323,7 +328,9 @@
           <div style="height: 30px">
             <div
               style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px ">
-              宸茶缃殑鍊间负:[{{ this.TreeAddform.codeResembleRuleOidName == '' ? '鏈缃��' : this.TreeAddform.codeResembleRuleOidName }}]
+              宸茶缃殑鍊间负:[{{
+                this.TreeAddform.codeResembleRuleOidName == '' ? '鏈缃��' : this.TreeAddform.codeResembleRuleOidName
+              }}]
             </div>
             <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden">
               <el-button size="small" type="primary" @click="simHandlerClick">纭畾</el-button>
@@ -332,7 +339,7 @@
           </div>
         </el-dialog>
         <!--        涓氬姟绫诲瀷-->
-        <el-dialog :visible.sync="BtmdialogVisible" append-to-body title="涓恒�愪笟鍔$被鍨嬭鍒欍�戦�夊彇鍊�" :before-close="BtmEscHandler">
+        <el-dialog :before-close="BtmEscHandler" :visible.sync="BtmdialogVisible" append-to-body title="涓恒�愪笟鍔$被鍨嬭鍒欍�戦�夊彇鍊�">
           <template>
             <el-select v-model="SelectValue" placeholder="璇烽�夋嫨" style="width: 135px !important;">
               <el-option
@@ -466,6 +473,33 @@
           }
         ]
       },
+      Option: {
+        addBtn: false,
+        index: true,
+        border: true,
+        menu: false,
+        height: 380,
+        column: [
+          {
+            label: '',
+            prop: 'radio',
+            width: 60,
+            display: false
+          },
+          {
+            label: '鑻辨枃鍚嶇О',
+            prop: 'id'
+          },
+          {
+            label: '涓枃鍚嶇О',
+            prop: 'name'
+          },
+          {
+            label: '鎻忚堪',
+            prop: 'description'
+          }
+        ]
+      },
       SelectOption: [
         {
           value: 'name',
@@ -476,7 +510,7 @@
           label: '鑻辨枃鍚嶇О'
         }
       ],
-      masterSelectOption:[
+      masterSelectOption: [
         {
           value: 'id',
           label: '涓氬姟绫诲瀷缂栧彿'
@@ -804,28 +838,32 @@
   },
   methods: {
     //瀛樺偍鐨勪笟鍔$被鍨嬪叧闂�
-    BtmEscHandler(){
-      this.SelectFInd='';
-      this.SelectValue='id';
-      this.BtmdialogVisible=false;
+    BtmEscHandler() {
+      this.SelectFInd = '';
+      this.SelectValue = 'id';
+      this.masterRow = null;
+      this.BtmdialogVisible = false;
     },
     //鐩镐技椤瑰叧闂�
-    simEscHandler(){
-      this.SelectFInd='';
-      this.SelectValue='id';
-      this.SimidialogVisible=false;
+    simEscHandler() {
+      this.SelectFInd = '';
+      this.SelectValue = 'id';
+      this.masterRow = null;
+      this.SimidialogVisible = false;
     },
     //鍏抽敭灞炴�у叧闂�
-    KeyEscHandler(){
-      this.SelectFInd='';
-      this.SelectValue='id';
-      this.KeydialogVisible=false;
+    KeyEscHandler() {
+      this.SelectFInd = '';
+      this.SelectValue = 'id';
+      this.masterRow = null;
+      this.KeydialogVisible = false;
     },
     //缂栫爜瑙勫垯鍏抽棴
-    masterEscHandler(){
-      this.SelectFInd='';
-      this.SelectValue='id';
-      this.MasterdialogVisible=false;
+    masterEscHandler() {
+      this.SelectFInd = '';
+      this.SelectValue = 'id';
+      this.masterRow = null;
+      this.MasterdialogVisible = false;
     },
     // 鍏抽棴寮圭獥
     /** 瀵煎叆 */
@@ -858,7 +896,7 @@
     //缂栫爜瑙勫垯鏌ヨ
     SelectFindeHandler() {
       const masterParameter = {};
-      masterParameter[`conditionMap['${this.SelectValue}']`] = `*${this.SelectFInd}*`;
+      masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd;
       this.MasterdefaultRend(masterParameter)
     },
     //缂栫爜瑙勫垯纭畾
@@ -881,6 +919,7 @@
         referType: 'coderule',
         isMuti: 'false',
         'conditionMap["lcstatus"]': 'Released',
+        'limit':'-1',
         ...masterParameter
       }).then(res => {
         this.masterData = res.data.records;
@@ -906,7 +945,7 @@
     //鍏抽敭灞炴�ф煡璇�
     KeySelectFindeHandler() {
       const masterParameter = {};
-      masterParameter[`conditionMap['${this.SelectValue}']`] = `*${this.SelectFInd}*`;
+      masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd;
       this.KeydefaultRend(masterParameter)
     },
     //鍏抽敭灞炴�ф帴鍙�
@@ -915,6 +954,7 @@
         referType: 'codekeyattrrepeat',
         isMuti: 'false',
         'conditionMap["lcstatus"]': 'Enabled',
+        'limit':'-1',
         ...masterParameter
       }).then(res => {
         this.KeyData = res.data.records;
@@ -949,7 +989,7 @@
     //鐩镐技椤规煡璇�
     SimSelectFindeHandler() {
       const masterParameter = {};
-      masterParameter[`conditionMap['${this.SelectValue}']`] = `*${this.SelectFInd}*`;
+      masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd;
       this.simdefaultRend(masterParameter)
     },
     //  鐩镐技椤瑰閫�
@@ -965,6 +1005,7 @@
         referType: 'coderesemblerule',
         isMuti: 'false',
         'conditionMap["lcstatus"]': 'Enabled',
+        'limit':'-1',
         ...masterParameter
       }).then(res => {
         this.simData = res.data.records;
@@ -982,6 +1023,7 @@
       } else if (this.btmSelectList.length <= 0) {
         this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�')
       } else {
+        this.$refs.myForm.clearValidate();
         this.BtmdialogVisible = false;
         this.btmSelectList = []
         this.$set(this.TreeAddform, 'btmTypeName', this.btmName)
@@ -992,8 +1034,8 @@
     //涓氬姟绫诲瀷鏌ヨ
     BtmSelectFindeHandler() {
       const masterParameter = {};
-      masterParameter[`conditionMap['${this.SelectValue}']`] = `*${this.SelectFInd}*`;
-        this.btmdefaultRend(masterParameter);
+      masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd;
+      this.btmdefaultRend(masterParameter);
     },
     //涓氬姟绫诲瀷澶氶��
     btmSelect(row) {
@@ -1004,7 +1046,7 @@
     },
     //涓氬姟绫诲瀷鎺ュ彛
     btmdefaultRend(masterParameter) {
-      referDataGrid({valueField: 'id', isMuti: 'false', ...masterParameter}).then(res => {
+      referDataGrid({valueField: 'id', isMuti: 'false','limit':'-1', ...masterParameter}).then(res => {
         this.BtmData = res.data.data.records
       })
     },
@@ -1031,7 +1073,6 @@
         })
         //璋冪敤淇敼灞炴�у悕鏂规硶
         this.ModifyProperties(this.CloneTreedata, 'name', 'label');
-        console.log(this.CloneTreedata)
         this.CloneTreedata = this.CloneTreedata.map(item => {
           if (item.attributes.lcStatus === "Disabled") {
             item.label += '銆愬仠鐢ㄣ��';
@@ -1087,7 +1128,6 @@
         this.$message.warning('璇疯緭鍏ュ唴瀹癸紒');
       } else {
         const data = this.TreeAddform;
-        // data.btmtypename= this.TreeList.btmtypename
         this.$set(data, "parentCodeClassifyOid", this.nodeClickList.oid);
         TreeSave(data)
           .then(() => {
@@ -1254,11 +1294,9 @@
           });
         }
       }
-
     },
     //鏍戠偣鍑讳簨浠�
     async nodeClick(data) {
-      console.log(data);
       //鎿嶄綔鏂板鍜屼慨鏀圭殑涓氬姟绫诲瀷闅愯棌
       this.TreeFlagCode = !data;
       this.editTreeFLagCode = !data.parentId;
@@ -1480,9 +1518,6 @@
       const {id, name} = row[0];
       this.CloneModel = {id, name};
       this.CloneSelect[0].codeclassifyoid = this.nodeClickList.oid;
-      console.log('row', row)
-      console.log('CloneSelect', this.CloneSelect)
-      console.log('CloneModel', this.CloneModel)
     },
     //鍏嬮殕琛ㄥ崟鎻愪氦
     Clonesubmit(row, done) {

--
Gitblit v1.9.3