This commit is contained in:
liaoboping 2025-09-21 18:04:40 +08:00
parent b19300f65e
commit 32dbb3c2f3
7 changed files with 37 additions and 25 deletions

View File

@ -58,11 +58,11 @@ router.beforeEach((to, from, next) => {
}) })
// 失败时,获取用户信息失败时,调用登出,来清空历史保留信息 // 失败时,获取用户信息失败时,调用登出,来清空历史保留信息
store.dispatch('Logout').then(() => { store.dispatch('Logout').then(() => {
if (process.env.NODE_ENV === 'production') { // if (process.env.NODE_ENV === 'production') {
openThirdLogin() // openThirdLogin()
} else { // } else {
next({ path: loginRoutePath, query: { redirect: to.fullPath } }) next({ path: loginRoutePath, query: { redirect: to.fullPath } })
} // }
}) })
}) })
} else { } else {
@ -74,11 +74,11 @@ router.beforeEach((to, from, next) => {
// 在免登录名单,直接进入 // 在免登录名单,直接进入
next() next()
} else { } else {
if (process.env.NODE_ENV === 'production') { // if (process.env.NODE_ENV === 'production') {
openThirdLogin() // openThirdLogin()
} else { // } else {
next({ path: loginRoutePath, query: { redirect: to.fullPath } }) next({ path: loginRoutePath, query: { redirect: to.fullPath } })
} // }
NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it
} }
} }

View File

@ -35,11 +35,11 @@ const errorHandler = (error) => {
if (token) { if (token) {
store.dispatch('Logout').then(() => { store.dispatch('Logout').then(() => {
setTimeout(() => { setTimeout(() => {
if (process.env.NODE_ENV === 'production') { // if (process.env.NODE_ENV === 'production') {
openThirdLogin() // openThirdLogin()
} else { // } else {
window.location.reload() window.location.reload()
} // }
}, 1500) }, 1500)
}) })
} }

View File

@ -111,7 +111,7 @@ export default {
this.$http({ this.$http({
url: `/baseData/weatherResource/list`, url: `/baseData/weatherResource/list`,
method: 'get', method: 'get',
params: { id: this.xd.selectedKeys[0], ...queryParams }, params: { scenarioId: this.xd.selectedKeys[0], ...queryParams },
}), }),
columns: [ columns: [
{ dataIndex: 'serial' }, { dataIndex: 'serial' },

View File

@ -95,7 +95,7 @@
v-else v-else
type="text" type="text"
class="room-control-btn flex ai-c" class="room-control-btn flex ai-c"
:disabled="!(controlable && able3)" :disabled="!(controlable && able4)"
@click="handleContinue" @click="handleContinue"
> >
<img src="~@/assets/images/control/u155.png" alt="" /> <img src="~@/assets/images/control/u155.png" alt="" />
@ -104,7 +104,7 @@
<a-button <a-button
type="text" type="text"
class="room-control-btn flex ai-c" class="room-control-btn flex ai-c"
:disabled="!(controlable && able4)" :disabled="!(controlable && able5)"
@click="handleTermination" @click="handleTermination"
> >
<img src="~@/assets/images/control/u163.png" alt="" /> <img src="~@/assets/images/control/u163.png" alt="" />
@ -113,7 +113,7 @@
<a-button <a-button
type="text" type="text"
class="room-control-btn flex ai-c" class="room-control-btn flex ai-c"
:disabled="!(controlable && able5)" :disabled="!(controlable && able6)"
@click="handleAccelerate" @click="handleAccelerate"
> >
<img src="~@/assets/images/control/u159.png" alt="" /> <img src="~@/assets/images/control/u159.png" alt="" />
@ -203,15 +203,18 @@ export default {
return this.detail.data.mag > 1 return this.detail.data.mag > 1
}, },
able2() { able2() {
return this.detail.data.status !== 1 return this.detail.data.status === 0 || this.detail.data.status === 3
}, },
able3() { able3() {
return this.detail.data.status === 1 return this.detail.data.status === 1
}, },
able4() { able4() {
return this.detail.data.status === 1 return this.detail.data.status === 2
}, },
able5() { able5() {
return this.detail.data.status === 1 || this.detail.data.status === 2
},
able6() {
return this.detail.data.mag < 64 return this.detail.data.mag < 64
}, },
}, },

View File

@ -47,6 +47,8 @@
</template> </template>
<script> <script>
import { getAction } from '@/api/manage'
export default { export default {
name: 'SubsystemDisplay', name: 'SubsystemDisplay',
data() { data() {
@ -186,7 +188,7 @@ export default {
initPlots() { initPlots() {
this.roomInfo.roomData.forEach((item) => { this.roomInfo.roomData.forEach((item) => {
if (item.sdzy.lng && item.sdzy.lat) { if (item.sdzy.lng && item.sdzy.lat) {
this.cesium.addPlotByLonLat(item.imgBase64, { lon: +item.sdzy.lng, lat: +item.sdzy.lat }, item.sdzy.id) this.cesium.addPlotByLonLat(item.sdzy.imgBase64, { lon: +item.sdzy.lng, lat: +item.sdzy.lat }, item.sdzy.id)
} }
}) })
}, },

View File

@ -406,7 +406,7 @@ export default {
initPlots() { initPlots() {
this.roomInfo.roomData.forEach((item) => { this.roomInfo.roomData.forEach((item) => {
if (item.sdzy.lng && item.sdzy.lat) { if (item.sdzy.lng && item.sdzy.lat) {
this.cesium.addPlotByLonLat(item.imgBase64, { lon: +item.sdzy.lng, lat: +item.sdzy.lat }, item.sdzy.id) this.cesium.addPlotByLonLat(item.sdzy.imgBase64, { lon: +item.sdzy.lng, lat: +item.sdzy.lat }, item.sdzy.id)
} }
}) })
}, },

View File

@ -111,7 +111,7 @@ const vueConfig = {
devServer: { devServer: {
// development server port 8000 // development server port 8000
port, port,
public: os.networkInterfaces().以太网?.slice(-1)[0].address + ':' + port, public: (os.networkInterfaces().以太网 || os.networkInterfaces().WLAN)?.slice(-1)[0].address + ':' + port,
// If you want to turn on the proxy, please remove the mockjs /src/main.jsL11 // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
proxy: { proxy: {
'/api': { '/api': {
@ -137,7 +137,14 @@ const vueConfig = {
// disable source map in production // disable source map in production
productionSourceMap: false, productionSourceMap: false,
// babel-loader no-ignore node_modules/* // babel-loader no-ignore node_modules/*
transpileDependencies: ['@cesium/widgets', '@cesium/engine', 'mermaid', '@mermaid-js/parser', '@iconify/utils', 'marked'], transpileDependencies: [
'@cesium/widgets',
'@cesium/engine',
'mermaid',
'@mermaid-js/parser',
'@iconify/utils',
'marked',
],
} }
// preview.pro.loacg.com only do not use in your production; // preview.pro.loacg.com only do not use in your production;