ludc
2023-07-05 6930aeefda5db04e5cd49753d5b36108bd23ed11
代码提交
已修改4个文件
41 ■■■■■ 文件已修改
Source/UBCS-WEB/src/page/login/userlogin.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/system/user.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/controller/TenantController.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/TenantServiceImpl.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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 @@
    //在mounted获取首页下拉菜单数据
    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
      }
    })
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>
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);
    }
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;