From 85c54d88f139096614aea4b06f2166cae27729d7 Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期五, 22 八月 2025 10:11:19 +0800
Subject: [PATCH] 用户管理

---
 src/views/mine/index.vue |   93 +++++++++++++++++++++++++++++++++++-----------
 1 files changed, 71 insertions(+), 22 deletions(-)

diff --git a/src/views/mine/index.vue b/src/views/mine/index.vue
index 89bb176..f6ffedb 100644
--- a/src/views/mine/index.vue
+++ b/src/views/mine/index.vue
@@ -11,6 +11,9 @@
 import { cusExtendInfo, changeCusExtend } from "@/api/mine";
 import { Edit } from "@element-plus/icons-vue";
 import { enterpriseTypes } from "@/api/register/index";
+import { initRouter, getTopMenu, handleAliveRoute } from "@/router/utils";
+const isManager = useUserStoreHook().isManager;
+
 const ruleFormRef = ref<FormInstance>();
 const isLoading = ref(false);
 const showDialog = ref(false);
@@ -76,7 +79,8 @@
     // 浼佷笟寮�鎴疯
     bankName: null, // string锛屽彲绌�
     // 浼佷笟閾惰璐﹀彿
-    bankAccount: null // string锛屽彲绌�
+    bankAccount: null, // string锛屽彲绌�
+    bankAccountIMG: null
   },
   enterpriseList: [],
   type: "",
@@ -326,6 +330,7 @@
     await useUserStoreHook().changeLogoInExRule({
       ruleCode: useUserStoreHook().nowRole.code
     });
+    initRouter();
     message("淇敼鎴愬姛锛�", {
       type: "success"
     });
@@ -335,6 +340,22 @@
     });
   }
 };
+
+const handlebankAccountIMG: UploadProps["onSuccess"] = (
+  response,
+  uploadFile
+) => {
+  if (response.code == "200") {
+    // state.ruleForm.businessLicense = URL.createObjectURL(uploadFile.raw!);
+    state.ruleForm.bankAccountIMG = response.result;
+  } else {
+    message(response.message, {
+      type: "error"
+    });
+  }
+  isLoading.value = false;
+};
+
 defineOptions({
   name: "mine"
 });
@@ -345,7 +366,7 @@
     <el-descriptions
       v-if="state.userInfo.enterpriseName"
       class="margin-top"
-      title=""
+      title="浼佷笟璧勬枡"
       :column="3"
       border
     >
@@ -401,7 +422,7 @@
         <template #label>
           <div class="cell-item">鑱旂郴鐢佃瘽</div>
         </template>
-        {{ userInfo.legalRepresentativePhone }}
+        {{ userInfo.enterprisePhone }}
       </el-descriptions-item>
       <el-descriptions-item>
         <template #label>
@@ -476,8 +497,16 @@
         </template>
         {{ userInfo.bankAccount }}
       </el-descriptions-item>
+      <el-descriptions-item>
+        <template #label>
+          <div class="cell-item">閾惰鏀舵浜岀淮鐮�</div>
+        </template>
+        <span style="margin-right: auto" @click="showImg('bankAccountIMG')">
+          <el-link type="primary" underline>鏌ョ湅浜岀淮鐮�</el-link>
+        </span>
+      </el-descriptions-item>
     </el-descriptions>
-    <div class="m-5">
+    <div v-if="isManager" class="m-5">
       <el-button type="primary" :icon="Edit" @click="() => (showDialog = true)"
         >淇敼璧勬枡</el-button
       >
@@ -553,8 +582,8 @@
                   <img
                     v-if="state.ruleForm.businessLicense"
                     :src="state.ruleForm.businessLicense"
-                    width="200px"
-                    height="150px"
+                    width="80px"
+                    height="50px"
                   />
                   <el-button v-else type="primary">涓婁紶</el-button>
                 </el-upload>
@@ -649,7 +678,43 @@
                 />
               </el-form-item>
             </el-col>
+            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+              <el-form-item label="寮�鎴疯" prop="bankName">
+                <el-input
+                  v-model="state.ruleForm.bankName"
+                  placeholder="璇疯緭鍏�"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16">
+              <el-form-item label="閾惰璐﹀彿" prop="bankAccount">
+                <el-input
+                  v-model="state.ruleForm.bankAccount"
+                  placeholder="璇疯緭鍏�"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
+              <el-form-item label="寮�鎴疯鏀舵浜岀淮鐮�" prop="bankAccountIMG">
+                <el-upload
+                  :action="`${baseUrlApi('/api/upFile/file')}`"
+                  :show-file-list="false"
+                  :on-success="handlebankAccountIMG"
+                  :before-upload="beforeAvatarUpload"
+                  :headers="state.headers"
+                >
+                  <img
+                    v-if="state.ruleForm.bankAccountIMG"
+                    :src="state.ruleForm.bankAccountIMG"
+                    width="85.6px"
+                    height="5.4px"
+                  />
+                  <el-button v-else type="primary">涓婁紶</el-button>
+                </el-upload>
+              </el-form-item>
+            </el-col>
           </el-row>
+
           <el-row>
             <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
               <el-form-item label="娉曞畾浠h〃浜�" prop="legalRepresentativeIdCard">
@@ -743,22 +808,6 @@
               <el-form-item label="鑱旂郴鐢佃瘽" prop="operatorPhone">
                 <el-input
                   v-model="state.ruleForm.operatorPhone"
-                  placeholder="璇疯緭鍏�"
-                />
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-              <el-form-item label="寮�鎴疯" prop="bankName">
-                <el-input
-                  v-model="state.ruleForm.bankName"
-                  placeholder="璇疯緭鍏�"
-                />
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16">
-              <el-form-item label="閾惰璐﹀彿" prop="bankAccount">
-                <el-input
-                  v-model="state.ruleForm.bankAccount"
                   placeholder="璇疯緭鍏�"
                 />
               </el-form-item>

--
Gitblit v1.9.1