From 8e6c58eec222c4bbea613e02703d9af22da72bee Mon Sep 17 00:00:00 2001
From: xiejun <xj@2023>
Date: 星期四, 15 六月 2023 18:17:49 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/UBCS-WEB/src/views/integration/systemInfo.vue |   56 +++++++++++++++++++++++++++++++++-----------------------
 1 files changed, 33 insertions(+), 23 deletions(-)

diff --git a/Source/UBCS-WEB/src/views/integration/systemInfo.vue b/Source/UBCS-WEB/src/views/integration/systemInfo.vue
index f1f2b78..2b7e248 100644
--- a/Source/UBCS-WEB/src/views/integration/systemInfo.vue
+++ b/Source/UBCS-WEB/src/views/integration/systemInfo.vue
@@ -5,8 +5,8 @@
             @refresh-change="handleRefresh" @size-change="handleSizePage" @current-change="handleCurrentPage"
             @selection-change="selectionChange" @row-click="handleRowClick">
             <template slot="menuLeft">
-                <el-button icon="el-icon-search" size="small" type="primary" @click="handleStatus">鏌� 璇�
-                </el-button>
+                <!-- <el-button icon="el-icon-search" size="small" type="primary" @click="handleStatus">鏌� 璇�
+                </el-button> -->
                 <el-button icon="el-icon-delete" size="small" type="danger" @click="handleDeleteByIds">鍒� 闄�
                 </el-button>
             </template>
@@ -68,7 +68,8 @@
                             required: true,
                             message: '绯荤粺缂栧彿涓嶈兘涓虹┖',
                             trigger: 'blur'
-                        }]
+                        }],
+                        // maxlength: 30,    //瀛楁暟闄愬埗
                     }, {
                         label: '绯荤粺鍚嶇О',
                         prop: 'name',
@@ -77,7 +78,8 @@
                             required: true,
                             message: '绯荤粺鍚嶇О涓嶈兘涓虹┖',
                             trigger: 'blur'
-                        }]
+                        }],
+                        // maxlength: 30,    //瀛楁暟闄愬埗
                     },
                     {
                         label: '绯荤粺鎻忚堪',
@@ -95,6 +97,9 @@
             console.log(this.search)
             const { pageSize, currentPage } = this.page
             let param = { size: pageSize, current: currentPage }
+            this.search = Object.keys(this.search)
+                .filter((key) => this.search[key] !== null && this.search[key] !== undefined && this.search[key] !== "")
+                .reduce((acc, key) => ({ ...acc, [key]: this.search[key] }), {});
             const response = await getSysInfoList({ ...param, ...this.search })
             if (response.status === 200) {
                 console.log(response)
@@ -106,31 +111,36 @@
         },
         // 鏂板
         async handleSave(row, done, loading) {
-            const response = await sysInfoAdd(row)
-            if (response.status === 200) {
+            try {
+                const response = await sysInfoAdd(row)
+                if (response.status === 200) {
+                    this.$message({
+                        type: 'success',
+                        message: '鏂板鏁版嵁鎴愬姛锛�'
+                    })
+                    done(row)
+                    // this.$refs.crud.refreshTable()
+                    // this.getDataList()
+                }
+            } catch {
                 loading()
-                this.$message({
-                    type: 'success',
-                    message: '鏂板鏁版嵁鎴愬姛锛�'
-                })
-                done()
-                this.$refs.crud.refreshTable()
-                this.getDataList()
             }
         },
         // 缂栬緫
         async handleEdit(row, index, done, loading) {
-            console.log(row)
-            const { oid, id, name, description } = row
-            const response = await sysInfoEdit({ oid, id, name, description })
-            if (response.status === 200) {
+            try {
+                const { oid, id, name, description } = row
+                const response = await sysInfoEdit({ oid, id, name, description })
+                if (response.status === 200) {
+                    loading()
+                    this.$message({
+                        type: 'success',
+                        message: '淇敼鏁版嵁鎴愬姛锛�'
+                    })
+                    done(row)
+                }
+            } catch {
                 loading()
-                this.$message({
-                    type: 'success',
-                    message: '淇敼鏁版嵁鎴愬姛锛�'
-                })
-                done()
-                this.getDataList()
             }
         },
         // 鍒犻櫎鍗曟潯

--
Gitblit v1.9.3