Skip to content

Commit

Permalink
Merge pull request #2450 from TencentBlueKing/develop
Browse files Browse the repository at this point in the history
v1.10.19
  • Loading branch information
zhu327 authored Dec 26, 2023
2 parents e91d64a + d1cb947 commit 35061e9
Show file tree
Hide file tree
Showing 181 changed files with 11,060 additions and 1,617 deletions.
8 changes: 4 additions & 4 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
:flag="groupGuideShow"
:content="$t(`m.guide['创建用户组']`)" /> -->
<template v-if="!['403'].includes(routeName)">
<iam-guide
<!-- <iam-guide
v-if="processGuideShow"
type="set_group_approval_process"
direction="left"
:cur-style="processGuideStyle"
:flag="processGuideShow"
:content="$t(`m.guide['创建审批流程']`)" />
:content="$t(`m.guide['创建审批流程']`)" /> -->
<header-nav
v-if="!externalSystemsLayout.hideIamHeader"
@reload-page="handleRefreshPage"
Expand Down Expand Up @@ -60,7 +60,7 @@
import HeaderNav from '@/components/header-nav/index.vue';
import theHeader from '@/components/header/index.vue';
import theNav from '@/components/nav/index.vue';
import IamGuide from '@/components/iam-guide/index.vue';
// import IamGuide from '@/components/iam-guide/index.vue';
import { existValue, formatI18nKey } from '@/common/util';
import { bus } from '@/common/bus';
import { mapGetters } from 'vuex';
Expand All @@ -75,7 +75,7 @@
};
},
components: {
IamGuide,
// IamGuide,
theHeader,
theNav,
HeaderNav
Expand Down
20 changes: 20 additions & 0 deletions frontend/src/assets/iconfont/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@ <h2 class="page-title">
<span class="icon iam-icon iamcenter-resource-approver-manage"></span>
<p class="icon-text">resource-approver-manage</p>
</li>
<li class="icon-item" title="jump-link">
<span class="icon iam-icon iamcenter-jump-link"></span>
<p class="icon-text">jump-link</p>
</li>
<li class="icon-item" title="check-small">
<span class="icon iam-icon iamcenter-check-small"></span>
<p class="icon-text">check-small</p>
Expand Down Expand Up @@ -661,6 +665,10 @@ <h2 class="page-title">
<span class="icon iam-icon iamcenter-all"></span>
<p class="icon-text">all</p>
</li>
<li class="icon-item" title="renyuanmuban">
<span class="icon iam-icon iamcenter-renyuanmuban"></span>
<p class="icon-text">renyuanmuban</p>
</li>
</ul>
<h3 class="describe-title">为什么使用</h3>
<ul class="use-describe">
Expand Down Expand Up @@ -942,6 +950,12 @@ <h3 class="describe-title">如何使用</h3>
</svg>
<p class="icon-text">resource-approver-manage</p>
</li>
<li class="colorful-icon">
<svg class="icon svg-icon">
<use xlink:href="#iamcenter-jump-link"></use>
</svg>
<p class="icon-text">jump-link</p>
</li>
<li class="colorful-icon">
<svg class="icon svg-icon">
<use xlink:href="#iamcenter-check-small"></use>
Expand Down Expand Up @@ -1494,6 +1508,12 @@ <h3 class="describe-title">如何使用</h3>
</svg>
<p class="icon-text">all</p>
</li>
<li class="colorful-icon">
<svg class="icon svg-icon">
<use xlink:href="#iamcenter-renyuanmuban"></use>
</svg>
<p class="icon-text">renyuanmuban</p>
</li>
</ul>
<h3 class="describe-title">为什么使用</h3>
<ul class="use-describe">
Expand Down
Binary file modified frontend/src/assets/iconfont/fonts/iconcool.eot
Binary file not shown.
6 changes: 6 additions & 0 deletions frontend/src/assets/iconfont/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.
Binary file modified frontend/src/assets/iconfont/fonts/iconcool.ttf
Binary file not shown.
Binary file modified frontend/src/assets/iconfont/fonts/iconcool.woff
Binary file not shown.
2 changes: 1 addition & 1 deletion frontend/src/assets/iconfont/iconcool.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontend/src/assets/iconfont/iconcool.json

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions frontend/src/assets/iconfont/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ url("fonts/iconcool.eot?#iefix") format("embedded-opentype");
.iamcenter-resource-approver-manage:before {
content: "\e1b3";
}
.iamcenter-jump-link:before {
content: "\e226";
}
.iamcenter-check-small:before {
content: "\e1b4";
}
Expand Down Expand Up @@ -431,3 +434,6 @@ url("fonts/iconcool.eot?#iefix") format("embedded-opentype");
.iamcenter-all:before {
content: "\e224";
}
.iamcenter-renyuanmuban:before {
content: "\e225";
}
30 changes: 30 additions & 0 deletions frontend/src/common/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,3 +210,33 @@ export const SENSITIVITY_LEVEL_ENUM = [
disabled: false
}
];

