From 2c6c24281d4c261b172d02a98df9524cffc0c276 Mon Sep 17 00:00:00 2001
From: fujunling <2984387807@qq.com>
Date: 星期二, 18 七月 2023 11:04:39 +0800
Subject: [PATCH] fjl

---
 Source/UBCS-WEB/src/components/Tree/attrCrud.vue |   31 ++++++++++++++++++++++---------
 1 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
index 5e22116..cc66270 100644
--- a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
@@ -242,7 +242,7 @@
     </div>
     <el-table :data="ProData"
               style="width: 100%"
-              height="280"
+              height="750"
               @cell-click="handleCellClicks"
               @select="selectHandle"
               @selection-change="selectionChange"
@@ -374,6 +374,7 @@
       editingRows: null,
       editShows:"",
       attrFlag: false,
+      referObject:{},
       //缂栫爜鐢宠棰勮option
       applicationoption: {
         column: []
@@ -1391,6 +1392,7 @@
     //鍙傜収閰嶇疆瀛愮粍浠�
     echoReferConfig(val){
       console.log('val--',val)
+      this.referObject=val
       this.$set(this.CurrentCell,'referConfig',JSON.stringify(val))
 
     },
@@ -1635,15 +1637,26 @@
     },
     //鏋氫妇娉ㄥ叆淇濆瓨
     enumAddHandle() {
-      if (this.enumRow.length < 1) {
-        this.$message.warning('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�')
-      } else {
-        if(this.CurrentCell){
-          this.$set(this.CurrentCell, 'enumString', JSON.stringify(this.enumRow));
+      let hasError = false; // 娣诲姞涓�涓彉閲�
+      this.tableData.forEach((item, index) => {
+        if (item.key === '') {
+          this.$message.warning(`绗�${index + 1}琛岀殑閫夐」鍊间笉鑳戒负绌篳);
+          hasError = true;
+          return;
+        } else if (item.value === '') {
+          this.$message.warning(`绗�${index + 1}琛岀殑閫夐」涓枃鏍囩涓嶈兘涓虹┖`);
+          hasError = true;
+          return;
+        }
+      });
+        // 淇濆瓨鎵ц閫昏緫
+      if (!hasError) {
+        if (this.CurrentCell) {
+          this.$set(this.CurrentCell, 'enumString', JSON.stringify(this.tableData));
           this.enumVisible = false;
-        }else {
-          this.$set(this.attrSelectList[0], 'enumString', JSON.stringify(this.enumRow));
-          this.tableData=[]
+        } else {
+          this.$set(this.attrSelectList[0], 'enumString', JSON.stringify(this.tableData));
+          this.tableData=[];
           this.enumVisible = false;
         }
       }

--
Gitblit v1.9.3