From 6930aeefda5db04e5cd49753d5b36108bd23ed11 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期三, 05 七月 2023 09:52:35 +0800
Subject: [PATCH] 代码提交

---
 Source/UBCS-WEB/src/page/login/userlogin.vue                                                               |    5 +++--
 Source/UBCS-WEB/src/views/system/user.vue                                                                  |    2 +-
 Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/controller/TenantController.java    |   11 -----------
 Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/TenantServiceImpl.java |   23 +++++++++++++++++++++--
 4 files changed, 25 insertions(+), 16 deletions(-)

diff --git a/Source/UBCS-WEB/src/page/login/userlogin.vue b/Source/UBCS-WEB/src/page/login/userlogin.vue
index f3b99c5..16d3b52 100644
--- a/Source/UBCS-WEB/src/page/login/userlogin.vue
+++ b/Source/UBCS-WEB/src/page/login/userlogin.vue
@@ -8,7 +8,7 @@
              status-icon
     >
       <el-form-item prop="selectInput">
-        <el-select v-model="loginForm.value" placeholder="璇烽�夋嫨缁勭粐" style="width: 326px" @change="selectchange">
+        <el-select v-model="loginForm.value" placeholder="璇烽�夋嫨绉熸埛" style="width: 326px" @change="selectchange">
           <i slot="prefix" class="el-icon-s-operation"/>
           <el-option
             v-for="(item,index) in loginForm.region"
@@ -126,7 +126,7 @@
       },
       value: {
         selectInput: [
-          {required: true, message: "璇烽�夋嫨缁勭粐", trigger: "blur"}
+          {required: true, message: "璇烽�夋嫨绉熸埛", trigger: "blur"}
         ],
         username: [
           {required: true, message: "璇疯緭鍏ョ敤鎴峰悕", trigger: "blur"}
@@ -155,6 +155,7 @@
     //鍦╩ounted鑾峰彇棣栭〉涓嬫媺鑿滃崟鏁版嵁
     this.$axios.get('/api/ubcs-system/tenant/tenant-map').then(res => {
       if (res.data.code == 200) {
+        console.log(res.data.data);
         this.loginForm.region = res.data.data
       }
     })
diff --git a/Source/UBCS-WEB/src/views/system/user.vue b/Source/UBCS-WEB/src/views/system/user.vue
index 2214ad6..9794084 100644
--- a/Source/UBCS-WEB/src/views/system/user.vue
+++ b/Source/UBCS-WEB/src/views/system/user.vue
@@ -5,7 +5,7 @@
         <el-scrollbar style="height: auto;border-bottom-right-radius:8px ">
           <basic-container>
             <div class="abox">
-              <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"/>
+              <avue-tree ref="tree" :data="treeData" :option="treeOption" @node-click="nodeClick"/>
             </div>
           </basic-container>
         </el-scrollbar>
diff --git a/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/controller/TenantController.java b/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/controller/TenantController.java
index 6e445e7..31572a7 100644
--- a/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/controller/TenantController.java
+++ b/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/controller/TenantController.java
@@ -70,12 +70,6 @@
 	private final ITenantPackageService tenantPackageService;
 
 	/**
-	 * 瓒呯绉熸埛id
-	 */
-	@Value("${user-info.tenant-id}")
-	private String tenantId;
-
-	/**
 	 * 璇︽儏
 	 */
 	@GetMapping("/detail")
@@ -234,11 +228,6 @@
 	@ApiOperation(value = "涓嬫媺绉熸埛淇℃伅")
 	public R<List> findAll() {
 		List<Map<String, Object>> mapList = tenantService.selectMaps();
-		if(Func.isNotEmpty(tenantId)){
-			Map<String, Object> map = new HashMap<>();
-			map.put("绠$悊缁�", tenantId);
-			mapList.add(map);
-		}
 		return R.data(mapList);
 	}
 
diff --git a/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/TenantServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/TenantServiceImpl.java
index b4b22d4..87c74aa 100644
--- a/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/TenantServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/TenantServiceImpl.java
@@ -58,6 +58,12 @@
 @RequiredArgsConstructor
 public class TenantServiceImpl extends BaseServiceImpl<TenantMapper, Tenant> implements ITenantService {
 
+	/**
+	 * nacos涓婇厤缃殑瓒呯绉熸埛id
+	 */
+	@Value("${user-info.tenant-id}")
+	private String propertiesTenantId;
+
 	private final TenantId tenantId;
 	private final IRoleService roleService;
 	private final IMenuService menuService;
@@ -198,12 +204,25 @@
 		return tenantTemp;
 	}
 
+	/**
+	 * 鑾峰彇绉熸埛淇℃伅锛岄敭鍊煎褰㈠紡锛岀櫥褰曠晫闈㈣皟鐢�
+	 * @return
+	 */
 	@Override
 	public List<Map<String,Object>> selectMaps(){
-		List<Map<String, Object>> maps = listMaps(new QueryWrapper<Tenant>().select("TENANT_ID", "TENANT_NAME"));
-		return maps;
+		List<Map<String, Object>> mapList = listMaps(new QueryWrapper<Tenant>().select("TENANT_ID", "TENANT_NAME"));
+		if(Func.isNotEmpty(this.propertiesTenantId)){
+			Map<String, Object> map = new HashMap<>();
+			map.put("\"TENANT_ID\":\"绠$悊缁刓"", "\""+this.propertiesTenantId+"\":\""+this.propertiesTenantId+"\"");
+				mapList.add(map);
+		}
+		return mapList;
 	}
 
+	/**
+	 * 涓夊憳鐩稿叧閰嶇疆
+	 * @return
+	 */
 	@Override
 	public boolean findIsOpen() {
 		return this.ssaEnable;

--
Gitblit v1.9.3