修改生产界面

master
夜笙歌 7 months ago
parent d9b46d7a98
commit 545077ea29

@ -13,6 +13,10 @@ const whiteList = ['/login', '/login2', '/register']
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
NProgress.start() NProgress.start()
if (getToken()) { if (getToken()) {
let floorData = JSON.parse(sessionStorage.getItem('FLOORDATA') || '{}')
if(floorData?.route && to.fullPath !== floorData?.route){
next({ path: floorData?.route })
}
to.meta.title && store.dispatch('settings/setTitle', to.meta.title) to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
/* has token*/ /* has token*/
if (to.path === '/login') { if (to.path === '/login') {

@ -11,6 +11,7 @@ const getters = {
introduction: state => state.user.introduction, introduction: state => state.user.introduction,
roles: state => state.user.roles, roles: state => state.user.roles,
permissions: state => state.user.permissions, permissions: state => state.user.permissions,
floorData: state => state.user.floorData,
permission_routes: state => state.permission.routes, permission_routes: state => state.permission.routes,
topbarRouters:state => state.permission.topbarRouters, topbarRouters:state => state.permission.topbarRouters,
defaultRoutes:state => state.permission.defaultRoutes, defaultRoutes:state => state.permission.defaultRoutes,

@ -188,7 +188,7 @@
<el-button type="primary">首页</el-button> <el-button type="primary">首页</el-button>
<!-- <el-button type="success" @click="getMaterialsModel = true">条码打印</el-button>--> <!-- <el-button type="success" @click="getMaterialsModel = true">条码打印</el-button>-->
<el-button type="info">SOP预览</el-button> <el-button type="info">SOP预览</el-button>
<el-button type="danger">退出</el-button> <el-button type="danger" @click="logout">退</el-button>
</el-row> </el-row>
</div> </div>
@ -578,6 +578,18 @@ export default {
}) })
}, },
methods: { methods: {
async logout() {
this.$confirm('确定注销并退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = '/login?isStationId=true';
})
}).catch(() => {});
},
next1() { next1() {
this.nowNum1 += 1 this.nowNum1 += 1
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => { getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {

@ -371,7 +371,7 @@
<el-button type="primary">首页</el-button> <el-button type="primary">首页</el-button>
<el-button type="success">SOP预览</el-button> <el-button type="success">SOP预览</el-button>
<el-button type="info">最小化</el-button> <el-button type="info">最小化</el-button>
<el-button type="danger">退出</el-button> <el-button type="danger" @click="logout">退</el-button>
</el-row> </el-row>
</div> </div>
@ -684,6 +684,18 @@ export default {
}) })
}, },
methods: { methods: {
async logout() {
this.$confirm('确定注销并退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = '/login?isStationId=true';
})
}).catch(() => {});
},
next1() { next1() {
this.nowNum1 += 1 this.nowNum1 += 1
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => { getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {

@ -209,7 +209,7 @@
<el-button type="primary">首页</el-button> <el-button type="primary">首页</el-button>
<el-button type="success">键盘</el-button> <el-button type="success">键盘</el-button>
<el-button type="info">最小化</el-button> <el-button type="info">最小化</el-button>
<el-button type="danger">退出</el-button> <el-button type="danger" @click="logout">退</el-button>
</el-row> </el-row>
</div> </div>
@ -520,6 +520,18 @@ export default {
}) })
}, },
methods: { methods: {
async logout() {
this.$confirm('确定注销并退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = '/login?isStationId=true';
})
}).catch(() => {});
},
next1() { next1() {
this.nowNum1 += 1 this.nowNum1 += 1
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => { getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {

@ -188,7 +188,7 @@
<el-button type="primary">首页</el-button> <el-button type="primary">首页</el-button>
<el-button type="success" @click="handleRawInstock"></el-button> <el-button type="success" @click="handleRawInstock"></el-button>
<el-button type="info">SOP预览</el-button> <el-button type="info">SOP预览</el-button>
<el-button type="danger">退出</el-button> <el-button type="danger" @click="logout">退</el-button>
</el-row> </el-row>
</div> </div>
@ -450,6 +450,18 @@ export default {
}) })
}, },
methods: { methods: {
async logout() {
this.$confirm('确定注销并退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = '/login?isStationId=true';
})
}).catch(() => {});
},
next1() { next1() {
this.nowNum1 += 1 this.nowNum1 += 1
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => { getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {

@ -158,7 +158,7 @@
<el-row> <el-row>
<el-button type="primary">首页</el-button> <el-button type="primary">首页</el-button>
<el-button type="info">SOP预览</el-button> <el-button type="info">SOP预览</el-button>
<el-button type="danger">退出</el-button> <el-button type="danger" @click="logout">退</el-button>
</el-row> </el-row>
</div> </div>
@ -372,6 +372,18 @@ export default {
}) })
}, },
methods: { methods: {
async logout() {
this.$confirm('确定注销并退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = '/login?isStationId=true';
})
}).catch(() => {});
},
next1() { next1() {
this.nowNum1 += 1 this.nowNum1 += 1
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => { getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {

Loading…
Cancel
Save