From 608ba76865266795b4b43bc7d9c8ab68ac0bb83d Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期二, 31 十月 2023 16:36:52 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue |  252 +++++++++++++++++++++++++++++++-------------------
 1 files changed, 155 insertions(+), 97 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue
index 87bf1ca..4ea4530 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue
@@ -2,11 +2,11 @@
   <div>
     <avue-form v-model="loneTreeNewForm" :option="option" v-if="flag == 'renonly'">
     </avue-form>
-    <avue-form v-model="loneTreeNewForm" :option="this.options" @submit="submits" v-else-if="flag == 'edit'">
+      <avue-form v-model="loneTreeNewForm" :option="this.options" @submit="submits" v-else-if="flag == 'edit'">
     </avue-form>
     <div>
 <!--     缂栫爜瑙勫垯-->
-      <el-dialog  :visible.sync="MasterdialogVisible"   title="涓恒�愮紪鐮佽鍒欍�戦�夊彇鍊�" append-to-body>
+      <el-dialog  :visible.sync="MasterdialogVisible"   title="涓恒�愮紪鐮佽鍒欍�戦�夊彇鍊�" append-to-body :before-close="masterEscHandler">
         <template>
           <el-select v-model="SelectValue" placeholder="璇烽�夋嫨" style="width: 135px">
             <el-option
@@ -20,17 +20,22 @@
           <el-input style="width: 260px;margin-left: 15px" placeholder="杈撳叆鍊煎悗杩涜妯$硦鏌ヨ" v-model="SelectFInd"></el-input>
           <el-button size="small"  type="primary" plain @click="SelectFindeHandler" style="margin-left: 20px">鏌ヨ</el-button>
         </template>
-        <avue-crud :data="masterData" :option="masterOption" @select="masterSelect"></avue-crud>
+        <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>
+          </template>
+        </avue-crud>
         <div style="height: 30px">
           <div style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px " >宸茶缃殑鍊间负:[{{this.loneTreeNewForm.coderuleoidName}}]</div>
           <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" >
             <el-button type="primary" size="small" @click="MasterHandlerClick">纭畾</el-button>
-            <el-button  size="small" @click="MasterdialogVisible=false">鍙栨秷</el-button>
+            <el-button  size="small" @click="masterEscHandler">鍙栨秷</el-button>
           </div>
         </div>
       </el-dialog>
 <!--      鍏抽敭灞炴�ф煡璇㈣鍒�-->
-      <el-dialog  :visible.sync="KeydialogVisible"   title="涓恒�愬叧閿睘鎬ф煡璇㈣鍒欍�戦�夊彇鍊�" append-to-body>
+      <el-dialog  :visible.sync="KeydialogVisible"   title="涓恒�愬叧閿睘鎬ф煡璇㈣鍒欍�戦�夊彇鍊�" append-to-body :before-close="KeyEscHandler">
         <template>
           <el-select v-model="SelectValue" placeholder="璇烽�夋嫨" style="width: 135px">
             <el-option
@@ -44,17 +49,22 @@
           <el-input style="width: 260px;margin-left: 15px" placeholder="杈撳叆鍊煎悗杩涜妯$硦鏌ヨ" v-model="SelectFInd"></el-input>
           <el-button size="small"  type="primary" plain @click="KeySelectFindeHandler" style="margin-left: 20px">鏌ヨ</el-button>
         </template>
-        <avue-crud :data="KeyData" :option="masterOption" @select="KeySelect"></avue-crud>
+        <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>
+          </template>
+        </avue-crud>
         <div style="height: 30px">
           <div style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px " >宸茶缃殑鍊间负:[{{this.loneTreeNewForm.codekeyattrrepeatoidName}}]</div>
           <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" >
             <el-button type="primary" size="small" @click="KeyHandlerClick">纭畾</el-button>
-            <el-button  size="small" @click="KeydialogVisible=false">鍙栨秷</el-button>
+            <el-button  size="small" @click="KeyEscHandler">鍙栨秷</el-button>
           </div>
         </div>
       </el-dialog>
       <!--      鐩镐技椤规煡璇㈣鍒�-->
