Skip to content

Commit

Permalink
Merge pull request #10743 from vhwweng/issue_9620
Browse files Browse the repository at this point in the history
feat: 项目成员管理 #9620
  • Loading branch information
bkci-bot authored Aug 19, 2024
2 parents fc94abc + ba99378 commit dfb651e
Show file tree
Hide file tree
Showing 63 changed files with 5,608 additions and 1,373 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,13 @@
@click="handleChooseGroup(group)"
>
<span class="group-name" :title="group.name">{{ group.name }}</span>
<div class="num-box">
<div class="num-box" v-for="item in groupCountField" :key="item">
<i :class="{
'group-icon manage-icon manage-icon-user-shape': true,
'group-icon manage-icon manage-icon-user-shape': item === 'userCount',
'group-icon manage-icon manage-icon-organization': item === 'departmentCount',
'active': activeTab === group.groupId
}" />
<div class="group-num">{{ group.userCount }}</div>
</div>
<div class="num-box">
<i :class="{
'group-icon manage-icon manage-icon-organization': true,
'active': activeTab === group.groupId
}" />
<div class="group-num">{{ group.departmentCount }}</div>
<div class="group-num">{{ group[item] }}</div>
</div>
<bk-popover
v-if="resourceType === 'project'"
Expand Down Expand Up @@ -194,6 +188,7 @@ export default {
hasLoadEnd: false,
isClosing: false,
curGroupIndex: -1,
groupCountField: ['userCount', 'departmentCount'],
};
},
watch: {
Expand Down Expand Up @@ -300,13 +295,14 @@ export default {
this.groupList[this.curGroupIndex].userCount += data.data.users.length
this.syncGroupIAM(this.groupList[this.curGroupIndex].groupId)
break;
case 'remove_user_confirm':
case 'remove_user_confirm': {
const departments = data.data.members.filter(i => i.type === 'department')
const users = data.data.members.filter(i => i.type === 'user')
this.groupList[this.curGroupIndex].departmentCount -= departments.length
this.groupList[this.curGroupIndex].userCount -= users.length
this.syncGroupIAM(this.groupList[this.curGroupIndex].groupId)
break;
}
case 'change_group_detail_tab':
this.$emit('change-group-detail-tab', data.data.tab)
}
Expand Down Expand Up @@ -335,7 +331,7 @@ export default {
border-right: 1px solid #dde0e6;
}
.group-list {
max-height: calc(100% - 130px);
max-height: calc(100% - 70px);
height: auto;
overflow-y: auto;
&::-webkit-scrollbar-thumb {
Expand Down Expand Up @@ -456,9 +452,6 @@ export default {
margin-bottom: 20px;
text-align: center;
}
.small-size {
scale: 0.9;
}
.close-manage-dialog {
.title-icon {
Expand Down
242 changes: 121 additions & 121 deletions src/frontend/bk-permission/src/css/fonts/iconcool.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions src/frontend/bk-permission/src/css/iconcool.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/frontend/bk-permission/src/css/index.css
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@import url(./style.css);
@import url(./style.css);
224 changes: 112 additions & 112 deletions src/frontend/bk-permission/src/css/style.css
Original file line number Diff line number Diff line change
@@ -1,112 +1,112 @@
@font-face {
font-family: "manage";
src: url("fonts/iconcool.svg#iconcool") format("svg"),
url("fonts/iconcool.ttf") format("truetype"),
url("fonts/iconcool.woff") format("woff"),
url("fonts/iconcool.eot?#iefix") format("embedded-opentype");
font-weight: normal;
font-style: normal;
}

.manage-icon {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'manage' !important;
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
text-align: center;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

.manage-icon-sync-failed:before {
content: "\e111";
}
.manage-icon-sync-success:before {
content: "\e112";
}
.manage-icon-sync-default:before {
content: "\e113";
}
.manage-icon-abnormal:before {
content: "\e115";
}
.manage-icon-sync-waiting-01:before {
content: "\e114";
}
.manage-icon-warning-2:before {
content: "\e116";
}
.manage-icon-more-fill:before {
content: "\e101";
}
.manage-icon-user-shape:before {
content: "\e102";
}
.manage-icon-add-fill:before {
content: "\e103";
}
.manage-icon-lock-radius:before {
content: "\e104";
}
.manage-icon-normal:before {
content: "\e106";
}
.manage-icon-organization:before {
content: "\e117";
}
.manage-icon-warning-circle-fill:before {
content: "\e118";
}
.manage-icon-unknown:before {
content: "\e121";
}
.manage-icon-angle-right:before {
content: "\e122";
}
.manage-icon-close:before {
content: "\e123";
}
.manage-icon-refresh:before {
content: "\e129";
}
.manage-icon-down-shape:before {
content: "\e12a";
}
.manage-icon-color-logo-pipeline:before {
content: "\e12b";
}
.manage-icon-color-logo-ticket:before {
content: "\e12d";
}
.manage-icon-color-logo-quality:before {
content: "\e131";
}
.manage-icon-color-logo-environment:before {
content: "\e12e";
}
.manage-icon-color-logo-experience:before {
content: "\e130";
}
.manage-icon-color-logo-codelib:before {
content: "\e12f";
}
.manage-icon-right-shape:before {
content: "\e138";
}
.manage-icon-arrows-right:before {
content: "\e139";
}
.manage-icon-jump:before {
content: "\e13a";
}
.manage-icon-info-line:before {
content: "\e13b";
}
.manage-icon-tishi:before {
content: "\e13c";
}
@font-face {
font-family: "manage";
src: url("fonts/iconcool.svg#iconcool") format("svg"),
url("fonts/iconcool.ttf") format("truetype"),
url("fonts/iconcool.woff") format("woff"),
url("fonts/iconcool.eot?#iefix") format("embedded-opentype");
font-weight: normal;
font-style: normal;
}

.manage-icon {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'manage' !important;
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
text-align: center;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

.manage-icon-sync-failed:before {
content: "\e111";
}
.manage-icon-sync-success:before {
content: "\e112";
}
.manage-icon-sync-default:before {
content: "\e113";
}
.manage-icon-abnormal:before {
content: "\e115";
}
.manage-icon-sync-waiting-01:before {
content: "\e114";
}
.manage-icon-warning-2:before {
content: "\e116";
}
.manage-icon-more-fill:before {
content: "\e101";
}
.manage-icon-user-shape:before {
content: "\e102";
}
.manage-icon-add-fill:before {
content: "\e103";
}
.manage-icon-lock-radius:before {
content: "\e104";
}
.manage-icon-normal:before {
content: "\e106";
}
.manage-icon-organization:before {
content: "\e117";
}
.manage-icon-warning-circle-fill:before {
content: "\e118";
}
.manage-icon-unknown:before {
content: "\e121";
}
.manage-icon-angle-right:before {
content: "\e122";
}
.manage-icon-close:before {
content: "\e123";
}
.manage-icon-refresh:before {
content: "\e129";
}
.manage-icon-down-shape:before {
content: "\e12a";
}
.manage-icon-color-logo-pipeline:before {
content: "\e12b";
}
.manage-icon-color-logo-ticket:before {
content: "\e12d";
}
.manage-icon-color-logo-quality:before {
content: "\e131";
}
.manage-icon-color-logo-environment:before {
content: "\e12e";
}
.manage-icon-color-logo-experience:before {
content: "\e130";
}
.manage-icon-color-logo-codelib:before {
content: "\e12f";
}
.manage-icon-right-shape:before {
content: "\e138";
}
.manage-icon-arrows-right:before {
content: "\e139";
}
.manage-icon-jump:before {
content: "\e13a";
}
.manage-icon-info-line:before {
content: "\e13b";
}
.manage-icon-tishi:before {
content: "\e13c";
}
1 change: 0 additions & 1 deletion src/frontend/bk-permission/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { handleNoPermissionV3 } from './function/permission';
import { loadI18nMessages } from './utils/locale';
import './css/index.css';


function install (Vue, opts = {}) {
loadI18nMessages(opts.i18n)
Vue.component('bk-permission', BkPermission)
Expand Down
3 changes: 3 additions & 0 deletions src/frontend/devops-manage/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@ module.exports = {
'bk.config.js',
'index.html',
],
rules: {
'vue/space-unary-ops': 'off',
}
};
13 changes: 9 additions & 4 deletions src/frontend/devops-manage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@
"author": "",
"license": "ISC",
"dependencies": {
"axios": "0.28.0",
"bk-permission": "^0.0.28",
"bkui-vue": "0.0.1-beta.456",
"bkui-vue": "2.0.1-beta.42",
"dayjs": "^1.11.2",
"pinia": "^2.0.23",
"vue": "^3.2.41",
"vue-i18n": "^9.1.10",
"vue-router": "^4.1.6"
"vue-router": "^4.1.6",
"lodash.throttle": "^4.1.1",
"@icon-cool/bk-icon-bk-biz-components": "0.0.4"
},
"devDependencies": {
"@blueking/babel-preset-bk": "^2.1.0-beta7",
Expand All @@ -45,6 +48,8 @@
"postcss-preset-env": "^7.8.2",
"postcss-simple-vars": "^7.0.0",
"postcss-url": "^10.1.3",
"typescript": "^4.8.4"
"typescript": "^4.8.4",
"less": "^4.2.0",
"less-loader": "^12.2.0"
}
}
}
4 changes: 1 addition & 3 deletions src/frontend/devops-manage/src/components/manage-header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,12 @@ const goToManage = () => {
z-index: 100;
}
.manage-breadcrumb {
position: absolute;
max-width: 40%;
padding-left: 20px;
.bk-breadcrumb-item {
max-width: 80%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: inline-block;
}
}
.manage-icon {
Expand Down
Loading

0 comments on commit dfb651e

Please sign in to comment.