From 19d2e5d34ae80d454c3d0854ffc7a712d63caabc Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期二, 01 八月 2023 18:14:42 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue |   50 ++++++++++++++++++++++++++++++++------------------
 1 files changed, 32 insertions(+), 18 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
index 07bd00b..7a950f4 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
@@ -14,7 +14,7 @@
       </el-button-group>
       <el-button-group>
         <!--    淇濆瓨-->
-        <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && editOpenFlag" size="small" type="success" plain @click="addsHandler" icon="el-icon-check">淇濆瓨</el-button>
+        <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && editOpenFlag" size="small" type="success" plain @click.prevent="addsHandler" icon="el-icon-check">淇濆瓨</el-button>
         <!--    棰勮鎺掑簭-->
         <el-button size="small" @click="orderHandle" icon="el-icon-arrow-down">棰勮鎺掑簭</el-button>
         <!--    鍒犻櫎-->
@@ -166,11 +166,11 @@
         </div>
       </el-dialog>
       <!--        灞炴�у垎缁�-->
-      <el-dialog :visible.sync="attrVisible" append-to-body style="width: 800px; left:30vw;top: 10vh ;"
+      <el-dialog :visible.sync="attrVisible" append-to-body :before-close="attrClose" style="width: 800px; left:30vw;top: 10vh ;"
                  title="杈撳叆鍒嗙粍鐨勫悕绉�">
         <el-form ref="form" label-width="70px">
           <el-form-item label="灞炴�у垎缁�">
-            <el-input v-model="attrModel"></el-input>
+            <el-input v-model="attrModel" autofocus></el-input>
           </el-form-item>
           <div style="display: flex;justify-content: flex-end">
             <el-button size="small" type="primary" @click="attrHandle">鎻愪氦</el-button>
@@ -218,7 +218,7 @@
       </el-dialog>
       <!--        鍏ㄥ睆缂栬緫-->
       <el-dialog :visible.sync="attrEditVisible" append-to-body fullscreen="true" :before-close="escEdit" >
-        <attrCrud :ProData="this.ProData" :attrFlagChiledren="this.attrFlag" :editStyleFlag="editStyleFlag" :editOpenFlag="editOpenFlag" :crudArrayFlag="this.crudArrayFlag"></attrCrud>
+        <attrCrud :ProData="this.ProData" :attrFlagChiledren="this.attrFlag" @editCloseChildren="editClose" :editStyleFlag="editStyleFlag" :editOpenFlag="editOpenFlag" :crudArrayFlag="this.crudArrayFlag"></attrCrud>
       </el-dialog>
       <!--      缁勫悎瑙勫垯-->
       <formula-editor :systemVariableTableData="systemVariableTableData"
@@ -1536,12 +1536,15 @@
       }else {
         this.$set(this.attrSelectList[0], 'attributeGroup', this.attrModel)
       }
-      this.attrModel = "";
-      this.attrVisible = false;
+      this.attrClose()
     },
     //灞炴�у垎缁勬竻绌�
     attrRemove() {
       this.attrModel = ""
+    },
+    attrClose(){
+      this.attrModel = "";
+      this.attrVisible=false
     },
     //琛ㄦ牸鏁版嵁
     CrudRend() {
@@ -1677,15 +1680,16 @@
       this.attrRow = row;
     },
     //淇濆瓨
-    addsHandler() {
+    addsHandler(event) {
       batchAddSave(JSON.parse(JSON.stringify(this.ProData))).then(res => {
         this.$message.success('淇濆瓨鎴愬姛')
-        this.editOpenFlag=false
+        this.editOpenFlag=false;
+        // 璋冪敤鐖剁粍浠朵慨鏀规寜閽姸鎬�
+        this.$emit('editCloseChildren')
       }).catch(()=>{
         this.$message.warning('淇濆瓨澶辫触锛岃鏌ョ湅鎺у埗鍙拌緭鍑猴紒')
       })
     },
-
     //琛ㄦ牸琛岀紪杈�
     handleCellClicks(row, column) {
        if(this.editOpenFlag){
@@ -1706,14 +1710,16 @@
            // this.$refs.referConfigFormDialog.onloadAttrData();
          }else if(column.property == 'classifyInvokeText'){
            this.injectVisible=true;
-           this.injectOption.classifyInvokeAttr=this.CurrentCell.classifyInvokeAttr;
-           this.injectOption.classifyInvokeAttrName=this.CurrentCell.classifyInvokeAttrName;
-           this.injectOption.classifyInvokeEditFlag=this.CurrentCell.classifyInvokeEditFlag;
-           if(this.CurrentCell.classifyInvokeLevel == 'min'){
-             this.injectOption.classifyInvokeLevel='min'
-           }else {
-             this.injectOption.classifyInvokeLevel='max'
-             this.injectOption.classifyNumber=this.CurrentCell.classifyInvokeLevel;
+           if (this.CurrentCell.classifyInvokeAttr != '') {
+             this.injectOption = {
+               classifyInvokeAttr: this.CurrentCell.classifyInvokeAttr,
+               classifyInvokeAttrName: this.CurrentCell.classifyInvokeAttrName,
+               classifyInvokeEditFlag: this.CurrentCell.classifyInvokeEditFlag,
+               classifyInvokeLevel: this.CurrentCell.classifyInvokeLevel == 'min' ? 'min' : 'max',
+               classifyNumber: this.CurrentCell.classifyInvokeLevel == 'min' ? '' : this.CurrentCell.classifyInvokeLevel
+             };
+           } else {
+             this.injectHandleReset();
            }
          }else if(column.property == 'componentRule'){
            if(this.CurrentCell){
@@ -1740,6 +1746,9 @@
            this.rulesVisible=true;
          }else if(column.property == 'attributeGroup'){
            this.attrVisible = true;
+           if(this.CurrentCell.attributeGroup !== ''){
+                this.attrModel=this.CurrentCell.attributeGroup
+           }
          }
        }
     },
@@ -1907,7 +1916,8 @@
     },
     // 鍒嗙被娉ㄥ叆鍙栨秷
     injectRemove() {
-      this.injectVisible = false
+      this.injectVisible = false;
+      this.injectHandleReset()
     },
     //灞炴�фā鏉胯〃鏍煎崟鍏冩牸鐐瑰嚮浜嬩欢
     //琛ㄦ牸鎿嶄綔鏍忓垹闄�
@@ -1994,6 +2004,10 @@
     editOpen(){
       this.editOpenFlag=true;
     },
+    //瀹氫箟涓�涓叧闂紪杈戠殑鏂规硶渚涘瓙缁勪欢浣跨敤
+    editClose(){
+      this.editOpenFlag=false;
+    },
     //鎵归噺璁剧疆switch
     batchSetFlag(value){
       this.attrSelectList.forEach(item=>{

--
Gitblit v1.9.3