From ce8d3f4531d4c2ab8da0637dd750a716423cd75b Mon Sep 17 00:00:00 2001 From: fan Date: Fri, 19 Apr 2024 22:25:43 +0800 Subject: [PATCH] =?UTF-8?q?iscs=E9=80=80=E5=87=BA=E4=BB=BF=E7=9C=9F?= =?UTF-8?q?=E8=B0=83=E6=95=B4&iscs=E7=BB=98=E5=88=B6=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/iscs/iscsDesign/demonList.vue | 2 +- src/views/iscs/iscsSystem/stationNav.vue | 13 ++++++---- src/views/iscs/iscsSystemNew/stationNav.vue | 27 +++++++++++---------- 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/src/views/iscs/iscsDesign/demonList.vue b/src/views/iscs/iscsDesign/demonList.vue index 2f84b5a9e..d82adf835 100644 --- a/src/views/iscs/iscsDesign/demonList.vue +++ b/src/views/iscs/iscsDesign/demonList.vue @@ -58,7 +58,7 @@ export default { mapPublishList: [], pageTreeMap: { '01': [], - '49': [ + '63': [ { // 牵引降压混合变电所主接线图 变电所接线图 降压变电所主接线图 解除网图 混合变电所主接线图 name: '电力监控系统', diff --git a/src/views/iscs/iscsSystem/stationNav.vue b/src/views/iscs/iscsSystem/stationNav.vue index ecccb14d1..848e476cc 100644 --- a/src/views/iscs/iscsSystem/stationNav.vue +++ b/src/views/iscs/iscsSystem/stationNav.vue @@ -86,7 +86,7 @@ import { getByGroupStationList } from '@/api/jmap/map'; import { getToken } from '@/utils/auth'; // import { getSessionStorage } from '@/utils/auth'; import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp'; -import { clearSimulation } from '@/api/simulation'; +import { destroySimulationByAdmin } from '@/api/simulation'; import alarmConfig from './stationConfig/dialog/alarm'; import incidentConfig from './stationConfig/dialog/incident'; @@ -492,13 +492,16 @@ export default { this.$store.dispatch('LogOut').then(() => { location.reload(); }); - } else { - clearSimulation(this.$route.query.group).then(resp => { - this.$router.push({ path: `/trainingPlatform` }); + } else if(this.$store.state.training.simulationCreator){ + destroySimulationByAdmin(this.$route.query.group).then(resp => { + history.go(-1); }).catch(()=> { this.$message.error('清除仿真失败!'); }); - } + } else { + history.go(-1); + } + }, quit() { window.close(); diff --git a/src/views/iscs/iscsSystemNew/stationNav.vue b/src/views/iscs/iscsSystemNew/stationNav.vue index 16c45be3d..0976fad6e 100644 --- a/src/views/iscs/iscsSystemNew/stationNav.vue +++ b/src/views/iscs/iscsSystemNew/stationNav.vue @@ -82,6 +82,7 @@ import iscs_icon7 from '@/assets/iscs_system/iscs_icon7.png'; import alarmConfig from './stationConfig/dialog/alarm'; import incidentConfig from './stationConfig/dialog/incident'; import malfunction from './stationConfig/dialog/malfunction'; +import { destroySimulationByAdmin } from '@/api/simulation'; export default { name:'StationNav', components: { @@ -402,19 +403,19 @@ export default { this.$refs.malfunction.doShow('CANCEL'); }, back() { - history.go(-1); - // this.clearSubscribe(); - // if (this.projectDevice) { - // this.$store.dispatch('LogOut').then(() => { - // location.reload(); - // }); - // } else { - // clearSimulation(this.$route.query.group).then(resp => { - // this.$router.push({ path: `/trainingPlatform` }); - // }).catch(()=> { - // this.$message.error('清除仿真失败!'); - // }); - // } + if (this.projectDevice) { + this.$store.dispatch('LogOut').then(() => { + location.reload(); + }); + } else if(this.$store.state.training.simulationCreator){ + destroySimulationByAdmin(this.$route.query.group).then(resp => { + history.go(-1); + }).catch(()=> { + this.$message.error('清除仿真失败!'); + }); + } else { + history.go(-1); + } } } };