-      <el-dialog  :visible.sync="SimidialogVisible"   title="涓恒�愮浉浼奸」鏌ヨ瑙勫垯銆戦�夊彇鍊�" append-to-body>
+      <el-dialog  :visible.sync="SimidialogVisible"   title="涓恒�愮浉浼奸」鏌ヨ瑙勫垯銆戦�夊彇鍊�" append-to-body :before-close="simEscHandler">
         <template>
           <el-select v-model="SelectValue" placeholder="璇烽�夋嫨" style="width: 135px">
             <el-option
@@ -68,21 +78,26 @@
           <el-input style="width: 260px;margin-left: 15px" placeholder="杈撳叆鍊煎悗杩涜妯$硦鏌ヨ" v-model="SelectFInd"></el-input>
           <el-button size="small"  type="primary" plain @click="SimSelectFindeHandler" style="margin-left: 20px">鏌ヨ</el-button>
         </template>
-        <avue-crud :data="simData" :option="masterOption" @select="simSelect"></avue-crud>
+        <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>
+          </template>
+        </avue-crud>
         <div style="height: 30px">
           <div style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px " >宸茶缃殑鍊间负:[{{this.loneTreeNewForm.codeResembleRuleOidName}}]</div>
           <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" >
             <el-button type="primary" size="small" @click="simHandlerClick">纭畾</el-button>
-            <el-button  size="small" @click="SimidialogVisible=false">鍙栨秷</el-button>
+            <el-button  size="small" @click="simEscHandler">鍙栨秷</el-button>
           </div>
         </div>
       </el-dialog>
 <!--      瀛樺偍鐨勪笟鍔$被鍨�-->
-      <el-dialog  :visible.sync="BtmdialogVisible"   title="涓恒�愪笟鍔$被鍨嬨�戦�夊彇鍊�" append-to-body>
+      <el-dialog  :visible.sync="BtmdialogVisible"   title="涓恒�愪笟鍔$被鍨嬨�戦�夊彇鍊�" append-to-body :before-close="BtmEscHandler">
         <template>
           <el-select v-model="SelectValue" placeholder="璇烽�夋嫨" style="width: 135px !important;">
             <el-option
-              v-for="item in SelectOption"
+              v-for="item in masterSelectOption"
               :key="item.value"
               :label="item.label"
               :value="item.value"
@@ -92,12 +107,17 @@
           <el-input style="width: 260px;margin-left: 15px" placeholder="杈撳叆鍊煎悗杩涜妯$硦鏌ヨ" v-model="SelectFInd"></el-input>
           <el-button size="small"  type="primary" plain @click="BtmSelectFindeHandler" style="margin-left: 20px">鏌ヨ</el-button>
         </template>
-        <avue-crud :data="BtmData" :option="masterOption" @select="btmSelect"></avue-crud>
+        <avue-crud :data="BtmData" :option="masterOption" @row-click="btmSelect">
+          <template slot="radio" slot-scope="{row}">
+            <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{ '' }}
+            </el-radio>
+          </template>
+        </avue-crud>
         <div style="height: 30px">
           <div style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px " >宸茶缃殑鍊间负:[{{this.loneTreeNewForm.btmTypeName}}]</div>
           <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" >
             <el-button type="primary" size="small" @click="btmHandlerClick">纭畾</el-button>
-            <el-button  size="small" @click="BtmdialogVisible=false">鍙栨秷</el-button>
+            <el-button  size="small" @click="BtmEscHandler">鍙栨秷</el-button>
           </div>
         </div>
       </el-dialog>
@@ -113,6 +133,7 @@
   props: ['loneTreeNewForm','flag','Editclose','TreeFlag','nodeClickList'],
   data() {
     return {
+      masterRow:null,
       SelectFInd:"",
       masterName:"",
       masterOid:"",
@@ -139,8 +160,19 @@
           label: '鑻辨枃鍚嶇О'
         }
       ],
-      SelectValue:"",
+      masterSelectOption:[
+        {
+          value: 'id',
+          label: '涓氬姟绫诲瀷缂栧彿'
+        },
+        {
+          value: 'name',
+          label: '涓氬姟绫诲瀷鍚嶇О'
+        },
+      ],
+      SelectValue:'id',
       btmOption:{
+        columnBtn:false,
         addBtn:false,
         index:true,
         border:true,
@@ -162,20 +194,53 @@
           }
         ]
       },
