Skip to content

Commit

Permalink
fix: 2.5.4bugfix & magicBox版本升级 (#1251)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuri0528 authored Sep 21, 2023
1 parent 82cc18c commit 9a558f7
Show file tree
Hide file tree
Showing 6 changed files with 1,600 additions and 1,435 deletions.
2 changes: 1 addition & 1 deletion src/pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"art-template": "4.1.0",
"axios": "^0.26.1",
"babel-preset-env": "^1.7.0",
"bk-magic-vue": "2.5.4-beta.9",
"bk-magic-vue": "^2.5.7",
"connect-history-api-fallback": "1.6.0",
"cookie": "0.4.0",
"cookie-parser": "1.4.4",
Expand Down
1 change: 1 addition & 0 deletions src/pages/src/language/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -574,4 +574,5 @@ export default {
'确认要还原当前目录?': 'Restore the current directory?',
无该应用访问权限: 'No access permission for the application',
返回上一页: 'Return to previous page',
新建目录: 'New directory',
};
1 change: 1 addition & 0 deletions src/pages/src/language/lang/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -573,4 +573,5 @@ export default {
'确认要还原当前目录?': '确认要还原当前目录?',
无该应用访问权限: '无该应用访问权限',
返回上一页: '返回上一页',
新建目录: '新建目录',
};
6 changes: 5 additions & 1 deletion src/pages/src/views/organization/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ export default {
methods: {
async initData() {
try {
this.treeLoading = true;
const res = await this.$store.dispatch('organization/getOrganizationTree');
if (!res.data || !res.data.length) return;
this.treeDataList = res.data;
Expand Down Expand Up @@ -675,6 +676,8 @@ export default {
});
});
}
} finally {
this.treeLoading = false;
}
},
Expand Down Expand Up @@ -897,14 +900,15 @@ export default {
handleTableSearch(list) {
this.isTableDataEmpty = false;
this.basicLoading = true;
if (!list.length) return this.handleTableData();
if (!list.length) return this.handleClickEmpty();
const valueList = [`category_id=${this.currentCategoryId}&page=${this.paginationConfig.current}&page_size=${this.paginationConfig.limit}`];
let key = '';
list.forEach((item) => {
const value = [];
if (Object.keys(this.enumList).includes(item.id)) {
key = this.enumList[item.id];
}
if (!item.values) return;
item.values.forEach((v) => {
value.push(v.id);
});
Expand Down
12 changes: 5 additions & 7 deletions src/pages/src/views/organization/tree/OrganizationTree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- specific language governing permissions and limitations under the License.
-->
<template>
<div class="organization-tree-wrapper" ref="treebox">
<div class="organization-tree-wrapper" ref="treeBox">
<bk-tree
ref="topTree"
ext-cls="top-tree"
Expand Down Expand Up @@ -85,8 +85,8 @@ export default {
availableDirectory: [],
// 不可用目录
unavailableDirectory: [],
treeBoxHeight: document.body.clientHeight - 124,
topTreeHeight: document.body.clientHeight - 164,
treeBoxHeight: null,
topTreeHeight: null,
bottomTreeHeight: 40,
timer: false,
treeScrollTop: 0,
Expand Down Expand Up @@ -120,7 +120,7 @@ export default {
}
});
this.$nextTick(() => {
this.topTreeHeight = this.$refs.treebox.offsetHeight - this.$refs.bottomTree.offsetHeight;
this.topTreeHeight = this.$refs.treeBox.offsetHeight - this.$refs.bottomTree.offsetHeight;
});
},
},
Expand Down Expand Up @@ -150,9 +150,7 @@ export default {
},
},
mounted() {
window.onload = () => {
this.availableDirectoryHeight();
};
this.availableDirectoryHeight();
window.onresize = () => {
this.availableDirectoryHeight();
};
Expand Down
Loading

0 comments on commit 9a558f7

Please sign in to comment.