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