-      masterOption:{
+      Option:{
         addBtn:false,
+        columnBtn:false,
         index:true,
         border:true,
-        selection:true,
         menu:false,
         height:380,
         column:[
           {
-            label:'鑻辨枃鍚嶇О',
+            label: '',
+            prop: 'radio',
+            width: 60,
+            display: false
+          },
+          {
+            label:'鑻辨枃缂栧彿',
             prop:'id'
           },
           {
             label:'涓枃鍚嶇О',
+            prop:'name'
+          },
+          {
+            label:'鎻忚堪',
+            prop:'description'
+          }
+        ]
+      },
+      masterOption:{
+        addBtn:false,
+        index:true,
+        border:true,
+        menu:false,
+        height:380,
+        column:[
+          {
+            label: '',
+            prop: 'radio',
+            width: 60,
+            display: false
+          },
+          {
+            label:'涓氬姟绫诲瀷缂栧彿',
+            prop:'id'
+          },
+          {
+            label:'涓氬姟绫诲瀷鍚嶇О',
             prop:'name'
           },
           {
@@ -195,7 +260,7 @@
       option: {
         submitBtn:false,
         emptyBtn:false,
-
+        columnBtn:false,
         column: [
           {
             label: '涓婚搴�/鍒嗙被缂栧彿',
@@ -334,6 +399,11 @@
     }
   },
   watch:{
+    TreeFlag:{
+      handler(newval,oldval){
+        // console.log(newval)
+      }
+    }
   },
   created() {
   },
@@ -362,23 +432,39 @@
     error(err) {
       this.$message.success(err);
     },
+    //缂栫爜瑙勫垯鍏抽棴
+    masterEscHandler(){
+      this.SelectFInd='';
+      this.SelectValue='id';
+      this.masterRow=null;
+      this.MasterdialogVisible=false;
+    },
+    //鍏抽敭灞炴�у叧闂�
+    KeyEscHandler(){
+      this.SelectFInd='';
+      this.SelectValue='id';
+      this.masterRow=null;
+      this.KeydialogVisible=false;
+    },
+    //鐩镐技椤瑰叧闂�
+    simEscHandler(){
+      this.SelectFInd='';
+      this.SelectValue='id';
+      this.masterRow=null;
+      this.SimidialogVisible=false;
+    },
+    //瀛樺偍涓氬姟绫诲瀷鍏抽棴
+    BtmEscHandler(){
+      this.SelectFInd='';
+      this.SelectValue='id';
+      this.masterRow=null;
+      this.BtmdialogVisible=false;
+    },
     //缂栫爜瑙勫垯鏌ヨ
     SelectFindeHandler(){
-      if(this.SelectValue == 'id'){
-        const masterParameter={
-          'conditionMap[id]':this.SelectFInd
-        }
-        this.MasterdefaultRend(masterParameter);
-        this.SelectValue=""
-        this.SelectFInd=""
-      }else if(this.SelectValue == 'name'){
-        const masterParameter={
-          'conditionMap[name]':this.SelectFInd
-        }
-        this.MasterdefaultRend(masterParameter)
-        this.SelectValue=""
-        this.SelectFInd=""
-      }
+      const masterParameter = {};
+      masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd;
+      this.MasterdefaultRend(masterParameter)
     },
     //缂栫爜瑙勫垯澶辩劍
     CodeFoucus(){
@@ -401,9 +487,10 @@
     },
     //缂栫爜澶氶��
     masterSelect(row){
-      this.masterSelectList=row;
-      this.masterName=row[0].name;
-      this.masterOid=row[0].oid;
+      this.masterRow = row.$index;
+      this.masterSelectList = row;
+      this.masterName = row.name;
+      this.masterOid = row.oid;
     },
     //缂栫爜鎺ュ彛
     MasterdefaultRend(masterParameter){
@@ -411,6 +498,7 @@
         referType:'coderule',
         isMuti:'false',
         'conditionMap["lcstatus"]':'Released',
+        'limit':'-1',
         ...masterParameter
       }).then(res=>{
         this.masterData=res.data.records;
@@ -437,37 +525,28 @@
     },
     //鍏抽敭灞炴�ф煡璇�
     KeySelectFindeHandler(){
-      if(this.SelectValue == 'id'){
-        const masterParameter={
-          'conditionMap[id]':this.SelectFInd
-        }
-        this.KeydefaultRend(masterParameter);
-        this.SelectValue=""
-        this.SelectFInd=""
-      }else if(this.SelectValue == 'name'){
-        const masterParameter={
-          'conditionMap[name]':this.SelectFInd
-        }
-        this.KeydefaultRend(masterParameter)
-        this.SelectValue="";
-        this.SelectFInd="";
-      }
+      const masterParameter = {};
+      masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd;
+      this.KeydefaultRend(masterParameter)
     },
     //鍏抽敭灞炴�ф帴鍙�
-    KeydefaultRend(){
+    KeydefaultRend(masterParameter){
       defaultReferDataGrid({
         referType:'codekeyattrrepeat',
         isMuti:'false',
-        'conditionMap["lcstatus"]':'Enabled'
+        'conditionMap["lcstatus"]':'Enabled',
+        'limit':'-1',
+        ...masterParameter
       }).then(res=>{
         this.KeyData=res.data.records;
       })
     },
     //鍏抽敭澶氶��
     KeySelect(row){
-      this.KeySelectLIst=row;
-      this.KeyName=row[0].name;
-      this.KeyOid=row[0].oid;
+      this.masterRow = row.$index;
+      this.KeySelectLIst = row;
+      this.KeyName = row.name;
+      this.KeyOid = row.oid;
     },
     //鐩镐技椤瑰け鐒�
     simFouce(){
@@ -490,34 +569,25 @@
     },
     //鐩镐技椤规煡璇�
     SimSelectFindeHandler(){
-      if(this.SelectValue == 'id'){
-        const masterParameter={
-          'conditionMap[id]':this.SelectFInd
-        }
-        this.simdefaultRend(masterParameter);
-        this.SelectValue=""
-        this.SelectFInd=""
-      }else if(this.SelectValue == 'name'){
-        const masterParameter={
-          'conditionMap[name]':this.SelectFInd
-        }
-        this.simdefaultRend(masterParameter)
-        this.SelectValue=""
-        this.SelectFInd=""
-      }
+      const masterParameter = {};
+      masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd;
+      this.simdefaultRend(masterParameter)
     },
     //鐩镐技椤瑰閫�
     simSelect(row){
-      this.simSelectList=row;
-      this.simName=row[0].name;
-      this.simOid=row[0].oid;
+      this.masterRow = row.$index;
+      this.simSelectList = row;
+      this.simName = row.name;
+      this.simOid = row.oid;
     },
     //鐩镐技椤归」鎺ュ彛
-    simdefaultRend(){
+    simdefaultRend(masterParameter){
       defaultReferDataGrid({
         referType:'coderesemblerule',
         isMuti:'false',
-        'conditionMap["lcstatus"]':'Enabled'
+        'conditionMap["lcstatus"]':'Enabled',
+        'limit':'-1',
+        ...masterParameter
       }).then(res=>{
         this.simData=res.data.records;
       })
@@ -536,39 +606,27 @@
       }else {
         this.BtmdialogVisible=false;
         this.btmSelectList=[]
-        this.$set(this.loneTreeNewForm,'btmTypeName',this.btmName ||this.btmOid)
+        this.$set(this.loneTreeNewForm,'btmTypeName',this.btmName ||this.btmId)
         this.$set(this.loneTreeNewForm,'btmTypeId',this.btmId)
         this.$emit('MasterHandler',this.loneTreeNewForm)
       }
     },
     //涓氬姟绫诲瀷鏌ヨ
     BtmSelectFindeHandler(){
-      if(this.SelectValue == 'id'){
-        const masterParameter={
-          'conditionMap[id]':this.SelectFInd
-        }
-        this.btmdefaultRend(masterParameter);
-        this.SelectValue=""
-        this.SelectFInd=""
-      }else if(this.SelectValue == 'name'){
-        const masterParameter={
-          'conditionMap[name]':this.SelectFInd
-        }
-        this.btmdefaultRend(masterParameter)
-        this.SelectValue=""
-        this.SelectFInd=""
-      }
+      const masterParameter = {};
+      masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd;
+      this.btmdefaultRend(masterParameter);
     },
     //涓氬姟绫诲瀷澶氶��
     btmSelect(row){
       this.btmSelectList=row;
-      this.btmName=row[0].name;
-      this.btmOid=row[0].oid;
-      this.btmId=row[0].id;
+      this.btmName=row.name;
+      this.btmOid=row.oid;
+      this.btmId=row.id;
     },
     //涓氬姟绫诲瀷鎺ュ彛
     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
       })
     }

--
Gitblit v1.9.3