From fbcf5ee613da2bb6426ae53cb965a0f7260c01f0 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期一, 31 七月 2023 14:49:29 +0800
Subject: [PATCH] 全屏编辑编辑bug

---
 Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue |   52 +++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 41 insertions(+), 11 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
index 8f655e7..5fdbfbf 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
@@ -45,7 +45,7 @@
       </el-button-group>
       <!-- 鏄惁寮�鍚紪杈�     -->
     <el-button-group>
-      <el-button size="small" plain  icon="el-icon-view"  v-if="(!checkStatus|| crudLCStatus=='Editing') && !editOpenFlag" @click="editOpen" >寮�鍚紪杈�</el-button>
+      <el-button size="small" plain  icon="el-icon-view"  v-if="(!checkStatus|| crudLCStatus=='Editing') && !editOpenFlag && attrEditVisible == false && attrFlagChiledren==false" @click="editOpen" >寮�鍚紪杈�</el-button>
     </el-button-group>
     </div>
 <!--    寮圭獥-->
@@ -207,7 +207,7 @@
       </el-dialog>
       <!--        鍏ㄥ睆缂栬緫-->
       <el-dialog :visible.sync="attrEditVisible" append-to-body fullscreen="true">
-        <attrCrud :ProData="this.ProData" :attrFlagChiledren="this.attrFlag" :crudArrayFlag="this.crudArrayFlag"></attrCrud>
+        <attrCrud :ProData="this.ProData" :attrFlagChiledren="this.attrFlag" :editOpenFlag="editOpenFlag" :crudArrayFlag="this.crudArrayFlag"></attrCrud>
       </el-dialog>
       <!--      缁勫悎瑙勫垯-->
       <formula-editor :systemVariableTableData="systemVariableTableData"
@@ -251,7 +251,7 @@
     </div>
     <el-table :data="ProData"
               style="width: 100%"
-              height="400"
+              :height="this.editStyleFlag ? 450 : 900"
               @cell-click="handleCellClicks"
               @select="selectHandle"
               @selection-change="selectionChange"
@@ -371,6 +371,24 @@
       deep:true,
       immediate:true
     },
+    Formlist:{
+      handler(newval,oldval){
+        if(newval.length === 0){
+          this.crudArrayFlag=false
+          return
+        }
+      }
+    },
+    ProData:{
+      handler(newval,oldval){
+        if(newval){
+          this.loading=true;
+          setTimeout(() => {
+            this.loading=false
+          }, 1000);
+        }
+      }
+    },
     'injectOption.classifyInvokeAttr': function(newVal) {
       console.log('newVal',newVal)
       if (newVal === "name") {
@@ -391,6 +409,8 @@
   },
   data() {
     return {
+      //鍏ㄥ睆缂栬緫楂樺害鐘舵��
+      edittStyleFlag:false,
       loading:false,
       referConfigText:"",
       referConfigVisble:false,
@@ -1448,11 +1468,14 @@
     //灞炴�у垎缁勬彁浜�
     attrHandle() {
       console.log(this.attrSelectList)
-      // this.$set(this.attrRow, 'attributeGroup', this.attrModel)
-      // this.attrSelectList.attributeGroup=this.attrModel
       this.attrSelectList.forEach(item=>{
         item.attributeGroup=this.attrModel
       })
+      if(this.CurrentCell){
+        this.$set(this.CurrentCell, 'attributeGroup', this.attrModel)
+      }else {
+        this.$set(this.attrSelectList[0], 'attributeGroup', this.attrModel)
+      }
       this.attrModel = "";
       this.attrVisible = false;
     },
@@ -1592,6 +1615,9 @@
     addsHandler() {
       batchAddSave(JSON.parse(JSON.stringify(this.ProData))).then(res => {
         this.$message.success('淇濆瓨鎴愬姛')
+        this.editOpenFlag=false
+      }).catch(()=>{
+        this.$message.warning('淇濆瓨澶辫触锛岃鏌ョ湅鎺у埗鍙拌緭鍑猴紒')
       })
     },
 
@@ -1639,8 +1665,8 @@
          }else if(column.property == 'verifyRule'){
            this.RulesForm.expressionTextt=this.CurrentCell.verifyRule;
            this.rulesVisible=true;
-           console.log(this.CurrentCell.verifyRule)
-           console.log(this.RulesForm.expressionText)
+         }else if(column.property == 'attributeGroup'){
+           this.attrVisible = true;
          }
        }
     },
@@ -1782,8 +1808,10 @@
       // noinspection JSCheckFunctionSignatures
       if(this.CurrentCell){
         //濡傛灉鏄寚瀹氬眰璧嬪�间负鏁板瓧
-        if(this.CurrentCell.classifyInvokeLevel!== 'min'){
+        if(this.injectOption.classifyInvokeLevel!== 'min'){
           this.CurrentCell.classifyInvokeLevel=this.injectOption.classifyNumber
+        }else {
+          this.CurrentCell.classifyInvokeLevel='min'
         }
         //鍏朵綑姝e父璧嬪��
         this.CurrentCell.classifyInvokeAttr=this.injectOption.classifyInvokeAttr,
@@ -1799,6 +1827,8 @@
           //濡傛灉鏄寚瀹氬眰璧嬪�间负鏁板瓧
           if(this.injectOption.classifyInvokeLevel !== 'min'){
             this.attrSelectList[0].classifyInvokeLevel=this.injectOption.classifyNumber
+          }else {
+            this.attrSelectList[0].classifyInvokeLevel='min'
           }
           this.$set(this.attrSelectList[0],'classifyInvokeText',data)
         }
@@ -1871,6 +1901,8 @@
       if (this.crudArray.length < 1) {
         this.$message.warning('璇烽�夋嫨涓�涓ā鏉�')
       } else {
+        this.editStyleFlag=!this.editStyleFlag;
+        // this.editOpenFlag=true;
         this.attrEditVisible = true;
         this.attrFlag = true;
       }
@@ -1903,11 +1935,9 @@
     sortChange(val) {
       console.log(val)
     },
+    //寮�鍚紪杈�
     editOpen(){
       this.editOpenFlag=true;
-      console.log('涓嶇瓑浜�',this.checkStatus)
-      console.log('绛変簬',this.editOpenFlag)
-      console.log('绛変簬',this.crudLCStatus)
     }
   }
 }

--
Gitblit v1.9.3