Skip to content

Commit

Permalink
Merge pull request #2549 from lhzzforever/dev/develop_ci
Browse files Browse the repository at this point in the history
fix: 修复ip选择器只支持单选场景下右侧表格还有可以勾选
  • Loading branch information
ielgnaw authored Mar 1, 2024
2 parents 6013063 + 5b17113 commit d5aa3d0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 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

0 comments on commit d5aa3d0

Please sign in to comment.