Skip to content

Commit

Permalink
Merge pull request #2551 from TencentBlueKing/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
zhu327 authored Mar 4, 2024
2 parents 50fc052 + a219354 commit 9f15582
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/choose-ip/topology-tree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
<span v-bk-tooltips="{ content: $t(`m.common['已选父级']`), disabled: !isParentChecked(row) }">
<bk-checkbox
:value="formatCheckBoxStatus(row, 'checked')"
:disabled="formatCheckBoxStatus(row, 'disabled')"
:disabled="formatCheckBoxStatus(row, 'disabled') || formatRadioDisabled(row)"
@change="handleChildNodeChange(...arguments, row)"
/>
</span>
Expand Down Expand Up @@ -669,7 +669,7 @@
}
if (!async && expanded) {
return {
'paddingLeft': `${16 + level * 8}px`
'paddingLeft': `16px`
};
}
};
Expand Down
23 changes: 16 additions & 7 deletions frontend/src/views/perm-template/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
import IamGuide from '@/components/iam-guide/index.vue';
import { fuzzyRtxSearch } from '@/common/rtx';
import { buildURLParams } from '@/common/url';
import { formatCodeData, getWindowHeight } from '@/common/util';
import { formatCodeData, getWindowHeight, delLocationHref } from '@/common/util';
export default {
name: '',
components: {
Expand Down Expand Up @@ -290,9 +290,8 @@
refreshCurrentQuery () {
const params = {};
const queryParams = {
...this.searchParams,
...this.$route.query,
...this.queryParams
...this.searchParams,
...this.queryParams
};
if (Object.keys(queryParams).length) {
window.history.replaceState({}, '', `?${buildURLParams(queryParams)}`);
Expand Down Expand Up @@ -341,6 +340,11 @@
count: 0
});
},
resetLocationHref () {
const urlFields = [...this.searchData.map(item => item.id), ...['current', 'limit']];
delLocationHref(urlFields);
},
async handleEmptyClear () {
this.searchParams = {};
Expand Down Expand Up @@ -380,9 +384,9 @@
this.tableLoading = isLoading;
this.setCurrentQueryCache(this.refreshCurrentQuery());
const params = {
...this.searchParams,
limit: this.pagination.limit,
offset: this.pagination.limit * (this.pagination.current - 1)
...this.searchParams,
limit: this.pagination.limit,
offset: this.pagination.limit * (this.pagination.current - 1)
};
delete params.current;
try {
Expand Down Expand Up @@ -475,7 +479,12 @@
this.searchParams = payload;
this.searchList = result;
this.emptyData.tipType = 'search';
this.queryParams = Object.assign(this.queryParams, { current: 1, limit: 10 });
this.resetPagination();
if (!result.length) {
this.resetLocationHref();
window.localStorage.removeItem('templateList');
}
this.fetchTemplateList(true);
},
Expand Down
6 changes: 4 additions & 2 deletions saas/backend/apps/group/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ class GroupsMemberRenewViewSet(GenericViewSet):
group_biz = GroupBiz()

@swagger_auto_schema(
operation_description="批量用户组添加成员",
operation_description="批量用户组成员续期",
request_body=BatchGroupMemberUpdateExpiredAtSLZ(label="成员"),
responses={status.HTTP_200_OK: serializers.Serializer()},
tags=["group"],
Expand Down Expand Up @@ -598,7 +598,9 @@ def create(self, request, *args, **kwargs):
)

# 写入审计上下文
audit_context_setter(group=group, members=data["members"])
audit_context_setter(group=group, members=group_member)
provider = GroupMemberRenewAuditProvider(request)
log_api_event(request, provider)

return Response({})

Expand Down

0 comments on commit 9f15582

Please sign in to comment.