You need to sign in or sign up before continuing.
hookehuyr

fix 默认获取物资逻辑顺序修复

<!--
* @Date: 2024-07-23 10:50:38
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-09-06 14:18:22
* @LastEditTime: 2024-09-12 13:14:50
* @FilePath: /temple_material_request/src/views/material_list.vue
* @Description: 物资情况页面
-->
......@@ -77,6 +77,8 @@ onMounted(async () => {
if (code) {
tabList.value = data;
if (tabList.value.length) {
// 没有指定的组别,默认选中第一个
dept_id.value = tabList.value[0]['dept_id'];
// 默认选中组别ID
tabList.value.forEach((item, index) => {
if (item.is_my_dept) { // 指定组别
......@@ -84,8 +86,6 @@ onMounted(async () => {
active.value = index;
}
});
// 没有指定的组别,默认选中第一个
dept_id.value = tabList.value[0]['dept_id'];
}
}
});
......