diff --git a/src/images/icon/RF13.png b/src/images/icon/RF13.png index 30c871f..4a8c05b 100644 Binary files a/src/images/icon/RF13.png and b/src/images/icon/RF13.png differ diff --git a/src/images/icon/RF14.png b/src/images/icon/RF14.png new file mode 100644 index 0000000..a6b7439 Binary files /dev/null and b/src/images/icon/RF14.png differ diff --git a/src/images/icon/RF15.png b/src/images/icon/RF15.png new file mode 100644 index 0000000..30c871f Binary files /dev/null and b/src/images/icon/RF15.png differ diff --git a/src/images/icon/RF16.png b/src/images/icon/RF16.png new file mode 100644 index 0000000..e18e35a Binary files /dev/null and b/src/images/icon/RF16.png differ diff --git a/src/images/icon/RF17.png b/src/images/icon/RF17.png new file mode 100644 index 0000000..ee6ef08 Binary files /dev/null and b/src/images/icon/RF17.png differ diff --git a/src/images/icon/RF8.png b/src/images/icon/RF8.png index 44fa467..796026f 100644 Binary files a/src/images/icon/RF8.png and b/src/images/icon/RF8.png differ diff --git a/src/images/icon/RF9.png b/src/images/icon/RF9.png index 796026f..44fa467 100644 Binary files a/src/images/icon/RF9.png and b/src/images/icon/RF9.png differ diff --git a/src/pages/login/Home.vue b/src/pages/login/Home.vue index a3d95f2..1e819fb 100644 --- a/src/pages/login/Home.vue +++ b/src/pages/login/Home.vue @@ -53,33 +53,33 @@ export default { name: 'Home', data () { return { - tab: 1, - menu: [], + tab: Number(this.$store.getters.navTab), menuList: { menu1: [{title: '指令管理', path: 'zlmanage', icon: 'RF1'}, {title: '任务管理', path: 'taskmanage', icon: 'RF2'}, {title: '不合格品上报', path: 'belowgradereport', icon: 'RF3'}, {title: '送料', path: 'sendmater', icon: 'RF4'}, {title: '叫料', path: 'callmater', icon: 'RF5'}, {title: '送空', path: 'sendempty', icon: 'RF6'}, {title: '叫空', path: 'callempty', icon: 'RF7'}, {title: '困料管理', path: 'KunliaoManage', icon: 'RF8'}, {title: '入窑管理', path: 'RuyaoManage', icon: 'RF9'}, {title: '载具绑定', path: 'VehicleBind', icon: 'RF10'}, {title: '载具解绑', path: 'VehicleUnbind', icon: 'RF11'}, {title: '呼叫次品料', path: 'CallDefective', icon: 'RF12'}, {title: 'AGV充电', path: 'CreateChargingTask', icon: 'RF13'}], - menu2: [{title: '', path: ''}, {title: '', path: ''}, {title: '', path: ''}, {title: '', path: ''}, {title: '', path: ''}, {title: '', path: ''}, {title: '', path: ''}, {title: '', path: ''}, {title: '', path: ''}, {title: '', path: ''}, {title: '', path: ''}, {title: '', path: ''}, {title: '', path: ''}] + menu2: [{title: '人工异常处理', path: 'ExceptionHand', icon: 'RF14'}, {title: '人工混碾搬运', path: 'MixMove', icon: 'RF15'}, {title: '压机料盅转移', path: 'LzTransfer', icon: 'RF16'}, {title: '上料', path: 'Suppress', icon: 'RF8'}, {title: '下料', path: 'SuppressDown', icon: 'RF9'}, {title: '人工出窑', path: 'KilnOut', icon: 'RF4'}, {title: '载具转移', path: 'KilnMove', icon: 'RF17'}, {title: '料盅退料', path: 'MaterReturn', icon: 'RF6'}, {title: '取样计数', path: 'SamplingCount', icon: 'RF1'}] } } }, - mounted () { - this.menu = [...this.menuList.menu1] + computed: { + menu () { + if (this.tab === 2) { + return [...this.menuList.menu2] + } else { + return [...this.menuList.menu1] + } + } }, methods: { changeTab (type) { - if (type === 1) { - this.menu = [...this.menuList.menu1] - this.tab = 1 - } else { - this.menu = [...this.menuList.menu2] - this.tab = 2 - } - // this.$store.dispatch('setNavTab', type) + this.tab = type + this.$store.dispatch('setNavTab', type) }, toPage (e) { this.$router.push(`/${e.path}`) }, Quit () { this.$store.dispatch('setSignOut') + this.$store.dispatch('setNavTab', 1) this.$router.push('/login') }, goInner (path) { diff --git a/src/router/index.js b/src/router/index.js index fbd3f2d..425f69b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -18,6 +18,16 @@ const VehicleBind = r => require.ensure([], () => r(require('../pages/proj/Vehic const VehicleUnbind = r => require.ensure([], () => r(require('../pages/proj/VehicleUnbind')), 'VehicleUnbind') const CallDefective = r => require.ensure([], () => r(require('../pages/proj/CallDefective')), 'CallDefective') const CreateChargingTask = r => require.ensure([], () => r(require('../pages/proj/CreateChargingTask')), 'CreateChargingTask') +// manual +const ExceptionHand = r => require.ensure([], () => r(require('../pages/manual/ExceptionHand')), 'ExceptionHand') +const MixMove = r => require.ensure([], () => r(require('../pages/manual/MixMove')), 'MixMove') +const LzTransfer = r => require.ensure([], () => r(require('../pages/manual/LzTransfer')), 'MixMove') +const Suppress = r => require.ensure([], () => r(require('../pages/manual/Suppress')), 'Suppress') +const SuppressDown = r => require.ensure([], () => r(require('../pages/manual/SuppressDown')), 'SuppressDown') +const KilnOut = r => require.ensure([], () => r(require('../pages/manual/KilnOut')), 'KilnOut') +const KilnMove = r => require.ensure([], () => r(require('../pages/manual/KilnMove')), 'KilnMove') +const MaterReturn = r => require.ensure([], () => r(require('../pages/manual/MaterReturn')), 'MaterReturn') +const SamplingCount = r => require.ensure([], () => r(require('../pages/manual/SamplingCount')), 'SamplingCount') Vue.use(Router) @@ -97,6 +107,42 @@ export default new Router({ { path: '/CreateChargingTask', // AGV充电 component: CreateChargingTask + }, + { + path: '/ExceptionHand', // 人工异常处理 + component: ExceptionHand + }, + { + path: '/MixMove', // 人工混碾搬运 + component: MixMove + }, + { + path: '/LzTransfer', // 压机料盅转移 + component: LzTransfer + }, + { + path: '/Suppress', // 人工压制上料 + component: Suppress + }, + { + path: '/SuppressDown', // 人工压制下料 + component: SuppressDown + }, + { + path: '/KilnOut', // 人工出窑 + component: KilnOut + }, + { + path: '/KilnMove', // 载具转移 + component: KilnMove + }, + { + path: '/MaterReturn', // 料盅退料 + component: MaterReturn + }, + { + path: '/SamplingCount', // 取样计数 + component: SamplingCount } ], scrollBehavior (to, from, savedPosition) { diff --git a/src/vuex/modules/data.js b/src/vuex/modules/data.js index 7d16639..b7a3cf4 100644 --- a/src/vuex/modules/data.js +++ b/src/vuex/modules/data.js @@ -1,16 +1,18 @@ import * as types from '../types' -// import { getStore, setStore } from '@config/mUtils.js' +import { getStore, setStore } from '@config/mUtils.js' const state = { receiveMaterObj: {}, // 物料收货 - 欠料查看 receivePlateArr: [], // 收货组盘 - 添加物料 - keepAlive: [] // 缓存页面 + keepAlive: [], // 缓存页面 + navTab: getStore('navTab') || 1 // 导航栏选项卡 } const getters = { receiveMaterObj: state => state.receiveMaterObj, receivePlateArr: state => state.receivePlateArr, - keepAlive: state => state.keepAlive + keepAlive: state => state.keepAlive, + navTab: state => state.navTab } const actions = { @@ -22,6 +24,10 @@ const actions = { }, setKeepAlive ({commit}, res) { commit(types.SET_KEEP_ALIVE, res) + }, + setNavTab ({commit}, res) { + setStore('navTab', res) + commit(types.SET_NAV_TAB, res) } } @@ -34,6 +40,9 @@ const mutations = { }, [types.SET_KEEP_ALIVE] (state, res) { state.keepAlive = res + }, + [types.SET_NAV_TAB] (state, res) { + state.navTab = res } } diff --git a/src/vuex/types.js b/src/vuex/types.js index a4182f1..44c637b 100644 --- a/src/vuex/types.js +++ b/src/vuex/types.js @@ -23,3 +23,4 @@ export const RECEIVE_MATER_OBJ = 'RECEIVE_MATER_OBJ' export const RECEIVE_PLATE_ARR = 'RECEIVE_PLATE_ARR' // 缓存页面 export const SET_KEEP_ALIVE = 'SET_KEEP_ALIVE' +export const SET_NAV_TAB = 'SET_NAV_TAB'