故障模式快捷键&ISCS返回(退出)调整
This commit is contained in:
parent
554d2e994f
commit
e94ffd235a
@ -41,3 +41,11 @@ export function deleteIscs(id) {
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
// 查询地图下是否有ISCS数据
|
||||
export function queryHasIscs(params) {
|
||||
return request({
|
||||
url: `/api/v1/iscs/hasData`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ export const keyboardEvents = {
|
||||
ALT_O: {altKey: true, ctrlKey: false, shiftKey: false, event: 'Alt_O'},
|
||||
ALT_E: {altKey: true, ctrlKey: false, shiftKey: false, event: 'Alt_E'},
|
||||
ALT_S: {altKey: true, ctrlKey: false, shiftKey: false, event: 'Alt_S'},
|
||||
ALT_D: {altKey: true, ctrlKey: false, shiftKey: false, event: 'Alt_D'}
|
||||
ALT_D: {altKey: true, ctrlKey: false, shiftKey: false, event: 'Alt_D'},
|
||||
TAB: {altKey: false, ctrlKey: false, shiftKey: false, event: 'Tab'}
|
||||
};
|
||||
|
||||
|
@ -7,12 +7,6 @@ import 'nprogress/nprogress.css';
|
||||
import { getToken, removeToken, getSessionStorage } from '@/utils/auth';
|
||||
import localStore from 'storejs';
|
||||
|
||||
// function hasPermission(roles, permissionRoles) {
|
||||
// if (roles.indexOf(admin) >= 0) return true;
|
||||
// if (!permissionRoles) return true;
|
||||
// return roles.some(role => permissionRoles.indexOf(role) >= 0);
|
||||
// }
|
||||
|
||||
const whiteList = ['/login', '/design/login', '/gzzbxy/relay', '/authorization', '/AUSline', '/AUStool']; // 不重定向白名单
|
||||
|
||||
for (const val in loginInfo) {
|
||||
|
@ -56,7 +56,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-back" @click="back">返回</div>
|
||||
<div v-if="!noPreLogout" class="bottom-back" @click="back">返回</div>
|
||||
<div v-if="noPreLogout" class="bottom-back" @click="quit">退出</div>
|
||||
<!-- :class="{'disable_box': alarmInfo}" -->
|
||||
<div class="bottom-back" @click="handleAlarmInfo">
|
||||
报警
|
||||
@ -308,6 +309,11 @@ export default {
|
||||
manage:{name:'管理', type:'totalSystem', id: 'manage', active:false, icon:iscs_icon9 }
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
noPreLogout() {
|
||||
return this.$route.query.noPreLogout;
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
$route() {
|
||||
const data = Object.values(this.buttonList);
|
||||
@ -453,6 +459,9 @@ export default {
|
||||
this.$message.error('清除仿真失败!');
|
||||
});
|
||||
}
|
||||
},
|
||||
quit() {
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -14,7 +14,7 @@
|
||||
<!-- notScript && -->
|
||||
<el-button v-if="!running" size="small" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
|
||||
</el-button-group>
|
||||
<el-button v-if="!isScheduling" size="small" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式':'切换到故障模式' }}</el-button>
|
||||
<el-button v-if="!isScheduling" size="small" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式[Tab]':'切换到故障模式[Tab]' }}</el-button>
|
||||
<!-- <el-button v-if="!isLocalStation" size="small" :type="faultMode ? 'danger' : ''" @click="changeDirectiveMode()">指令模式</el-button> -->
|
||||
</template>
|
||||
</div>
|
||||
@ -38,6 +38,7 @@ import { getSessionStorage } from '@/utils/auth';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { getIbpInfoByStation } from '@/api/ibp';
|
||||
import { loadRunPlanData } from '@/utils/loaddata';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
// 右上角操作
|
||||
export default {
|
||||
@ -128,6 +129,13 @@ export default {
|
||||
this.viewDisabled = false;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
EventBus.$on('CheckFaultModeEvent', () => {
|
||||
if (!this.isScheduling) {
|
||||
this.changeOperateMode();
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadRunData() {
|
||||
this.$store.dispatch('runPlan/clear').then(() => {
|
||||
|
@ -24,7 +24,7 @@
|
||||
<el-button v-if="running" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
|
||||
<el-button v-if="!running" size="small" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
|
||||
</el-button-group>
|
||||
<el-button v-if="!isScheduling" size="small" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式':'切换到故障模式' }}</el-button>
|
||||
<el-button v-if="!isScheduling" size="small" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式[Tab]':'切换到故障模式[Tab]' }}</el-button>
|
||||
</template>
|
||||
</div>
|
||||
<!-- 菜单按钮列表 -->
|
||||
@ -133,6 +133,11 @@ export default {
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
EventBus.$on('CheckFaultModeEvent', () => {
|
||||
if (!this.isScheduling) {
|
||||
this.changeOperateMode();
|
||||
}
|
||||
});
|
||||
await this.initLoadData();
|
||||
},
|
||||
async beforeDestroy() {
|
||||
|
@ -349,6 +349,8 @@ export default {
|
||||
switch (hook) {
|
||||
case 'Update': this.$store.dispatch('map/setKeyboardEnter');
|
||||
break;
|
||||
case 'Tab': EventBus.$emit('CheckFaultModeEvent');
|
||||
break;
|
||||
}
|
||||
},
|
||||
async simulationReset() {
|
||||
|
@ -6,7 +6,7 @@
|
||||
<!--</el-select>-->
|
||||
<el-button-group>
|
||||
<el-button v-if="userRole=== 'STATION_SUPERVISOR' && !$route.query.projectDevice" size="small" @click="goIbp">IBP盘</el-button>
|
||||
<el-button v-if="userRole=== 'DISPATCHER' && !$route.query.projectDevice" size="small" @click="goBigScreen">大屏</el-button>
|
||||
<el-button v-if="userRole=== 'DISPATCHER' && !$route.query.projectDevice" size="small" :disabled="!hasBigScreen" @click="goBigScreen">大屏</el-button>
|
||||
<el-button v-if="userRole==='DISPATCHER' && !$route.query.projectDevice" size="small" @click="goIscs">ISCS</el-button>
|
||||
<el-button v-if="running && !dataError && $route.query.type !== 'ILW'" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('joinTraining.runGraphPreview') }}</el-button>
|
||||
<template v-if="isAdmin">
|
||||
@ -14,9 +14,9 @@
|
||||
{{ $t('joinTraining.runGraphLoading') }}</el-button><!-- 运行图加载 -->
|
||||
</template>
|
||||
</el-button-group>
|
||||
<el-button v-if="(isAdmin || $route.query.type === 'ILW') && !dataError && !isScreen" size="small" :type="faultMode ? '' : 'primary' " @click="changeOperateMode()">{{ faultMode?' 切换到普通模式':'切换到故障模式' }}</el-button>
|
||||
<el-button v-if="(isAdmin || $route.query.type === 'ILW') && !dataError && !isScreen" size="small" :type="faultMode ? '' : 'primary' " @click="changeOperateMode()">{{ faultMode?' 切换到普通模式[Tab]':'切换到故障模式[Tab]' }}</el-button>
|
||||
<!-- isCenter && !dataError && !isAdmin 此判断用于以后(目前 暂时不用) -->
|
||||
<el-button v-if="isShowDirective" size="small" :type="directiveMode ? 'primary' : ''" @click="changeDirectiveMode()">{{ directiveMode? '切换到普通模式':'切换到指令模式' }}</el-button>
|
||||
<el-button v-if="isShowDirective" size="small" :type="directiveMode ? 'primary' : ''" @click="changeDirectiveMode()">{{ directiveMode? '切换到普通模式[Tab]':'切换到指令模式[Tab]' }}</el-button>
|
||||
</div>
|
||||
<join-run-plan-view v-if="running && !dataError" ref="runPlanView" :group="group" />
|
||||
<select-ibp ref="selectIbp" />
|
||||
@ -32,6 +32,8 @@ import JoinRunPlanView from '@/views/newMap/displayNew/demon/runPlanView';
|
||||
import SelectIbp from '@/views/newMap/displayNew/demon/selectIbp';
|
||||
import { getIbpInfoByStation } from '@/api/ibp';
|
||||
import { loadRunPlanData } from '@/utils/loaddata';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { queryHasIscs } from '@/api/iscs';
|
||||
export default {
|
||||
name: 'MenuDemonSchema',
|
||||
components:{
|
||||
@ -102,6 +104,9 @@ export default {
|
||||
...mapGetters('runPlan', [
|
||||
'stations'
|
||||
]),
|
||||
...mapGetters('map', [
|
||||
'bigScreenConfig'
|
||||
]),
|
||||
running() {
|
||||
return this.$store.state.training.started;
|
||||
},
|
||||
@ -113,6 +118,9 @@ export default {
|
||||
},
|
||||
isShowDirective() { // 哈尔滨项目 行调设备显示
|
||||
return this.$route.query.type == 'CW' && this.project == 'heb';
|
||||
},
|
||||
hasBigScreen() {
|
||||
return this.bigScreenConfig.bigScreenSplitConfig && this.bigScreenConfig.bigScreenSplitConfig.length;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -139,6 +147,14 @@ export default {
|
||||
},
|
||||
async mounted() {
|
||||
this.userId = this.$store.state.user.id;
|
||||
EventBus.$on('CheckFaultModeEvent', () => {
|
||||
if ((this.isAdmin || this.$route.query.type === 'ILW') && !this.dataError && !this.isScreen) {
|
||||
this.changeOperateMode();
|
||||
}
|
||||
if (this.isShowDirective) {
|
||||
this.changeDirectiveMode();
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadRunData(opt) {
|
||||
@ -204,16 +220,24 @@ export default {
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
},
|
||||
goIscs() {
|
||||
const routeData = this.$router.resolve({
|
||||
path:`/displayIscs/system`,
|
||||
query:{
|
||||
lineCode: this.$route.query.lineCode,
|
||||
mapId: this.$route.query.mapId,
|
||||
group: this.$route.query.group,
|
||||
noPreLogout: true
|
||||
queryHasIscs({mapId: this.$route.query.mapId}).then(resp => {
|
||||
if (resp.data) {
|
||||
const routeData = this.$router.resolve({
|
||||
path:`/displayIscs/system`,
|
||||
query:{
|
||||
lineCode: this.$route.query.lineCode,
|
||||
mapId: this.$route.query.mapId,
|
||||
group: this.$route.query.group,
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
} else {
|
||||
this.$messageBox('该地图线路暂无ISCS数据!');
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('查询ISCS数据异常');
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
},
|
||||
// 点击ibp预览
|
||||
goIbp() {
|
||||
|
@ -137,7 +137,6 @@ export default {
|
||||
},
|
||||
forTree(item) {
|
||||
item.children && item.children.forEach(childrenItem => {
|
||||
// childrenItem.key = item.id + childrenItem.id + childrenItem.type;
|
||||
childrenItem.key = item.key + '-' + childrenItem.id;
|
||||
if (childrenItem.children && childrenItem.children.length) {
|
||||
this.forTree(childrenItem);
|
||||
|
Loading…
Reference in New Issue
Block a user