From d782e7ccd14d75f399b6283ca0974a35c90efb27 Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期二, 10 一月 2023 16:52:06 +0800
Subject: [PATCH] Merge branch 'dev1.0' of http://42.193.1.25:9521/r/sccg_ui into dev1.0

---
 src/views/systemSetting/platform/cockpitManage/updateUser/index.vue |   61 ++++++++++++++++--------------
 1 files changed, 33 insertions(+), 28 deletions(-)

diff --git a/src/views/systemSetting/platform/cockpitManage/updateUser/index.vue b/src/views/systemSetting/platform/cockpitManage/updateUser/index.vue
index a26873b..0ee4f0c 100644
--- a/src/views/systemSetting/platform/cockpitManage/updateUser/index.vue
+++ b/src/views/systemSetting/platform/cockpitManage/updateUser/index.vue
@@ -11,7 +11,7 @@
           label-position="right"
         >
           <!-- 閮ㄩ棬鍚嶇О -->
-          <span style="heght:18px;display:block;line-height: 14px;">
+          <span style="height:18px;display:block;line-height: 14px;">
             鎵ф硶浜哄憳缁撴瀯
           </span>
           <el-form-item class="optionItem" label="閮ㄩ棬鍚嶇О:" prop="name">
@@ -71,12 +71,10 @@
 </template>
 <script>
 import { deepClone } from "@/utils/helper";
-import { updateTeamInfo } from "@/api/system/portal/teamConstruction";
-import { SUCCESS_CODE } from "@/utils";
+import {addTeam, updateTeamInfo} from "@/api/system/portal/teamConstruction";
 
 export default {
   data() {
-
     return {
       updateData: null,
       rules: {
@@ -103,18 +101,25 @@
     submitUpdate() {
       this.$refs.user.validate((valid) => {
         if (valid) {
-          updateTeamInfo(this.updateData)
-            .then(({ code, message }) => {
-              if (code === SUCCESS_CODE) {
-                this.$emit('closeUpdateDialog');
-                this.$message({ type: 'success', message });
-              } else {
-                this.$message({ type: 'error', message });
-              }
-            })
-            .catch(err => {
-              this.$message({ type: 'error', message: err });
-            });
+          if (this.isUpdate) {
+            updateTeamInfo(this.updateData)
+                .then(() => {
+                  this.$emit('closeUpdateDialog');
+                  this.$message({ type: 'success', message: '鎿嶄綔鎴愬姛' });
+                })
+                .catch(err => {
+                  this.$message({ type: 'error', message: err });
+                });
+          } else {
+            addTeam(this.depart)
+                .then(() => {
+                  this.$message({ type: 'success', message: '鎿嶄綔鎴愬姛' });
+                  this.$emit('closeUpdateDialog');
+                })
+                .catch(err => {
+                  this.$message({ type: 'error', message: err });
+                });
+          }
         } else {
           this.$message({ type: 'warning', message: '璇锋鏌ュ繀濉」' });
         }
@@ -125,18 +130,18 @@
       this.$emit('closeUpdateDialog');
     }
   },
-  props: ['updateDepartmentData']
+  props: ['updateDepartmentData', 'isUpdate']
 };
 </script>
 <style lang="scss" scoped>
 .updateUser {
   border-radius: 1px;
-  background-color: #09152f;
+  // background-color: #09152f;
 
   main {
     text-align: left;
     padding: 0 55px;
-    background-color: #09152f;
+    // background-color: #09152f;
 
     .mainContent {
       display: flex;
@@ -177,14 +182,14 @@
   }
 }
 
-.updateUser::v-deep .el-form-item__label {
-  color: #4b9bb7;
-}
+// .updateUser::v-deep .el-form-item__label {
+//   color: #4b9bb7;
+// }
 
-.updateUser::v-deep .el-input__inner {
-  background-color: #09152f;
-  border: 1px solid #17324c;
-}
+// .updateUser::v-deep .el-input__inner {
+//   background-color: #09152f;
+//   border: 1px solid #17324c;
+// }
 
 .addPerson {
   display: flex;
@@ -225,7 +230,7 @@
     min-height: 240px;
     max-height: 260px;
     overflow: hidden;
-    background-color: #09152f;
+    // background-color: #09152f;
     position: relative;
     max-width: 220px;
 
@@ -259,7 +264,7 @@
       right: 20px;
       width: 20px;
       height: 180px;
-      background-color: #09152f;
+      // background-color: #09152f;
     }
 
     .item {

--
Gitblit v1.8.0