From 32dbb3c2f3165e008a805eae0cea16318a1a2c6e Mon Sep 17 00:00:00 2001 From: liaoboping <344114999@qq.com> Date: Sun, 21 Sep 2025 18:04:40 +0800 Subject: [PATCH] coding --- src/permission.js | 20 +++++++++---------- src/utils/request.js | 10 +++++----- .../simulationScene/database/bzhjsjk.vue | 2 +- src/views/subsystem/control/index.vue | 13 +++++++----- src/views/subsystem/display/index.vue | 4 +++- src/views/subsystem/model/index.vue | 2 +- vue.config.js | 11 ++++++++-- 7 files changed, 37 insertions(+), 25 deletions(-) diff --git a/src/permission.js b/src/permission.js index c075635..b0ba92c 100644 --- a/src/permission.js +++ b/src/permission.js @@ -58,11 +58,11 @@ router.beforeEach((to, from, next) => { }) // 失败时,获取用户信息失败时,调用登出,来清空历史保留信息 store.dispatch('Logout').then(() => { - if (process.env.NODE_ENV === 'production') { - openThirdLogin() - } else { - next({ path: loginRoutePath, query: { redirect: to.fullPath } }) - } + // if (process.env.NODE_ENV === 'production') { + // openThirdLogin() + // } else { + next({ path: loginRoutePath, query: { redirect: to.fullPath } }) + // } }) }) } else { @@ -74,11 +74,11 @@ router.beforeEach((to, from, next) => { // 在免登录名单,直接进入 next() } else { - if (process.env.NODE_ENV === 'production') { - openThirdLogin() - } else { - next({ path: loginRoutePath, query: { redirect: to.fullPath } }) - } + // if (process.env.NODE_ENV === 'production') { + // openThirdLogin() + // } else { + next({ path: loginRoutePath, query: { redirect: to.fullPath } }) + // } NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it } } diff --git a/src/utils/request.js b/src/utils/request.js index 68278c2..ec63cf6 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -35,11 +35,11 @@ const errorHandler = (error) => { if (token) { store.dispatch('Logout').then(() => { setTimeout(() => { - if (process.env.NODE_ENV === 'production') { - openThirdLogin() - } else { - window.location.reload() - } + // if (process.env.NODE_ENV === 'production') { + // openThirdLogin() + // } else { + window.location.reload() + // } }, 1500) }) } diff --git a/src/views/simulationScene/database/bzhjsjk.vue b/src/views/simulationScene/database/bzhjsjk.vue index bd63c50..e3179cd 100644 --- a/src/views/simulationScene/database/bzhjsjk.vue +++ b/src/views/simulationScene/database/bzhjsjk.vue @@ -111,7 +111,7 @@ export default { this.$http({ url: `/baseData/weatherResource/list`, method: 'get', - params: { id: this.xd.selectedKeys[0], ...queryParams }, + params: { scenarioId: this.xd.selectedKeys[0], ...queryParams }, }), columns: [ { dataIndex: 'serial' }, diff --git a/src/views/subsystem/control/index.vue b/src/views/subsystem/control/index.vue index f11dd34..3967f4a 100644 --- a/src/views/subsystem/control/index.vue +++ b/src/views/subsystem/control/index.vue @@ -95,7 +95,7 @@ v-else type="text" class="room-control-btn flex ai-c" - :disabled="!(controlable && able3)" + :disabled="!(controlable && able4)" @click="handleContinue" > @@ -104,7 +104,7 @@ @@ -113,7 +113,7 @@ @@ -203,15 +203,18 @@ export default { return this.detail.data.mag > 1 }, able2() { - return this.detail.data.status !== 1 + return this.detail.data.status === 0 || this.detail.data.status === 3 }, able3() { return this.detail.data.status === 1 }, able4() { - return this.detail.data.status === 1 + return this.detail.data.status === 2 }, able5() { + return this.detail.data.status === 1 || this.detail.data.status === 2 + }, + able6() { return this.detail.data.mag < 64 }, }, diff --git a/src/views/subsystem/display/index.vue b/src/views/subsystem/display/index.vue index 3932998..390c62a 100644 --- a/src/views/subsystem/display/index.vue +++ b/src/views/subsystem/display/index.vue @@ -47,6 +47,8 @@