diff --git a/src/bk-user/bkuser/apis/web/basic/serializers.py b/src/bk-user/bkuser/apis/web/basic/serializers.py index bc6088d9c..d928d6e29 100644 --- a/src/bk-user/bkuser/apis/web/basic/serializers.py +++ b/src/bk-user/bkuser/apis/web/basic/serializers.py @@ -13,3 +13,4 @@ class CurrentUserRetrieveOutputSLZ(serializers.Serializer): username = serializers.CharField(help_text="用户名") + tenant_id = serializers.CharField(help_text="租户 ID") diff --git a/src/bk-user/bkuser/apis/web/basic/views.py b/src/bk-user/bkuser/apis/web/basic/views.py index b4540f978..cf089db04 100644 --- a/src/bk-user/bkuser/apis/web/basic/views.py +++ b/src/bk-user/bkuser/apis/web/basic/views.py @@ -26,6 +26,7 @@ def get(self, request, *args, **kwargs): current_user = request.user info = { "username": current_user.username, + "tenant_id": current_user.get_property("tenant_id"), } return Response(CurrentUserRetrieveOutputSLZ(instance=info).data) diff --git a/src/bk-user/bkuser/apis/web/organization/serializers.py b/src/bk-user/bkuser/apis/web/organization/serializers.py index 1c4090550..07b3d1ce9 100644 --- a/src/bk-user/bkuser/apis/web/organization/serializers.py +++ b/src/bk-user/bkuser/apis/web/organization/serializers.py @@ -41,3 +41,9 @@ def get_departments(self, instance: Tenant): if not departments: return [] return [item.model_dump(include={"id", "name", "has_children"}) for item in departments] + + +class TenantDepartmentChildrenListOutputSLZ(serializers.Serializer): + id = serializers.IntegerField(help_text="租户部门ID") + name = serializers.CharField(help_text="部门名称") + has_children = serializers.BooleanField(help_text="是否有子部门") diff --git a/src/bk-user/bkuser/apis/web/organization/urls.py b/src/bk-user/bkuser/apis/web/organization/urls.py index 2cc95bc9d..41d3449d7 100644 --- a/src/bk-user/bkuser/apis/web/organization/urls.py +++ b/src/bk-user/bkuser/apis/web/organization/urls.py @@ -16,4 +16,9 @@ # 租户 path("tenants/", views.TenantListApi.as_view(), name="organization.tenant.list"), path("tenants//", views.TenantRetrieveUpdateApi.as_view(), name="organization.tenant.retrieve_update"), + path( + "departments//children/", + views.TenantDepartmentChildrenListApi.as_view(), + name="organization.children.list", + ), ] diff --git a/src/bk-user/bkuser/apis/web/organization/views.py b/src/bk-user/bkuser/apis/web/organization/views.py index 96b3fbd5c..5b0dc67e4 100644 --- a/src/bk-user/bkuser/apis/web/organization/views.py +++ b/src/bk-user/bkuser/apis/web/organization/views.py @@ -14,7 +14,7 @@ from rest_framework import generics, status from rest_framework.response import Response -from bkuser.apis.web.organization.serializers import TenantListOutputSLZ +from bkuser.apis.web.organization.serializers import TenantDepartmentChildrenListOutputSLZ, TenantListOutputSLZ from bkuser.apis.web.tenant.serializers import TenantRetrieveOutputSLZ, TenantUpdateInputSLZ from bkuser.apps.tenant.models import Tenant from bkuser.biz.tenant import ( @@ -92,3 +92,19 @@ def put(self, request, *args, **kwargs): TenantHandler.update_with_managers(instance.id, should_updated_info, data["manager_ids"]) return Response() + + +class TenantDepartmentChildrenListApi(generics.ListAPIView): + pagination_class = None + serializer_class = TenantDepartmentChildrenListOutputSLZ + + @swagger_auto_schema( + operation_description="租户部门的二级子部门列表", + responses={status.HTTP_200_OK: TenantDepartmentChildrenListOutputSLZ(many=True)}, + ) + def get(self, request, *args, **kwargs): + tenant_department_id = self.kwargs["id"] + # 拉取子部门信息列表 + tenant_department_children = TenantDepartmentHandler.get_tenant_department_children_by_id(tenant_department_id) + data = [item.model_dump(include={"id", "name", "has_children"}) for item in tenant_department_children] + return Response(self.get_serializer(data, many=True).data) diff --git a/src/bk-user/bkuser/apis/web/tenant/serializers.py b/src/bk-user/bkuser/apis/web/tenant/serializers.py index 6746c5900..e6938ea41 100644 --- a/src/bk-user/bkuser/apis/web/tenant/serializers.py +++ b/src/bk-user/bkuser/apis/web/tenant/serializers.py @@ -54,13 +54,13 @@ class TenantSearchInputSLZ(serializers.Serializer): name = serializers.CharField(required=False, help_text="租户名", allow_blank=True) -class TenantSearchManagerOutputSchema(serializers.Serializer): +class TenantSearchManagerOutputSLZ(serializers.Serializer): id = serializers.CharField(help_text="用户 ID") username = serializers.CharField(help_text="用户名") full_name = serializers.CharField(help_text="姓名") -class TenantSearchDataSourceOutputSchema(serializers.Serializer): +class TenantSearchDataSourceOutputSLZ(serializers.Serializer): id = serializers.CharField(help_text="数据源 ID") name = serializers.CharField(help_text="数据源名称") @@ -79,7 +79,7 @@ def get_logo(self, obj: Tenant) -> str: def get_created_at(self, obj: Tenant) -> str: return obj.created_at_display - @swagger_serializer_method(serializer_or_field=TenantSearchManagerOutputSchema(many=True)) + @swagger_serializer_method(serializer_or_field=TenantSearchManagerOutputSLZ(many=True)) def get_managers(self, obj: Tenant) -> List[Dict]: tenant_manager_map: Dict[str, List[TenantUserWithInheritedInfo]] = self.context["tenant_manager_map"] managers = tenant_manager_map.get(obj.id) or [] @@ -91,7 +91,7 @@ def get_managers(self, obj: Tenant) -> List[Dict]: for i in managers ] - @swagger_serializer_method(serializer_or_field=TenantSearchDataSourceOutputSchema(many=True)) + @swagger_serializer_method(serializer_or_field=TenantSearchDataSourceOutputSLZ(many=True)) def get_data_sources(self, obj: Tenant) -> List[Dict]: data_source_map: Dict[str, List[DataSourceSimpleInfo]] = self.context["data_source_map"] data_sources = data_source_map.get(obj.id) or [] @@ -105,7 +105,7 @@ class TenantUpdateInputSLZ(serializers.Serializer): feature_flags = TenantFeatureFlagSLZ(help_text="租户特性集") -class TenantRetrieveManagerOutputSchema(serializers.Serializer): +class TenantRetrieveManagerOutputSLZ(serializers.Serializer): id = serializers.CharField(help_text="用户 ID") username = serializers.CharField(help_text="租户用户名") full_name = serializers.CharField(help_text="用户姓名") @@ -123,7 +123,7 @@ class TenantRetrieveOutputSLZ(serializers.Serializer): feature_flags = TenantFeatureFlagSLZ(help_text="租户特性集") managers = serializers.SerializerMethodField() - @swagger_serializer_method(serializer_or_field=TenantRetrieveManagerOutputSchema(many=True)) + @swagger_serializer_method(serializer_or_field=TenantRetrieveManagerOutputSLZ(many=True)) def get_managers(self, obj: Tenant) -> List[Dict]: # 根据当前登录的租户用户,获取租户ID # NOTE 因协同数据源而展示的租户,不返回管理员 diff --git a/src/bk-user/bkuser/auth/backends.py b/src/bk-user/bkuser/auth/backends.py index c2804dd09..50702abeb 100644 --- a/src/bk-user/bkuser/auth/backends.py +++ b/src/bk-user/bkuser/auth/backends.py @@ -11,6 +11,7 @@ import logging import traceback +from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.backends import BaseBackend from django.db import IntegrityError @@ -43,6 +44,10 @@ def authenticate(self, request=None, bk_token=None): user.set_property(key="language", value=user_info.get("language", "")) user.set_property(key="time_zone", value=user_info.get("time_zone", "")) + # FIXME: 新版登录后删除该MOCK逻辑 + tenant_id = settings.MOCK_USER_TENANTS.get(username) or settings.MOCK_USER_DEFAULT_TENANT + user.set_property(key="tenant_id", value=tenant_id) + return user except IntegrityError: diff --git a/src/bk-user/bkuser/biz/tenant.py b/src/bk-user/bkuser/biz/tenant.py index 2b0f4eafd..7fd57b589 100644 --- a/src/bk-user/bkuser/biz/tenant.py +++ b/src/bk-user/bkuser/biz/tenant.py @@ -133,7 +133,7 @@ def get_tenant_manager_map(tenant_ids: Optional[List[str]] = None) -> Dict[str, @staticmethod def retrieve_tenant_managers(tenant_id: str) -> List[TenantUserWithInheritedInfo]: """ - 查询单个租户的 + 查询单个租户的租户管理员 """ tenant_managers = TenantManager.objects.filter(tenant_id=tenant_id) # 查询管理员对应的信息 @@ -273,3 +273,14 @@ def get_tenant_root_departments_by_id( ) tenant_root_department_map[tenant_id] = tenant_root_department return tenant_root_department_map + + @staticmethod + def get_tenant_department_children_by_id(tenant_department_id: int) -> List[TenantDepartmentBaseInfo]: + tenant_department = TenantDepartment.objects.get(id=tenant_department_id) + # 获取二级组织 + children = DataSourceDepartmentRelation.objects.get( + department=tenant_department.data_source_department + ).get_children() + return TenantDepartmentHandler.convert_data_source_department_to_tenant_department( + tenant_department.tenant_id, children.values_list("department_id", flat=True) + ) diff --git a/src/bk-user/bkuser/settings.py b/src/bk-user/bkuser/settings.py index 4edd75b37..ff843fe0c 100644 --- a/src/bk-user/bkuser/settings.py +++ b/src/bk-user/bkuser/settings.py @@ -468,3 +468,6 @@ DEFAULT_DATA_SOURCE_USER_LOGO = "" # 默认手机国际区号 DEFAULT_PHONE_COUNTRY_CODE = env.str("DEFAULT_PHONE_COUNTRY_CODE", default="86") +# FIXME: 待新版登录完成后删除Mock用户租户数据,格式:key1=value1;key2=value2 +MOCK_USER_TENANTS = env.dict("MOCK_USER_TENANTS", default={}) +MOCK_USER_DEFAULT_TENANT = env.str("MOCK_USER_DEFAULT_TENANT", default="") diff --git a/src/pages/.bk.development.env b/src/pages/.bk.development.env index 80e7c420f..b97e97cec 100644 --- a/src/pages/.bk.development.env +++ b/src/pages/.bk.development.env @@ -1,25 +1,4 @@ -# .bk.development.env 生产模式生效 - -# 网站前缀 -BK_SITE_URL = '' - -# 静态资源路径 -BK_STATIC_URL = '' - -# 当前应用的环境,预发布环境为 stag,正式环境为 prod -BK_PAAS_ENVIRONMENT = '' - -# EngineApp名称,拼接规则:bkapp-{appcode}-{BKPAAS_ENVIRONMENT} -BK_PAAS_ENGINE_APP_NAME = '' - -# 内部版对应ieod,外部版对应tencent,混合云版对应clouds -BK_PAAS_ENGINE_REGION = '' - -# APP ID -BK_PAAS_APP_ID = '' - -# APP SECRET -BK_PAAS_APP_SECRET = '' +# .bk.production.env 开发模式生效,开发时,复制并保存为.bk.local.env,然后把具体值填上 # 登录地址 BK_LOGIN_URL = '' @@ -29,3 +8,10 @@ BK_APP_HOST = '' # 开发 port BK_APP_PORT = 5002 + +# 静态资源路径 +BK_STATIC_URL = '' + +BK_AJAX_BASE_URL = '' + +BK_CSRF_COOKIE_NAME = '' diff --git a/src/pages/.bk.env b/src/pages/.bk.env deleted file mode 100644 index 4b0d5162d..000000000 --- a/src/pages/.bk.env +++ /dev/null @@ -1,7 +0,0 @@ -# .env 所有环境生效的配置 - -# 接口前缀 -BK_AJAX_URL_PREFIX = '/' - -# 获取用户信息接口 -BK_USER_INFO_URL = '/user' diff --git a/src/pages/.bk.production.env b/src/pages/.bk.production.env index 79eee9a65..8bb66147c 100644 --- a/src/pages/.bk.production.env +++ b/src/pages/.bk.production.env @@ -1,25 +1,11 @@ # .bk.production.env 生产模式生效 -# 网站前缀 -BK_SITE_URL = '{{ SITE_URL }}' +# 登录地址 +BK_LOGIN_URL = '{{ BK_LOGIN_URL }}' # 静态资源路径 BK_STATIC_URL = '{{ BK_STATIC_URL }}' -# 当前应用的环境,预发布环境为 stag,正式环境为 prod -BK_PAAS_ENVIRONMENT = '{{ BKPAAS_ENVIRONMENT }}' - -# EngineApp名称,拼接规则:bkapp-{appcode}-{BKPAAS_ENVIRONMENT} -BK_PAAS_ENGINE_APP_NAME = '{{ BKPAAS_ENGINE_APP_NAME }}' - -# 内部版对应ieod,外部版对应tencent,混合云版对应clouds -BK_PAAS_ENGINE_REGION = '{{ BKPAAS_ENGINE_REGION }}' +BK_AJAX_BASE_URL = '{{ AJAX_BASE_URL }}' -# APP ID -BK_PAAS_APP_ID = '{{ BKPAAS_APP_ID }}' - -# APP SECRET -BK_PAAS_APP_SECRET = '{{ BKPAAS_APP_SECRET }}' - -# 登录地址 -BK_LOGIN_URL = '{{ BK_LOGIN_URL }}' +BK_CSRF_COOKIE_NAME = '{{ CSRF_COOKIE_NAME }}' diff --git a/src/pages/.eslintrc.js b/src/pages/.eslintrc.js index 88ad17aa6..1f86bd85d 100644 --- a/src/pages/.eslintrc.js +++ b/src/pages/.eslintrc.js @@ -1,9 +1,22 @@ module.exports = { root: true, extends: ['@blueking/eslint-config-bk/tsvue3'], + plugins: [ + 'simple-import-sort', + ], + rules: { + 'simple-import-sort/imports': ['error', { + groups: [ + ['^[a-zA-Z]'], + ['^@\\w'], + ['^\\.\\.'], + ['^\\.'], + ], + }], + 'no-param-reassign': 'off', + }, parserOptions: { - project: [ - './tsconfig.json', - ], + project: 'tsconfig.eslint.json', + tsconfigRootDir: __dirname, }, }; diff --git a/src/pages/.gitignore b/src/pages/.gitignore index 18b522684..779858498 100644 --- a/src/pages/.gitignore +++ b/src/pages/.gitignore @@ -74,3 +74,5 @@ test/unit/coverage *.njsproj *.sln dist/ + +.bk.local.env diff --git a/src/pages/.stylelintignore b/src/pages/.stylelintignore index c2658d7d1..99c3ab4fb 100644 --- a/src/pages/.stylelintignore +++ b/src/pages/.stylelintignore @@ -1 +1,3 @@ node_modules/ +dist +static/ \ No newline at end of file diff --git a/src/pages/.stylelintrc.js b/src/pages/.stylelintrc.js deleted file mode 100644 index 2bea3aba5..000000000 --- a/src/pages/.stylelintrc.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - defaultSeverity: 'error', - extends: ['@blueking/stylelint-config-bk'], -} diff --git a/src/pages/bk.config.js b/src/pages/bk.config.js index 0847129cd..85fcf5a55 100644 --- a/src/pages/bk.config.js +++ b/src/pages/bk.config.js @@ -15,10 +15,12 @@ module.exports = { return { devServer: { setupMiddlewares: mockServer, + https: true, proxy: { '/api': { - target: '', + target: process.env.AJAX_BASE_URL, changeOrigin: true, + secure: false, }, }, }, diff --git a/src/pages/index.html b/src/pages/index.html index fdfe227b9..338b7684f 100644 --- a/src/pages/index.html +++ b/src/pages/index.html @@ -1,8 +1,8 @@ - - + + {{ TITLE }} @@ -10,12 +10,12 @@
diff --git a/src/pages/package.json b/src/pages/package.json index c997adc94..39061d0c6 100644 --- a/src/pages/package.json +++ b/src/pages/package.json @@ -1,12 +1,14 @@ { - "name": "bkuicli-vue3", + "name": "bk-user", "version": "1.0.0", "description": "", "scripts": { "dev": "bk-cli-service-webpack dev", "build": "bk-cli-service-webpack build", "server": "node ./paas-server/index.js", - "lint:style": "stylelint **/*.{html,vue,css,sass,scss,less} --fix" + "lint": "eslint --ext .js,.vue,.ts ./src", + "lint:fix": "eslint --fix --ext .js,.vue,.ts ./src", + "lint:style": "stylelint \"./**/*.{css,less,vue,html}\" --fix" }, "keywords": [ "bk-ci", @@ -39,19 +41,28 @@ }, "devDependencies": { "@blueking/babel-preset-bk": "^2.1.0-beta7", - "@blueking/cli-service-webpack": "0.0.0-beta.73", + "@blueking/cli-service-webpack": "0.0.0-beta.87", "@blueking/eslint-config-bk": "2.1.0-beta.12", "@blueking/stylelint-config-bk": "^2.1.0-beta.9", + "@types/node": "^20.5.1", "enhanced-resolve": "^5.10.0", + "eslint-plugin-import": "^2.28.1", + "eslint-plugin-simple-import-sort": "^10.0.0", "less-loader": "7.3.0", "postcss": "~8.4.16", + "postcss-html": "^1.5.0", "postcss-import": "^15.0.0", + "postcss-less": "^6.0.0", "postcss-mixins": "^9.0.4", "postcss-nested": "^6.0.0", "postcss-nested-ancestors": "^3.0.0", "postcss-preset-env": "^7.8.2", "postcss-simple-vars": "^7.0.0", "postcss-url": "^10.1.3", + "stylelint": "^15.10.3", + "stylelint-config-standard": "^34.0.0", + "stylelint-less": "^1.0.8", + "stylelint-order": "^6.0.3", "typescript": "^4.8.4" }, "engines": { diff --git a/src/pages/src/app.vue b/src/pages/src/app.vue index 7254e5c02..ac3f645ae 100644 --- a/src/pages/src/app.vue +++ b/src/pages/src/app.vue @@ -1,19 +1,21 @@ diff --git a/src/pages/src/components/user-info.vue b/src/pages/src/components/user-info.vue index 775935f9d..18471e9dc 100644 --- a/src/pages/src/components/user-info.vue +++ b/src/pages/src/components/user-info.vue @@ -1,8 +1,9 @@ @@ -152,14 +155,17 @@ const toLink = (item: any) => { .main-navigation { :deep(.bk-navigation-header) { background-color: #0e1525; + .icon-user-logo-i { - color: #458df4; font-size: 28px; + color: #458df4; } + .title-desc { color: #eaebf0; } } + :deep(.container-content) { padding: 0 !important; } @@ -170,8 +176,8 @@ const toLink = (item: any) => { } .main-navigation-left { - font-size: 14px; margin-left: 20px; + font-size: 14px; line-height: 52px; } @@ -191,40 +197,50 @@ const toLink = (item: any) => { } .main-navigation-right { + margin: 0 10px; color: #96a2b9; - margin: 0px 10px; + .bk-dropdown { padding: 0 10px; + .help-info { padding: 5px; border-radius: 50%; } + .active { background: #252f43; + .bk-sq-icon, .help-info-name { color: #3a84ff; } } - .help-info-icon { - vertical-align: middle; - } - &:hover { + + .active-username { color: #3a84ff; cursor: pointer; + .help-info-icon { display: inline-block; - transition: all 0.2s; transform: rotate(180deg); + transition: all 0.2s; } } + + .help-info-icon { + vertical-align: middle; + } + .help-info-name { padding-right: 4px; font-size: 14px; + span { font-size: 16px; vertical-align: middle; } } + .bk-sq-icon { font-size: 16px; } diff --git a/src/pages/src/views/data-source/LocalCompany.vue b/src/pages/src/views/data-source/LocalCompany.vue index d557ce262..27dab5a90 100644 --- a/src/pages/src/views/data-source/LocalCompany.vue +++ b/src/pages/src/views/data-source/LocalCompany.vue @@ -17,14 +17,15 @@ + + diff --git a/src/pages/src/views/data-source/local-details/PswInfo.vue b/src/pages/src/views/data-source/local-details/PswInfo.vue index dc6ac2612..ba8653f20 100644 --- a/src/pages/src/views/data-source/local-details/PswInfo.vue +++ b/src/pages/src/views/data-source/local-details/PswInfo.vue @@ -1,9 +1,139 @@ - + + + diff --git a/src/pages/src/views/data-source/local-details/UserInfo.vue b/src/pages/src/views/data-source/local-details/UserInfo.vue index 572deecf1..c476eb999 100644 --- a/src/pages/src/views/data-source/local-details/UserInfo.vue +++ b/src/pages/src/views/data-source/local-details/UserInfo.vue @@ -2,18 +2,14 @@ diff --git a/src/pages/src/views/data-source/local-details/ViewUser.vue b/src/pages/src/views/data-source/local-details/ViewUser.vue new file mode 100644 index 000000000..5f0ed1afe --- /dev/null +++ b/src/pages/src/views/data-source/local-details/ViewUser.vue @@ -0,0 +1,178 @@ + + + + + diff --git a/src/pages/src/views/data-source/local-details/index.vue b/src/pages/src/views/data-source/local-details/index.vue index 738fc35dd..5121922d9 100644 --- a/src/pages/src/views/data-source/local-details/index.vue +++ b/src/pages/src/views/data-source/local-details/index.vue @@ -6,7 +6,7 @@ - {{ typeText.name }} + {{ typeText.text }} @@ -29,30 +29,28 @@ diff --git a/src/pages/src/views/data-source/new-data/NewLocalData.vue b/src/pages/src/views/data-source/new-data/NewLocalData.vue index 1318ff263..09764477e 100644 --- a/src/pages/src/views/data-source/new-data/NewLocalData.vue +++ b/src/pages/src/views/data-source/new-data/NewLocalData.vue @@ -1,5 +1,5 @@ - + diff --git a/src/pages/src/views/organization/details/DetailsInfo.vue b/src/pages/src/views/organization/details/DetailsInfo.vue index 940a48f4c..ce1521be6 100644 --- a/src/pages/src/views/organization/details/DetailsInfo.vue +++ b/src/pages/src/views/organization/details/DetailsInfo.vue @@ -1,100 +1,106 @@ diff --git a/src/pages/src/views/organization/details/EditDetailsInfo.vue b/src/pages/src/views/organization/details/EditDetailsInfo.vue new file mode 100644 index 000000000..a3bc7d70e --- /dev/null +++ b/src/pages/src/views/organization/details/EditDetailsInfo.vue @@ -0,0 +1,341 @@ + + + + + diff --git a/src/pages/src/views/organization/details/EditUser.vue b/src/pages/src/views/organization/details/EditUser.vue index d657b0ad2..550742e5c 100644 --- a/src/pages/src/views/organization/details/EditUser.vue +++ b/src/pages/src/views/organization/details/EditUser.vue @@ -1,145 +1,155 @@ diff --git a/src/pages/src/views/organization/details/UserInfo.vue b/src/pages/src/views/organization/details/UserInfo.vue index 74bb7e880..909deaaac 100644 --- a/src/pages/src/views/organization/details/UserInfo.vue +++ b/src/pages/src/views/organization/details/UserInfo.vue @@ -23,32 +23,40 @@ - - + + diff --git a/src/pages/src/views/organization/details/ViewUser.vue b/src/pages/src/views/organization/details/ViewUser.vue new file mode 100644 index 000000000..8856bafe3 --- /dev/null +++ b/src/pages/src/views/organization/details/ViewUser.vue @@ -0,0 +1,192 @@ + + + + + diff --git a/src/pages/src/views/organization/index.vue b/src/pages/src/views/organization/index.vue index 21a93b2e8..376819262 100644 --- a/src/pages/src/views/organization/index.vue +++ b/src/pages/src/views/organization/index.vue @@ -3,7 +3,7 @@ - + + diff --git a/src/pages/src/views/setting/LoginSetting.vue b/src/pages/src/views/setting/LoginSetting.vue index 9a6a41e83..6c2e40f37 100644 --- a/src/pages/src/views/setting/LoginSetting.vue +++ b/src/pages/src/views/setting/LoginSetting.vue @@ -70,62 +70,69 @@ diff --git a/src/pages/src/views/tenantry/group-details/MemberSelector.vue b/src/pages/src/views/tenant/group-details/MemberSelector.vue similarity index 84% rename from src/pages/src/views/tenantry/group-details/MemberSelector.vue rename to src/pages/src/views/tenant/group-details/MemberSelector.vue index 143b2d593..3e13296f2 100644 --- a/src/pages/src/views/tenantry/group-details/MemberSelector.vue +++ b/src/pages/src/views/tenant/group-details/MemberSelector.vue @@ -33,7 +33,7 @@ diff --git a/src/pages/src/views/tenantry/group-details/ViewDetails.vue b/src/pages/src/views/tenant/group-details/ViewDetails.vue similarity index 96% rename from src/pages/src/views/tenantry/group-details/ViewDetails.vue rename to src/pages/src/views/tenant/group-details/ViewDetails.vue index 00838c712..a0af98518 100644 --- a/src/pages/src/views/tenantry/group-details/ViewDetails.vue +++ b/src/pages/src/views/tenant/group-details/ViewDetails.vue @@ -13,7 +13,7 @@ - +
  • 管理员
    @@ -78,41 +78,49 @@ const basicData = reactive([ diff --git a/src/pages/src/views/tenantry/index.vue b/src/pages/src/views/tenant/index.vue similarity index 77% rename from src/pages/src/views/tenantry/index.vue rename to src/pages/src/views/tenant/index.vue index 041642e1a..ae89800ce 100644 --- a/src/pages/src/views/tenantry/index.vue +++ b/src/pages/src/views/tenant/index.vue @@ -12,7 +12,7 @@ v-for="item in menuData" :key="item.key"> {{ item.name }} @@ -32,18 +32,20 @@ diff --git a/src/pages/static/bk_icon_font/demo.html b/src/pages/static/bk_icon_font/demo.html index 90b488be5..f452cf82d 100644 --- a/src/pages/static/bk_icon_font/demo.html +++ b/src/pages/static/bk_icon_font/demo.html @@ -117,6 +117,10 @@

      +
    • + +

      app-store-fill

      +
    • info-i

      @@ -257,6 +261,34 @@

      wechat

    • +
    • + +

      yonghu

      +
    • +
    • + +

      qiyeweixin

      +
    • +
    • + +

      qingximoban

      +
    • +
    • + +

      rizhi

      +
    • +
    • + +

      zhibiaochajian

      +
    • +
    • + +

      shujuku

      +
    • +
    • + +

      ladp

      +

    为什么使用

      @@ -274,6 +306,12 @@

      如何使用

      +
    • + + + +

      app-store-fill

      +
    • @@ -484,6 +522,48 @@

      如何使用

      wechat

    • +
    • + + + +

      yonghu

      +
    • +
    • + + + +

      qiyeweixin

      +
    • +
    • + + + +

      qingximoban

      +
    • +
    • + + + +

      rizhi

      +
    • +
    • + + + +

      zhibiaochajian

      +
    • +
    • + + + +

      shujuku

      +
    • +
    • + + + +

      ladp

      +

    为什么使用

      diff --git a/src/pages/static/bk_icon_font/fonts/iconcool.eot b/src/pages/static/bk_icon_font/fonts/iconcool.eot index 48ff0e9e8..99410fe6e 100644 Binary files a/src/pages/static/bk_icon_font/fonts/iconcool.eot and b/src/pages/static/bk_icon_font/fonts/iconcool.eot differ diff --git a/src/pages/static/bk_icon_font/fonts/iconcool.svg b/src/pages/static/bk_icon_font/fonts/iconcool.svg index d0aa00704..5db1481d6 100644 --- a/src/pages/static/bk_icon_font/fonts/iconcool.svg +++ b/src/pages/static/bk_icon_font/fonts/iconcool.svg @@ -29,6 +29,9 @@ + + + @@ -134,6 +137,27 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/pages/static/bk_icon_font/fonts/iconcool.ttf b/src/pages/static/bk_icon_font/fonts/iconcool.ttf index e8b451620..29f91fa40 100644 Binary files a/src/pages/static/bk_icon_font/fonts/iconcool.ttf and b/src/pages/static/bk_icon_font/fonts/iconcool.ttf differ diff --git a/src/pages/static/bk_icon_font/fonts/iconcool.woff b/src/pages/static/bk_icon_font/fonts/iconcool.woff index 151694e7a..66b9495d9 100644 Binary files a/src/pages/static/bk_icon_font/fonts/iconcool.woff and b/src/pages/static/bk_icon_font/fonts/iconcool.woff differ diff --git a/src/pages/static/bk_icon_font/iconcool.js b/src/pages/static/bk_icon_font/iconcool.js index 25eb90b87..15c748000 100644 --- a/src/pages/static/bk_icon_font/iconcool.js +++ b/src/pages/static/bk_icon_font/iconcool.js @@ -1,5 +1,5 @@ !(function () { - var svgCode = '' + var svgCode = '' if (document.body) { document.body.insertAdjacentHTML('afterbegin', svgCode) } else { diff --git a/src/pages/static/bk_icon_font/iconcool.json b/src/pages/static/bk_icon_font/iconcool.json index 4288e878a..f281fe7f6 100644 --- a/src/pages/static/bk_icon_font/iconcool.json +++ b/src/pages/static/bk_icon_font/iconcool.json @@ -1 +1 @@ -{"iconName":"user","icons":[{"name":"info-i","svgCode":"\n\n\n\n\n\t\n\t\n\t\n\n\n","codepoint":"\\e105"},{"name":"dobble-arrow-i","svgCode":"\n\n\n\n\n\n\n","codepoint":"\\e108"},{"name":"user-logo-i","svgCode":"","codepoint":"\\e102"},{"name":"root-node-i","svgCode":"","codepoint":"\\e103"},{"name":"duihao-i","svgCode":"","codepoint":"\\e104"},{"name":"unfilled-i","svgCode":"","codepoint":"\\e106"},{"name":"todo-i","svgCode":"","codepoint":"\\e107"},{"name":"loading-i","svgCode":"","codepoint":"\\e109"},{"name":"add-hollow","svgCode":"","codepoint":"\\e10a"},{"name":"close-fill","svgCode":"","codepoint":"\\e10b"},{"name":"organization-fill","svgCode":"","codepoint":"\\e10d"},{"name":"personal-user","svgCode":"","codepoint":"\\e10c"},{"name":"outline-list","svgCode":"","codepoint":"\\e10e"},{"name":"duihao-2","svgCode":"","codepoint":"\\e10f"},{"name":"file-close","svgCode":"","codepoint":"\\e110"},{"name":"info-fill","svgCode":"","codepoint":"\\e111"},{"name":"user-directory","svgCode":"","codepoint":"\\e113"},{"name":"homepage","svgCode":"","codepoint":"\\e114"},{"name":"arrow-left","svgCode":"","codepoint":"\\e117"},{"name":"arrow-right","svgCode":"","codepoint":"\\e116"},{"name":"minus-fill","svgCode":"","codepoint":"\\e119"},{"name":"plus-fill","svgCode":"","codepoint":"\\e118"},{"name":"warning","svgCode":"","codepoint":"\\e115"},{"name":"abnormal","svgCode":"","codepoint":"\\e11b"},{"name":"more","svgCode":"","codepoint":"\\e11c"},{"name":"unknown","svgCode":"","codepoint":"\\e11a"},{"name":"normal","svgCode":"","codepoint":"\\e11d"},{"name":"drag","svgCode":"","codepoint":"\\e11e"},{"name":"lishijilu","svgCode":"","codepoint":"\\e11f"},{"name":"add-2","svgCode":"","codepoint":"\\e120"},{"name":"expand-line","svgCode":"","codepoint":"\\e121"},{"name":"block-shape","svgCode":"","codepoint":"\\e123"},{"name":"win","svgCode":"","codepoint":"\\e122"},{"name":"qw","svgCode":"","codepoint":"\\e124"},{"name":"wechat","svgCode":"","codepoint":"\\e125"}]} \ No newline at end of file +{"iconName":"user","icons":[{"name":"app-store-fill","svgCode":"","codepoint":"\\e126"},{"name":"info-i","svgCode":"\n\n\n\n\n\t\n\t\n\t\n\n\n","codepoint":"\\e105"},{"name":"dobble-arrow-i","svgCode":"\n\n\n\n\n\n\n","codepoint":"\\e108"},{"name":"user-logo-i","svgCode":"","codepoint":"\\e102"},{"name":"root-node-i","svgCode":"","codepoint":"\\e103"},{"name":"duihao-i","svgCode":"","codepoint":"\\e104"},{"name":"unfilled-i","svgCode":"","codepoint":"\\e106"},{"name":"todo-i","svgCode":"","codepoint":"\\e107"},{"name":"loading-i","svgCode":"","codepoint":"\\e109"},{"name":"add-hollow","svgCode":"","codepoint":"\\e10a"},{"name":"close-fill","svgCode":"","codepoint":"\\e10b"},{"name":"organization-fill","svgCode":"","codepoint":"\\e10d"},{"name":"personal-user","svgCode":"","codepoint":"\\e10c"},{"name":"outline-list","svgCode":"","codepoint":"\\e10e"},{"name":"duihao-2","svgCode":"","codepoint":"\\e10f"},{"name":"file-close","svgCode":"","codepoint":"\\e110"},{"name":"info-fill","svgCode":"","codepoint":"\\e111"},{"name":"user-directory","svgCode":"","codepoint":"\\e113"},{"name":"homepage","svgCode":"","codepoint":"\\e114"},{"name":"arrow-left","svgCode":"","codepoint":"\\e117"},{"name":"arrow-right","svgCode":"","codepoint":"\\e116"},{"name":"minus-fill","svgCode":"","codepoint":"\\e119"},{"name":"plus-fill","svgCode":"","codepoint":"\\e118"},{"name":"warning","svgCode":"","codepoint":"\\e115"},{"name":"abnormal","svgCode":"","codepoint":"\\e11b"},{"name":"more","svgCode":"","codepoint":"\\e11c"},{"name":"unknown","svgCode":"","codepoint":"\\e11a"},{"name":"normal","svgCode":"","codepoint":"\\e11d"},{"name":"drag","svgCode":"","codepoint":"\\e11e"},{"name":"lishijilu","svgCode":"","codepoint":"\\e11f"},{"name":"add-2","svgCode":"","codepoint":"\\e120"},{"name":"expand-line","svgCode":"","codepoint":"\\e121"},{"name":"block-shape","svgCode":"","codepoint":"\\e123"},{"name":"win","svgCode":"","codepoint":"\\e122"},{"name":"qw","svgCode":"","codepoint":"\\e124"},{"name":"wechat","svgCode":"","codepoint":"\\e125"},{"name":"yonghu","svgCode":"","codepoint":"\\e128"},{"name":"qiyeweixin","svgCode":"","codepoint":"\\e129"},{"name":"qingximoban","svgCode":"","codepoint":"\\e12a"},{"name":"rizhi","svgCode":"","codepoint":"\\e12b"},{"name":"zhibiaochajian","svgCode":"","codepoint":"\\e12f"},{"name":"shujuku","svgCode":"","codepoint":"\\e12e"},{"name":"ladp","svgCode":"","codepoint":"\\e12d"}]} \ No newline at end of file diff --git a/src/pages/static/bk_icon_font/style.css b/src/pages/static/bk_icon_font/style.css index 9f0f4c8f1..d2eba08ce 100644 --- a/src/pages/static/bk_icon_font/style.css +++ b/src/pages/static/bk_icon_font/style.css @@ -23,6 +23,9 @@ url("fonts/iconcool.eot?#iefix") format("embedded-opentype"); -moz-osx-font-smoothing: grayscale; } +.icon-app-store-fill:before { + content: "\e126"; +} .icon-info-i:before { content: "\e105"; } @@ -128,3 +131,24 @@ url("fonts/iconcool.eot?#iefix") format("embedded-opentype"); .icon-wechat:before { content: "\e125"; } +.icon-yonghu:before { + content: "\e128"; +} +.icon-qiyeweixin:before { + content: "\e129"; +} +.icon-qingximoban:before { + content: "\e12a"; +} +.icon-rizhi:before { + content: "\e12b"; +} +.icon-zhibiaochajian:before { + content: "\e12f"; +} +.icon-shujuku:before { + content: "\e12e"; +} +.icon-ladp:before { + content: "\e12d"; +} diff --git a/src/pages/stylelint.config.js b/src/pages/stylelint.config.js new file mode 100644 index 000000000..26689e6da --- /dev/null +++ b/src/pages/stylelint.config.js @@ -0,0 +1,183 @@ +module.exports = { + extends: ['stylelint-config-standard'], + plugins: ['stylelint-less', 'stylelint-order'], + rules: { + 'at-rule-no-unknown': [ + true, + { + ignoreAtRules: [ + 'function', + 'if', + 'each', + 'include', + 'mixin', + 'define-mixin', + 'extend', + ], + }, + ], + 'alpha-value-notation': 'percentage', + 'no-descending-specificity': null, + 'selector-id-pattern': null, + indentation: 2, + 'order/properties-order': [ + // 指定声明块内属性的字母顺序 + 'position', + 'top', + 'right', + 'bottom', + 'left', + 'z-index', + 'display', + 'float', + 'width', + 'height', + 'max-width', + 'max-height', + 'min-width', + 'min-height', + 'padding', + 'padding-top', + 'padding-right', + 'padding-bottom', + 'padding-left', + 'margin', + 'margin-top', + 'margin-right', + 'margin-bottom', + 'margin-left', + 'margin-collapse', + 'margin-top-collapse', + 'margin-right-collapse', + 'margin-bottom-collapse', + 'margin-left-collapse', + 'overflow', + 'overflow-x', + 'overflow-y', + 'clip', + 'clear', + 'font', + 'font-family', + 'font-size', + 'font-smoothing', + 'osx-font-smoothing', + 'font-style', + 'font-weight', + 'hyphens', + 'src', + 'line-height', + 'letter-spacing', + 'word-spacing', + 'color', + 'text-align', + 'text-decoration', + 'text-indent', + 'text-overflow', + 'text-rendering', + 'text-size-adjust', + 'text-shadow', + 'text-transform', + 'word-break', + 'word-wrap', + 'white-space', + 'vertical-align', + 'list-style', + 'list-style-type', + 'list-style-position', + 'list-style-image', + 'pointer-events', + 'cursor', + 'background', + 'background-attachment', + 'background-color', + 'background-image', + 'background-position', + 'background-repeat', + 'background-size', + 'border', + 'border-image', + 'border-collapse', + 'border-color', + 'border-top', + 'border-right', + 'border-bottom', + 'border-left', + 'border-top-color', + 'border-right-color', + 'border-bottom-color', + 'border-left-color', + 'border-spacing', + 'border-style', + 'border-top-style', + 'border-right-style', + 'border-bottom-style', + 'border-left-style', + 'border-width', + 'border-top-width', + 'border-right-width', + 'border-bottom-width', + 'border-left-width', + 'border-radius', + 'border-top-right-radius', + 'border-bottom-right-radius', + 'border-bottom-left-radius', + 'border-top-left-radius', + 'border-radius-topright', + 'border-radius-bottomright', + 'border-radius-bottomleft', + 'border-radius-topleft', + 'content', + 'quotes', + 'outline', + 'outline-offset', + 'opacity', + 'filter', + 'visibility', + 'size', + 'zoom', + 'transform', + 'box-align', + 'box-flex', + 'box-orient', + 'box-pack', + 'box-shadow', + 'box-sizing', + 'table-layout', + 'animation', + 'animation-delay', + 'animation-duration', + 'animation-iteration-count', + 'animation-name', + 'animation-play-state', + 'animation-timing-function', + 'animation-fill-mode', + 'transition', + 'transition-delay', + 'transition-duration', + 'transition-property', + 'transition-timing-function', + 'background-clip', + 'backface-visibility', + 'resize', + 'appearance', + 'user-select', + 'interpolation-mode', + 'direction', + 'marks', + 'page', + 'set-link-source', + 'unicode-bidi', + 'speak', + ], + }, + overrides: [ + { + files: ['**/*.(less|css|vue|html)'], + customSyntax: 'postcss-less' + }, + { + files: ['**/*.(html|vue)'], + customSyntax: 'postcss-html' + } + ], +}; diff --git a/src/pages/tsconfig.eslint.json b/src/pages/tsconfig.eslint.json new file mode 100644 index 000000000..4d2f977b3 --- /dev/null +++ b/src/pages/tsconfig.eslint.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "include": [ + // 👇️ 在此处添加要 lint 的所有目录和文件 + "src", + + // 添加我们看到“parserOptions.project”错误的所有文件 + ".eslintrc.js" + ], + "exclude": [ + "static" + ] +} \ No newline at end of file