vuex
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<view class="userInfo-wrap">
|
||||
<view class="userInfo">
|
||||
<text class="p1">{{userName}}</text>
|
||||
<text class="p2">欢迎进入海亮手持系统!</text>
|
||||
<text class="p2">欢迎进入海亮三线手持LMS系统!</text>
|
||||
</view>
|
||||
<view class="exit" @tap="Quit">
|
||||
<view class="icon-exit"></view>
|
||||
@@ -35,19 +35,23 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {authority} from '@/utils/getData2.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userName: this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).username : '',
|
||||
menuList: [],
|
||||
menuList: [
|
||||
{menu_id: '1', icon: 'RF06', name: '仓储管理', sonTree: [
|
||||
{menu_id: '1', name: '半成品入库', path: '/pages/modules/SemifinishedInStore'},
|
||||
{menu_id: '2', name: '半成品出库', path: '/pages/modules/SemifinishedOutStore'},
|
||||
{menu_id: '3', name: '空箱出库', path: '/pages/modules/EmptyOutStore'}
|
||||
]}
|
||||
],
|
||||
show: false,
|
||||
secM: []
|
||||
};
|
||||
},
|
||||
created () {
|
||||
this._authority()
|
||||
this.$store.dispatch('publicObj', '')
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
},
|
||||
methods: {
|
||||
async _authority () {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="zd_content bg">
|
||||
<view class="p1">欢迎来到</view>
|
||||
<view class="p2">海亮手持系统!</view>
|
||||
<view class="p2">海亮三线手持LMS系统!</view>
|
||||
<view class="input-box">
|
||||
<input class="large-input" type="text" placeholder="请输入用户名" v-model="user">
|
||||
</view>
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
}
|
||||
},
|
||||
destroyed () {
|
||||
this.$store.dispatch('publicObj', '')
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
},
|
||||
created () {
|
||||
this._getWork()
|
||||
@@ -150,7 +150,7 @@
|
||||
this.sale_id = ''
|
||||
this.index = ''
|
||||
this.bar_code = ''
|
||||
this.$store.dispatch('publicObj', '')
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,13 +64,11 @@ export const handRequest = () => request({
|
||||
export const authority = () => {
|
||||
let res = {
|
||||
sonTree: [
|
||||
// {menu_id: '5', icon: 'RF04', name: '设备点检', path: '/pages/modules/equip-inspection', sonTree: []}
|
||||
{menu_id: '1', icon: 'RF06', name: '仓储管理', sonTree: [
|
||||
{menu_id: '1', name: '半成品入库', path: '/pages/modules/SemifinishedInStore'},
|
||||
{menu_id: '2', name: '半成品出库', path: '/pages/modules/SemifinishedOutStore'},
|
||||
{menu_id: '3', name: '空箱出库', path: '/pages/modules/EmptyOutStore'}
|
||||
]},
|
||||
{menu_id: '2', icon: 'RF01', name: '生产管理', path: '', sonTree: []}
|
||||
]}
|
||||
]
|
||||
}
|
||||
return res
|
||||
|
||||
@@ -2,11 +2,13 @@ import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
|
||||
import user from './modules/user'
|
||||
import data from './modules/data'
|
||||
|
||||
Vue.use(Vuex)
|
||||
|
||||
export default new Vuex.Store({
|
||||
modules: {
|
||||
user
|
||||
user,
|
||||
data
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user