From ec2c06dabe9edaee7d28988d69a7bfd56eca3abd Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期五, 20 九月 2024 15:39:52 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue |   76 +++++++++++++++++++++----------------
 1 files changed, 43 insertions(+), 33 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue
index 2fdceb0..0cd245d 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/attributePool/index.vue
@@ -18,7 +18,7 @@
           @current-change="currentChange"
         >
           <template slot="menuLeft" slot-scope="scope">
-            <el-button icon="el-icon-plus" size="small" type="primary" @click="rowSaveHandlerClick">鍒涘缓</el-button>
+            <el-button icon="el-icon-plus" plain size="small" type="primary" @click="rowSaveHandlerClick">鍒涘缓</el-button>
             <el-button icon="el-icon-delete" plain size="small" type="danger" @click="allDelHandler">鍒犻櫎</el-button>
             <el-button icon="el-icon-view" plain size="small" type="primary" @click="chekView">鏌ョ湅浣跨敤鑼冨洿</el-button>
             <el-button icon="el-icon-download" plain size="small" type="primary" @click="downloadTemplateHandler">涓嬭浇瀵煎叆妯℃澘
@@ -737,8 +737,12 @@
         row,
         this.$refs.userCrud,
         this.lastIndex,
-        (newIndex) => { this.lastIndex = newIndex; },
-        () => { this.selectList = []; }
+        (newIndex) => {
+          this.lastIndex = newIndex;
+        },
+        () => {
+          this.selectList = [];
+        }
       );
     },
 
@@ -1213,38 +1217,44 @@
         linkTypeName: "",
         rangeValue: ""
       };
-      if (this.dialogTitle === 'add') {
-        this.form.range = this.form.rangeValue.replace(/\n/g, ';');
-        if (this.form.attributeSelectType === 'business') {
-          this.form.btmTypeId = this.form.referValue;
-        } else {
-          this.form.linkTypeName = this.form.referValue;
-        }
-        addAttribute(this.form).then(res => {
-          if (res.data.code === 200) {
-            this.$message.success(res.data.obj);
-            this.getTableList();
-            this.form = form;
-            this.addVisible = false;
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          if (this.dialogTitle === 'add') {
+            this.form.range = this.form.rangeValue.replace(/\n/g, ';');
+            if (this.form.attributeSelectType === 'business') {
+              this.form.btmTypeId = this.form.referValue;
+            } else {
+              this.form.linkTypeName = this.form.referValue;
+            }
+            addAttribute(this.form).then(res => {
+              if (res.data.code === 200) {
+                this.$message.success(res.data.obj);
+                this.getTableList();
+                this.form = form;
+                this.addVisible = false;
+              }
+            })
           }
-        })
-      }
-      if (this.dialogTitle === 'edit') {
-        this.form.range = this.form.rangeValue.replace(/\n/g, ';');
-        if (this.form.attributeSelectType === 'business') {
-          this.form.btmTypeId = this.form.referValue;
-        } else {
-          this.form.linkTypeName = this.form.referValue;
-        }
-        updateAttribute(this.form).then(res => {
-          if (res.data.code === 200) {
-            this.$message.success(res.data.obj);
-            this.getTableList();
-            this.form = form;
-            this.addVisible = false;
+          if (this.dialogTitle === 'edit') {
+            this.form.range = this.form.rangeValue.replace(/\n/g, ';');
+            if (this.form.attributeSelectType === 'business') {
+              this.form.btmTypeId = this.form.referValue;
+            } else {
+              this.form.linkTypeName = this.form.referValue;
+            }
+            updateAttribute(this.form).then(res => {
+              if (res.data.code === 200) {
+                this.$message.success(res.data.obj);
+                this.getTableList();
+                this.form = form;
+                this.addVisible = false;
+              }
+            })
           }
-        })
-      }
+        } else {
+          return false;
+        }
+      });
     },
 
     // 瀵煎叆

--
Gitblit v1.9.3