-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'github-bk-bcs/master'
* github-bk-bcs/master: fix: 批量导入表格性能优化 (#3445) feat: user-manager支持周期性地同步token到redis (#3333) feat: 完善EKS CA功能 (#3307) fix: 分组管理-跨页全选功能是否显示的逻辑调整 (#3442) fix: 优化非模板配置导入 (#3440) feat: 分组管理增加跨页全选功能 --story=118110616 (#3321)
- Loading branch information
Showing
85 changed files
with
35,515 additions
and
8,133 deletions.
There are no files selected for viewing
347 changes: 241 additions & 106 deletions
347
bcs-services/bcs-bscp/cmd/data-service/service/config_item.go
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89 changes: 89 additions & 0 deletions
89
bcs-services/bcs-bscp/ui/src/components/across-check-table-tip.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<template> | ||
<div v-show="selectType !== CheckType.Uncheck" class="selections-style"> | ||
{{ t('已选择', { count: isFullDataMode ? selectionsLength : showSelectedLength }) }}, | ||
<span | ||
class="checked-em" | ||
v-show="(isFullDataMode ? selectionsLength : showSelectedLength) < dataLength" | ||
@click="selectTypeChange"> | ||
{{ t('选择所有', { count: dataLength }) }} | ||
</span> | ||
<span | ||
class="checked-em" | ||
v-show="(isFullDataMode ? selectionsLength : showSelectedLength) === dataLength" | ||
@click="clearSelection"> | ||
{{ t('取消选择所有数据') }} | ||
</span> | ||
</div> | ||
</template> | ||
<script lang="ts" setup> | ||
import { computed } from 'vue'; | ||
import CheckType from '../../types/across-checked'; | ||
import { useI18n } from 'vue-i18n'; | ||
const { t } = useI18n(); | ||
const props = withDefaults( | ||
defineProps<{ | ||
dataLength: number; | ||
selectionsLength: number; | ||
isFullDataMode: boolean; | ||
selectType: number; | ||
crossPageSelect: boolean; | ||
handleSelectTypeChange: Function; | ||
handleClearSelection: Function; | ||
}>(), | ||
{ | ||
dataLength: 0, | ||
selectionsLength: 0, | ||
isFullDataMode: false, | ||
selectType: CheckType.Uncheck, | ||
crossPageSelect: true, | ||
handleSelectTypeChange: () => {}, | ||
handleClearSelection: () => {}, | ||
}, | ||
); | ||
// 已选择数据长度展示 | ||
const showSelectedLength = computed(() => { | ||
const { selectType, selectionsLength, dataLength } = props; | ||
return [CheckType.HalfChecked, CheckType.Checked].includes(selectType) | ||
? selectionsLength | ||
: dataLength - selectionsLength; | ||
}); | ||
// 根据是否提供全选/跨页全选功能,判断当前页全选/跨页全选 | ||
const selectTypeChange = () => { | ||
if (props.crossPageSelect) { | ||
// 跨页全选 | ||
props.handleSelectTypeChange(CheckType.AcrossChecked); | ||
} else { | ||
// 当前页全选 | ||
props.handleSelectTypeChange(CheckType.Checked); | ||
} | ||
}; | ||
const clearSelection = () => { | ||
props.handleClearSelection(); | ||
}; | ||
</script> | ||
<style lang="scss" scoped> | ||
.selections-style { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
height: 30px; | ||
font-size: 12px; | ||
color: #63656e; | ||
background: #ebecf0; | ||
.checked-number { | ||
padding: 0 5px; | ||
font-weight: 700; | ||
} | ||
.checked-em { | ||
margin-left: 5px; | ||
color: #3a84ff; | ||
cursor: pointer; | ||
&:hover { | ||
color: #699df4; | ||
} | ||
} | ||
} | ||
</style> |
Oops, something went wrong.