Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 自定义字段 #107 #242

Merged
merged 9 commits into from
Jan 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
"cookie": "0.4.0",
"cookie-parser": "1.4.4",
"cropperjs": "1.5.5",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-vue": "^8.3.0",
"express": "4.17.0",
"express-art-template": "1.0.1",
"intl-tel-input": "16.0.0",
Expand Down
12 changes: 6 additions & 6 deletions src/pages/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,32 @@
-->
<template>
<div id="app">
<Header v-if="showHeader" @reloadRouter="routerKey += 1" />
<HeaderBox v-if="showHeader" @reloadRouter="routerKey += 1" />
<main class="main-content">
<router-view :key="routerKey" />
<KingLoading v-show="initLoading"></KingLoading>
<NoAuthority v-if="noAuthData" :no-auth-data="noAuthData" @reloadRouter="routerKey += 1" />
</main>
<Login v-if="loginData" :login-data="loginData" />
<Footer />
<FooterBox />
</div>
</template>

<script>
import Header from './Header';
import Footer from './Footer';
import HeaderBox from './Header';
import FooterBox from './Footer';
import Login from '@/components/login';
import NoAuthority from '@/components/authority/NoAuthority';
import KingLoading from '@/components/KingLoading';

export default {
name: 'App',
components: {
Header,
HeaderBox,
Login,
NoAuthority,
KingLoading,
Footer,
FooterBox,
},
data() {
return {
Expand Down
10 changes: 6 additions & 4 deletions src/pages/src/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@
<div class="footer-content">
<div class="link-container">
<template v-for="(item, index) in footerList">
<a class="footer-link"
:key="index + 'link'"
:href="item.link"
:target="item.is_blank ? '_blank' : '_self'">
<a
class="footer-link"
:key="index + 'link'"
:href="item.link"
:target="item.is_blank ? '_blank' : '_self'">
{{ isEnglish ? item.text_en : item.text }}
</a>
<span v-if="index !== footerList.length - 1" :key="index + 'gap'" class="gap"> | </span>
Expand All @@ -40,6 +41,7 @@
import cookie from 'cookie';

export default {
name: 'FooterBox',
data() {
return {
isEnglish: cookie.parse(document.cookie).blueking_language === 'en',
Expand Down
32 changes: 19 additions & 13 deletions src/pages/src/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,28 @@
<span class="title">{{ $t('蓝鲸用户管理') }}</span>
</h1>
<p class="nav-list">
<a href="javascript:void(0);"
:class="$route.name === 'organization' && 'router-link-active'"
@click="goTo('organization')">{{ $t('组织架构') }}
<a
href="javascript:void(0);"
:class="$route.name === 'organization' && 'router-link-active'"
@click="goTo('organization')">{{ $t('组织架构') }}
</a>
<a href="javascript:void(0);"
:class="$route.name === 'catalog' && 'router-link-active'" @click="goTo('catalog')">{{ $t('用户目录') }}</a>
<a href="javascript:void(0);"
:class="$route.name === 'audit' && 'router-link-active'" @click="goTo('audit')">{{ $t('审计') }}</a>
<a href="javascript:void(0);"
:class="$route.name === 'setting' && 'router-link-active'" @click="goTo('setting')">{{ $t('设置') }}</a>
<a
href="javascript:void(0);"
:class="$route.name === 'catalog' && 'router-link-active'" @click="goTo('catalog')">{{ $t('用户目录') }}</a>
<a
href="javascript:void(0);"
:class="$route.name === 'audit' && 'router-link-active'" @click="goTo('audit')">{{ $t('审计') }}</a>
<a
href="javascript:void(0);"
:class="$route.name === 'setting' && 'router-link-active'" @click="goTo('setting')">{{ $t('设置') }}</a>
</p>
</div>
<div class="header-right" data-test-id="list_menuInfo">
<bk-dropdown-menu ref="dropdownHelp"
align="center"
@show="showHelpDropdown = true"
@hide="showHelpDropdown = false">
<bk-dropdown-menu
ref="dropdownHelp"
align="center"
@show="showHelpDropdown = true"
@hide="showHelpDropdown = false">
<div class="question-icon-trigger" :class="showHelpDropdown && 'active'" slot="dropdown-trigger">
<div class="icon-circle-container">
<span class="bk-icon icon-question-circle-shape"></span>
Expand Down Expand Up @@ -82,6 +87,7 @@

<script>
export default {
name: 'HeaderBox',
data() {
return {
showHelpDropdown: false,
Expand Down
26 changes: 14 additions & 12 deletions src/pages/src/components/authority/NoAuthority.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@
<bk-button v-if="applyUrl" class="king-button" theme="primary" @click="confirmPageApply">{{$t('去申请')}}</bk-button>
</div>

<bk-dialog v-model="showApplyDialog"
:mask-close="false"
:close-icon="false"
:width="740"
:ok-text="$t('去申请')"
@confirm="confirmSourceApply"
@cancel="closeAuth">
<bk-dialog
v-model="showApplyDialog"
:mask-close="false"
:close-icon="false"
:width="740"
:ok-text="$t('去申请')"
@confirm="confirmSourceApply"
@cancel="closeAuth">
<div class="apply-authority-dialog-container" data-test-id="list_authorityManagement">
<img src="../../images/svg/lock-radius.svg" alt="lock" class="lock-icon">
<div class="title">{{$t('该操作需要以下权限')}}</div>
Expand All @@ -52,11 +53,12 @@
</div>
</bk-dialog>

<bk-dialog v-model="showConfirmDialog"
:title="$t('权限申请单已提交?')"
:ok-text="$t('刷新页面')"
@confirm="confirmAfterApply"
@cancel="closeAuth">
<bk-dialog
v-model="showConfirmDialog"
:title="$t('权限申请单已提交?')"
:ok-text="$t('刷新页面')"
@confirm="confirmAfterApply"
@cancel="closeAuth">
{{$t('请在权限中心填写权限申请单')}}
</bk-dialog>
</div>
Expand Down
37 changes: 20 additions & 17 deletions src/pages/src/components/catalog/home/ExportUser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,27 @@
<div class="export-main-content" v-bkloading="{ isLoading: basicLoading }">
<div class="department-content">
<!-- 搜索框 -->
<bk-input v-model="searchKey"
class="king-input-search"
style="margin: 24px 24px 20px;width: calc(100% - 48px);"
:placeholder="$t('搜索组织')"
:clearable="true"
:left-icon="'bk-icon icon-search'"
@input="handleInput"
@keydown="handleKeydown"
@clear="clearSearchKey"
@left-icon-click="handleSearchDepartment">
<bk-input
v-model="searchKey"
class="king-input-search"
style="margin: 24px 24px 20px;width: calc(100% - 48px);"
:placeholder="$t('搜索组织')"
:clearable="true"
:left-icon="'bk-icon icon-search'"
@input="handleInput"
@keydown="handleKeydown"
@clear="clearSearchKey"
@left-icon-click="handleSearchDepartment">
</bk-input>
<div class="department-result">
<!-- 搜索结果 -->
<div class="search-content-container" v-if="searchStatus">
<template v-if="searchList.length">
<p v-for="(item, index) in searchList"
:key="index" class="search-item"
:class="[item.disabled && 'disabled', index === selectedIndex && 'selected']"
@click.stop="selectSearchItem(item)">
<p
v-for="(item, index) in searchList"
:key="index" class="search-item"
:class="[item.disabled && 'disabled', index === selectedIndex && 'selected']"
@click.stop="selectSearchItem(item)">
<bk-checkbox :value="item.isChecked" :disabled="item.disabled" class="king-checkbox"></bk-checkbox>
<span class="search-item-text">{{item.name}}</span>
</p>
Expand All @@ -56,9 +58,10 @@
</div>
<!-- 组织树 -->
<div class="department-tree-wrapper" v-else>
<ExportTree :tree-data-list="treeDataList"
@handleClickToggle="handleClickToggle"
@selectItem="selectItem" />
<ExportTree
:tree-data-list="treeDataList"
@handleClickToggle="handleClickToggle"
@selectItem="selectItem" />
</div>
</div>
</div>
Expand Down
13 changes: 7 additions & 6 deletions src/pages/src/components/catalog/operation/CommonInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@
<span class="icon-user--l" v-bk-tooltips="tips"></span>
</div>
</div>
<bk-input v-model="info[keyword]"
:type="inputType"
:style="{ width: inputWidth + 'px' }"
:class="{ 'king-input': true, error: error }"
:disabled="disabled"
@input="handleInput">
<bk-input
v-model="info[keyword]"
:type="inputType"
:style="{ width: inputWidth + 'px' }"
:class="{ 'king-input': true, error: error }"
:disabled="disabled"
@input="handleInput">
<template v-if="append" slot="append">
<div class="group-text">{{append}}</div>
</template>
Expand Down
32 changes: 17 additions & 15 deletions src/pages/src/components/catalog/operation/SetBasic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
<!-- 目录名 -->
<!-- eslint-disable vue/no-mutating-props -->
<div class="name-container">
<CommonInput keyword="display_name"
:info="basicInfo"
:input-bus="inputBus"
:title="$t('目录名')"
:is-need="true"
@hasError="handleHasError" />
<CommonInput
keyword="display_name"
:info="basicInfo"
:input-bus="inputBus"
:title="$t('目录名')"
:is-need="true"
@hasError="handleHasError" />
<div class="check-container">
<bk-checkbox v-model="basicInfo.activated" class="king-checkbox">
{{$t('启用目录')}}
Expand All @@ -41,15 +42,16 @@
<!-- 登录域 -->
<input type="text" class="hidden-password-input">
<input type="password" class="hidden-password-input">
<CommonInput keyword="domain"
:info="basicInfo"
:input-bus="inputBus"
:title="$t('登录域')"
:is-need="true"
:error-text="$t('登录域错误')"
:disabled="type === 'set'"
:description="$t('登录域描述')"
@hasError="handleHasError" />
<CommonInput
keyword="domain"
:info="basicInfo"
:input-bus="inputBus"
:title="$t('登录域')"
:is-need="true"
:error-text="$t('登录域错误')"
:disabled="type === 'set'"
:description="$t('登录域描述')"
@hasError="handleHasError" />

<!-- 新增用户目录 -->
<div class="save-setting-buttons" v-if="type === 'add'">
Expand Down
Loading