feat: 新增二级菜单子导航系统(SubNav + redirectMenu)
- 新增 SubNav 组件:Navbar 下方水平子导航条,展示当前二级菜单下的三级页面,支持滚动和下拉分组 - 新增 redirectMenu 页面:点击二级菜单时卡片式展示子页面列表 - SidebarItem 深度 >=1 时改为叶子节点渲染(小圆点标记),激活高亮回退到二级菜单 - Navbar 布局重构为 Flexbox,面包屑/SubNav 根据场景切换 - 新增 productionLine Vuex 模块,轧辊研磨页改为 store 方式读取产线数据 - Sidebar activeMenu 逻辑增强:自动定位当前页所属二级菜单
This commit is contained in:
@@ -23,5 +23,6 @@ const getters = {
|
||||
bomMap: state => state.category.bomMap,
|
||||
financialAccounts: state => state.finance.financialAccounts,
|
||||
processList: state => state.craft.processList,
|
||||
productionLines: state => state.productionLine.productionLines,
|
||||
}
|
||||
export default getters
|
||||
|
||||
@@ -9,6 +9,7 @@ import settings from './modules/settings'
|
||||
import category from './modules/category'
|
||||
import finance from './modules/finance'
|
||||
import craft from './modules/craft'
|
||||
import productionLine from './modules/productionLine'
|
||||
import getters from './getters'
|
||||
|
||||
Vue.use(Vuex)
|
||||
@@ -23,7 +24,8 @@ const store = new Vuex.Store({
|
||||
settings,
|
||||
category,
|
||||
finance,
|
||||
craft
|
||||
craft,
|
||||
productionLine
|
||||
},
|
||||
getters
|
||||
})
|
||||
|
||||
27
klp-ui/src/store/modules/productionLine.js
Normal file
27
klp-ui/src/store/modules/productionLine.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import { listProductionLine } from "@/api/wms/productionLine";
|
||||
|
||||
const state = {
|
||||
productionLines: [],
|
||||
}
|
||||
|
||||
const mutations = {
|
||||
SET_PRODUCTION_LINES(state, list) {
|
||||
state.productionLines = list;
|
||||
},
|
||||
}
|
||||
|
||||
const actions = {
|
||||
getProductionLines({ commit, state }) {
|
||||
if (state.productionLines.length > 0) return Promise.resolve()
|
||||
return listProductionLine({ pageNum: 1, pageSize: 100 }).then(response => {
|
||||
commit('SET_PRODUCTION_LINES', response.rows || []);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
mutations,
|
||||
actions
|
||||
}
|
||||
Reference in New Issue
Block a user