diff --git a/hw-ui/src/permission.js b/hw-ui/src/permission.js
index 459ce6d2..91296461 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 8adb1b65..59b3e9b9 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 1b82f704..257c48a0 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 60b48e82..e229a2f3 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 c86ef2cc..a8975398 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 2e6e11be..fcf4aef7 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 ab0cd8c4..7dde0e62 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 => {