Skip to content

Commit

Permalink
fix(frontend): db部署规则列表支持城市过滤 #6847
Browse files Browse the repository at this point in the history
  • Loading branch information
jinquantianxia authored and iSecloud committed Sep 11, 2024
1 parent 581bfc6 commit 2ef6120
Show file tree
Hide file tree
Showing 15 changed files with 173 additions and 147 deletions.
5 changes: 4 additions & 1 deletion dbm-ui/frontend/src/components/apply-items/SpecSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,13 @@
cloudId: number | string;
showRefresh?: boolean;
clearable?: boolean;
city?: string;
}
const props = withDefaults(defineProps<Props>(), {
showRefresh: true,
clearable: true,
city: undefined,
});
const emits = defineEmits<Emits>();
Expand Down Expand Up @@ -175,6 +177,7 @@
bk_biz_id: Number(props.bizId),
bk_cloud_id: Number(props.cloudId),
spec_ids: list.value.map((item) => item.spec_id),
city: props.city,
}).then((data) => {
list.value = list.value.map((item) => ({
...item,
Expand All @@ -185,7 +188,7 @@
}, 100);
watch(
[() => props.bizId, () => props.cloudId, data],
[() => props.bizId, () => props.cloudId, () => props.city, data],
() => {
if (
typeof props.bizId === 'number' &&
Expand Down
1 change: 1 addition & 0 deletions dbm-ui/frontend/src/services/source/dbresourceResource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ export function fetchResourceImportUrls() {
*/
export function getSpecResourceCount(params: {
bk_biz_id: number;
city?: string;
resource_type?: string;
bk_cloud_id: number;
spec_ids: number[];
Expand Down
Loading

0 comments on commit 2ef6120

Please sign in to comment.