Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
temple_material_request
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2024-09-06 14:19:41 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3c229504c4673bdaaa18588988ecd512b715c870
3c229504
1 parent
2f7177b5
✨ feat(物资列表): 根据登录账号默认选中相关组别
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
src/views/material_list.vue
src/views/material_list.vue
View file @
3c22950
<!--
* @Date: 2024-07-23 10:50:38
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-0
8-03 13:29:35
* @LastEditTime: 2024-0
9-06 14:18:22
* @FilePath: /temple_material_request/src/views/material_list.vue
* @Description: 物资情况页面
-->
...
...
@@ -76,7 +76,15 @@ onMounted(async () => {
const { data, code } = await getActivityDeptsAPI({ activity_id, is_previous: 0, only_my_dept: 0 });
if (code) {
tabList.value = data;
if (tabList.value.length) { // 默认选中组别ID
if (tabList.value.length) {
// 默认选中组别ID
tabList.value.forEach((item, index) => {
if (item.is_my_dept) { // 指定组别
dept_id.value = tabList.value[index]['dept_id'];
active.value = index;
}
});
// 没有指定的组别,默认选中第一个
dept_id.value = tabList.value[0]['dept_id'];
}
}
...
...
Please
register
or
login
to post a comment