Skip to content

Commit

Permalink
Revert "feat: add tips (#371)" (#373)
Browse files Browse the repository at this point in the history
This reverts commit 87c3ca1.
  • Loading branch information
huangpeng0428 authored Nov 11, 2021
1 parent 87c3ca1 commit b319e66
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 49 deletions.
26 changes: 2 additions & 24 deletions frontend/src/views/group/components/add-group-perm-sideslider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,7 @@
<bk-table-column type="selection" align="center" :selectable="getIsSelect"></bk-table-column>
<bk-table-column :label="$t(`m.permTemplate['模板名']`)">
<template slot-scope="{ row }">
<bk-popover placement="top" :delay="[300, 0]" ext-cls="iam-tooltips-cls">
<template>
<Icon v-if="!getIsSelect(row)" type="error-fill" class="error-icon" />
</template>
<div slot="content" class="iam-perm-apply-action-popover-content">
该模板无法选择的原因是:分级管理员缩小了授权范围,但是没有同步删除模板里的操作,如需选择请重新编辑模板或者创建新的模板。
<bk-button
text
:loading="editLoading"
@click="handleEdit(row)">
去编辑
</bk-button>
</div>
</bk-popover>
<Icon v-if="!getIsSelect(row)" type="error-fill" class="error-icon" />
<span class="perm-template-name" :title="row.name" @click="handleViewTemplateDetail(row)">{{ row.name }}</span>
</template>
</bk-table-column>
Expand Down Expand Up @@ -519,14 +506,6 @@
handleSliderClose () {
this.$emit('update:isShow', false)
this.$emit('animation-end')
},
handleEdit (data) {
window.localStorage.setItem('iam-header-title-cache', `${this.$t(`m.nav['编辑权限模板']`)}(${data.name})`)
this.$router.push({
name: 'permTemplateEdit',
params: { id: data.id, systemId: data.system.id }
})
}
}
}
Expand Down Expand Up @@ -606,8 +585,7 @@
font-size: 14px;
color: #ffb400;
position: absolute;
left: -15px;
top: -11px;
left: -5px;
}
}
</style>
29 changes: 4 additions & 25 deletions frontend/src/views/perm-template/components/render-action.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@
<bk-popover placement="top" :delay="[300, 0]" ext-cls="iam-tooltips-cls">
<template v-if="act.disabled">
<span class="text" :class="{ 'text-through': act.tag === 'delete' && mode === 'detail' }">{{ act.name }}</span>
<Icon v-if="act.tag === 'delete'" type="error-fill" class="error-icon" />
</template>
<template v-else>
<span class="text" :class="{ 'text-through': act.tag === 'delete' && mode === 'detail' }">{{ act.name }}</span>
<Icon v-if="act.tag === 'delete'" type="error-fill" class="error-icon" />
</template>
<div slot="content" class="iam-perm-apply-action-popover-content">
<div>
Expand All @@ -53,19 +55,6 @@
</div>
</div>
</bk-popover>

<bk-popover placement="top" :delay="[300, 0]" ext-cls="iam-tooltips-cls">
<template v-if="act.tag === 'delete'">
<Icon type="error-fill" class="error-icon" />
</template>
<div slot="content" class="iam-perm-apply-action-popover-content">
<div>

由于分级管理员的授权范围没有包含此操作,<br>
如需使用该模板进行新的授权必须先删除该操作。
</div>
</div>
</bk-popover>
<template v-if="isCompare && act.hasOwnProperty('flag') && ['added', 'cancel'].includes(act.flag)">
<bk-tag :theme="act.flag === 'added' ? 'success' : 'danger'">
{{ act.flag === 'added' ? $t(`m.common['新增']`) : $t(`m.common['移除']`) }}
Expand Down Expand Up @@ -103,9 +92,11 @@
<bk-popover placement="top" :delay="[300, 0]" ext-cls="iam-tooltips-cls">
<template v-if="act.disabled">
<span class="text" :class="{ 'text-through': act.tag === 'delete' && mode === 'detail' }">{{ act.name }}</span>
<Icon v-if="act.tag === 'delete'" type="error-fill" class="error-icon" />
</template>
<template v-else>
<span class="text" :class="{ 'text-through': act.tag === 'delete' && mode === 'detail' }">{{ act.name }}</span>
<Icon v-if="act.tag === 'delete'" type="error-fill" class="error-icon" />
</template>
<div slot="content" class="iam-perm-apply-action-popover-content">
<div>
Expand All @@ -120,18 +111,6 @@
</div>
</div>
</bk-popover>
<bk-popover placement="top" :delay="[300, 0]" ext-cls="iam-tooltips-cls">
<template v-if="act.tag === 'delete'">
<Icon type="error-fill" class="error-icon" />
</template>
<div slot="content" class="iam-perm-apply-action-popover-content">
<div>

由于分级管理员的授权范围没有包含此操作,<br>
如需使用该模板进行新的授权必须先删除该操作。
</div>
</div>
</bk-popover>
<template v-if="isCompare && act.hasOwnProperty('flag') && ['added', 'cancel'].includes(act.flag)">
<bk-tag :theme="act.flag === 'added' ? 'success' : 'danger'">
{{ act.flag === 'added' ? $t(`m.common['新增']`) : $t(`m.common['移除']`) }}
Expand Down

0 comments on commit b319e66

Please sign in to comment.