// 人员模板配置项表格
export const MEMBERS_TEMPLATE_FIELDS = [
{
id: 'name',
label: il8n('memberTemplate', '模板名称'),
sortable: true,
disabled: true
},
{
id: 'description',
label: il8n('common', '描述'),
disabled: false
},
{
id: 'group_count',
label: il8n('memberTemplate', '关联用户组'),
disabled: false
},
{
id: 'creator',
label: il8n('memberTemplate', '创建人'),
disabled: false
},
{
id: 'created_time',
label: il8n('common', '创建时间'),
disabled: false
}
];
15 changes: 10 additions & 5 deletions frontend/src/common/router-handle.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ export const getRouterDiff = (payload) => {
'authorBoundary',
'secondaryManageSpaceCreate',
'userGroupSetting',
'sensitivityLevel'
'sensitivityLevel',
'memberTemplate'
];
}
if (payload === 'super_manager') {
Expand Down Expand Up @@ -191,7 +192,8 @@ export const getRouterDiff = (payload) => {
'myManageSpace',
'permTemplate',
'userGroupSetting',
'sensitivityLevel'
'sensitivityLevel',
'memberTemplate'
];
}
// payload其它取值默认返回全部菜单
Expand Down Expand Up @@ -265,7 +267,8 @@ export const getNavRouterDiff = (navIndex) => {
'authorBoundary',
'secondaryManageSpace',
'userGroupSetting',
'sensitivityLevel'
'sensitivityLevel',
'memberTemplate'
];
}

Expand Down Expand Up @@ -314,7 +317,8 @@ export const getNavRouterDiff = (navIndex) => {
'secondaryManageSpaceCreate',
'secondaryManageSpaceDetail',
'userGroupSetting',
'sensitivityLevel'
'sensitivityLevel',
'memberTemplate'
];
}

Expand Down Expand Up @@ -350,7 +354,8 @@ export const getNavRouterDiff = (navIndex) => {
'myManageSpace',
'secondaryManageSpaceCreate',
'secondaryManageSpaceDetail',
'userGroupSetting'
'userGroupSetting',
'memberTemplate'
];
}
};
41 changes: 41 additions & 0 deletions frontend/src/common/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -664,3 +664,44 @@ export function delLocationHref (list) {
}
window.history.replaceState({}, '', prefix + suffix);
}

/**
* 限制表情包
*
* @param {str} str 传入的字符
*
*/
export function isEmojiCharacter (str) {
for (let i = 0; i < str.length; i++) {
const hs = str.charCodeAt(i);
if (hs >= 0xd800 && hs <= 0xdbff) {
if (str.length > 1) {
const ls = str.charCodeAt(i + 1);
const uc = ((hs - 0xd800) * 0x400) + (ls - 0xdc00) + 0x10000;
if (uc >= 0x1d000 && uc <= 0x1f77f) {
return true;
}
}
} else if (str.length > 1) {
const ls = str.charCodeAt(i + 1);
if (ls === 0x20e3) {
return true;
}
} else {
if (hs >= 0x2100 && hs <= 0x27ff) {
return true;
} else if (hs >= 0x2B05 && hs <= 0x2b07) {
return true;
} else if (hs >= 0x2934 && hs <= 0x2935) {
return true;
} else if (hs >= 0x3297 && hs <= 0x3299) {
return true;
} else if (
hs === 0xa9 || hs === 0xae || hs === 0x303d || hs === 0x3030
|| hs === 0x2b55 || hs === 0x2b1c || hs === 0x2b1b
|| hs === 0x2b50) {
return true;
}
}
}
}
28 changes: 24 additions & 4 deletions frontend/src/components/custom-perm-system-policy/index.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<template>
<div :class="['iam-perm-item', extCls]">
<div class="header" @click="handleExpanded" v-if="permLength > 0">
<div :class="['iam-perm-item', extCls]" v-if="permLength > 0">
<div class="header" @click="handleExpanded" v-if="!isOnlyPerm">
<Icon bk class="expanded-icon" :type="isExpanded ? 'down-shape' : 'right-shape'" />
<label class="title">{{ title }}</label>
<div class="sub-title">
{{ $t(`m.common['共']`) }}
<span class="number">{{ permLength }}</span>
{{ $t(`m.common['个']`) }}
{{ $t(`m.perm['操作权限']`) }}
{{ $t(`m.common['个']`) }}{{ typeTitle }}
<span
v-if="isAllDelete"
class="del-all-icon">
Expand All @@ -27,6 +26,7 @@
</div>
</template>
<script>
import il8n from '@/language';
export default {
name: 'CustomPermSystemPolicy',
props: {
Expand All @@ -38,6 +38,10 @@
type: String,
default: ''
},
typeTitle: {
type: String,
default: il8n('perm', '操作权限')
},
permLength: {
type: Number,
default: 0
Expand All @@ -50,6 +54,10 @@
type: Number,
default: 0
},
isOnlyPerm: {
type: Boolean,
default: false
},
isAllDelete: {
type: Boolean,
default: false
Expand Down Expand Up @@ -153,5 +161,17 @@
padding: 0 30px 0 30px;
}
}
&.only-perm-item-wrapper {
margin-bottom: 0 !important;
box-shadow: none;
.content {
.slot-content {
padding: 0;
}
.expand-action {
display: none;
}
}
}
}
</style>
Loading

0 comments on commit 35061e9

Please sign in to comment.