diff --git a/hw-ui/src/permission.js b/hw-ui/src/permission.js
index 459ce6d..9129646 100644
--- a/hw-ui/src/permission.js
+++ b/hw-ui/src/permission.js
@@ -13,6 +13,10 @@ const whiteList = ['/login', '/login2', '/register']
router.beforeEach((to, from, next) => {
NProgress.start()
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)
/* has token*/
if (to.path === '/login') {
diff --git a/hw-ui/src/store/getters.js b/hw-ui/src/store/getters.js
index 8adb1b6..59b3e9b 100644
--- a/hw-ui/src/store/getters.js
+++ b/hw-ui/src/store/getters.js
@@ -11,6 +11,7 @@ const getters = {
introduction: state => state.user.introduction,
roles: state => state.user.roles,
permissions: state => state.user.permissions,
+ floorData: state => state.user.floorData,
permission_routes: state => state.permission.routes,
topbarRouters:state => state.permission.topbarRouters,
defaultRoutes:state => state.permission.defaultRoutes,
diff --git a/hw-ui/src/views/board/fifthFloor/index.vue b/hw-ui/src/views/board/fifthFloor/index.vue
index 1b82f70..257c48a 100644
--- a/hw-ui/src/views/board/fifthFloor/index.vue
+++ b/hw-ui/src/views/board/fifthFloor/index.vue
@@ -188,7 +188,7 @@
首页
SOP预览
- 退出
+ 退出
@@ -578,6 +578,18 @@ export default {
})
},
methods: {
+
+ async logout() {
+ this.$confirm('确定注销并退出系统吗?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ this.$store.dispatch('LogOut').then(() => {
+ location.href = '/login?isStationId=true';
+ })
+ }).catch(() => {});
+ },
next1() {
this.nowNum1 += 1
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {
diff --git a/hw-ui/src/views/board/firstFloor/index.vue b/hw-ui/src/views/board/firstFloor/index.vue
index 60b48e8..e229a2f 100644
--- a/hw-ui/src/views/board/firstFloor/index.vue
+++ b/hw-ui/src/views/board/firstFloor/index.vue
@@ -371,7 +371,7 @@
首页
SOP预览
最小化
- 退出
+ 退出
@@ -684,6 +684,18 @@ export default {
})
},
methods: {
+
+ async logout() {
+ this.$confirm('确定注销并退出系统吗?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ this.$store.dispatch('LogOut').then(() => {
+ location.href = '/login?isStationId=true';
+ })
+ }).catch(() => {});
+ },
next1() {
this.nowNum1 += 1
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {
diff --git a/hw-ui/src/views/board/fourthFloor/assemble.vue b/hw-ui/src/views/board/fourthFloor/assemble.vue
index c86ef2c..a897539 100644
--- a/hw-ui/src/views/board/fourthFloor/assemble.vue
+++ b/hw-ui/src/views/board/fourthFloor/assemble.vue
@@ -209,7 +209,7 @@
首页
键盘
最小化
- 退出
+ 退出
@@ -520,6 +520,18 @@ export default {
})
},
methods: {
+
+ async logout() {
+ this.$confirm('确定注销并退出系统吗?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ this.$store.dispatch('LogOut').then(() => {
+ location.href = '/login?isStationId=true';
+ })
+ }).catch(() => {});
+ },
next1() {
this.nowNum1 += 1
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {
diff --git a/hw-ui/src/views/board/fourthFloor/laserLight.vue b/hw-ui/src/views/board/fourthFloor/laserLight.vue
index 2e6e11b..fcf4aef 100644
--- a/hw-ui/src/views/board/fourthFloor/laserLight.vue
+++ b/hw-ui/src/views/board/fourthFloor/laserLight.vue
@@ -188,7 +188,7 @@
首页
板材入库
SOP预览
- 退出
+ 退出
@@ -450,6 +450,18 @@ export default {
})
},
methods: {
+
+ async logout() {
+ this.$confirm('确定注销并退出系统吗?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ this.$store.dispatch('LogOut').then(() => {
+ location.href = '/login?isStationId=true';
+ })
+ }).catch(() => {});
+ },
next1() {
this.nowNum1 += 1
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {
diff --git a/hw-ui/src/views/board/fourthFloor/weld.vue b/hw-ui/src/views/board/fourthFloor/weld.vue
index ab0cd8c..7dde0e6 100644
--- a/hw-ui/src/views/board/fourthFloor/weld.vue
+++ b/hw-ui/src/views/board/fourthFloor/weld.vue
@@ -158,7 +158,7 @@
首页
SOP预览
- 退出
+ 退出
@@ -372,6 +372,18 @@ export default {
})
},
methods: {
+
+ async logout() {
+ this.$confirm('确定注销并退出系统吗?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ this.$store.dispatch('LogOut').then(() => {
+ location.href = '/login?isStationId=true';
+ })
+ }).catch(() => {});
+ },
next1() {
this.nowNum1 += 1
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {