老旧接口调整
This commit is contained in:
parent
28d0891365
commit
93f3e485fc
@ -1,37 +1,5 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
/** 发送步骤数据*/
|
||||
export function sendTrainingNextStep(data, group) {
|
||||
return request({
|
||||
url: `/api/training/${data.trainingId}/nextStep`,
|
||||
method: 'post',
|
||||
data: data.operate,
|
||||
params: {
|
||||
group
|
||||
}
|
||||
});
|
||||
}
|
||||
/** 查询实训列表 0*/
|
||||
export function pageQueryTraining(params) {
|
||||
return request({
|
||||
url: `/api/training/pagedQuery`,
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
}
|
||||
export function sendCommand(group, command) {
|
||||
return request({
|
||||
url: `/api/training/deviceChange?group=${group}`,
|
||||
method: 'put',
|
||||
data: {
|
||||
param: command.val,
|
||||
type: command.type,
|
||||
code: command.code,
|
||||
operation: command.operation
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 发送新的指令
|
||||
export function sendCommandNew(group, commandDefinitionId, command) {
|
||||
return request({
|
||||
|
@ -362,7 +362,7 @@ export function postDailyRunPlanLoadGenerate(id) {
|
||||
// 加载通用排班计划
|
||||
export function postSchedulingCommonGenerate(mapId) {
|
||||
return request({
|
||||
url: `/api/scheduling/common/generate?mapId=${mapId}`,
|
||||
url: `/api/v1/scheduling/common/generate?mapId=${mapId}`,
|
||||
method: 'post'
|
||||
});
|
||||
}
|
||||
|
@ -1,12 +1,5 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
export function generateSchedulingAgain(group) {
|
||||
return request({
|
||||
url: `/api/scheduling/${group}/rebuild`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询某天的派班计划 */
|
||||
export function querySechedulingNew (group, params) {
|
||||
return request({
|
||||
|
@ -31,14 +31,6 @@ export function deleteFailureRule(id) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 退出仿真系统*/
|
||||
export function runDiagramQuit(group) {
|
||||
return request({
|
||||
url: `/api/simulation/${group}/quit`,
|
||||
method: 'put'
|
||||
});
|
||||
}
|
||||
|
||||
/** 实训系统(新版地图) */
|
||||
export function trainingNotifyNew({ trainingId }) {
|
||||
return request({
|
||||
@ -57,7 +49,7 @@ export function examNotifyNew({ examId }) {
|
||||
/** 获取用户实训列表*/
|
||||
export function getSimulationList(data) {
|
||||
return request({
|
||||
url: `/api/simulation/stats`,
|
||||
url: `/api/stats/simulation`,
|
||||
method: 'get',
|
||||
params: data
|
||||
});
|
||||
@ -66,7 +58,7 @@ export function getSimulationList(data) {
|
||||
/** 添加用户仿真数据*/
|
||||
export function postSimulationStats(data) {
|
||||
return request({
|
||||
url: `/api/simulation/stats`,
|
||||
url: `/api/stats/simulation`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
@ -75,7 +67,7 @@ export function postSimulationStats(data) {
|
||||
/** 更新用户仿真数据*/
|
||||
export function putSimulationStats(data) {
|
||||
return request({
|
||||
url: `/api/simulation/${data.id}/stats`,
|
||||
url: `/api/stats/${data.id}`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
@ -84,7 +76,7 @@ export function putSimulationStats(data) {
|
||||
/** 删除用户仿真数据*/
|
||||
export function deleteSimulationStats(statsId) {
|
||||
return request({
|
||||
url: `/api/simulation/${statsId}`,
|
||||
url: `/api/stats/${statsId}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
@ -236,14 +228,6 @@ export function handlerIbpEvent(group, button, stationCode) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 预览脚本仿真*/
|
||||
export function scriptDraftRecordNotify(scriptId) {
|
||||
return request({
|
||||
url: `/api/simulation/scriptDraft/${scriptId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 预览脚本仿真(新版)*/
|
||||
export function scriptDraftRecordNotifyNew(scriptId) {
|
||||
return request({
|
||||
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-cancel ref="menuCancel" />
|
||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||
<menu-button ref="menuButton" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
@ -18,7 +17,6 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuCancel from './menuCancel';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuButton from './menuButton';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
@ -37,7 +35,6 @@ export default {
|
||||
components: {
|
||||
MenuBar,
|
||||
MenuButton,
|
||||
MenuCancel,
|
||||
MenuSignal,
|
||||
MenuSwitch,
|
||||
MenuSection,
|
||||
|
@ -1,122 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
import { runDiagramQuit } from '@/api/simulation';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name: 'CancelMenu',
|
||||
components: {
|
||||
PopMenu
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: [],
|
||||
menuScreen: [
|
||||
{
|
||||
label: '放大地图',
|
||||
handler: this.magnifyMap,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: '缩小地图',
|
||||
handler: this.shrinkMap,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: '返回',
|
||||
handler: this.back,
|
||||
disabled: false
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
isScreen() { // 大屏隐藏所有菜单
|
||||
return this.$route.params.mode === 'dp' ||
|
||||
this.$store.state.training.roles == 'BigScreen';
|
||||
},
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.buttonOperation': function (val, old) {
|
||||
if (!this.isScreen && this.menu && this.menu.length > 1) {
|
||||
this.menu[0].disabled = true;
|
||||
this.menu[1].disabled = !((this.menu[1] && val));
|
||||
}
|
||||
},
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
this.menuNormal = [];
|
||||
if (this.isScreen) {
|
||||
this.menu = [...this.menuScreen];
|
||||
}
|
||||
// else {
|
||||
// this.menu = [...this.menuNormal];
|
||||
// }
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置地图定位
|
||||
mapLocation(item) {
|
||||
if (item) {
|
||||
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
// 放大地图
|
||||
magnifyMap() {
|
||||
this.$store.dispatch('menuOperation/handleMagnifyCount');
|
||||
},
|
||||
// 缩小地图
|
||||
shrinkMap() {
|
||||
this.$store.dispatch('menuOperation/handleShrinkCount');
|
||||
},
|
||||
// 返回
|
||||
async back() {
|
||||
await runDiagramQuit(this.group);
|
||||
EventBus.$emit('trainingSubscribeStop');
|
||||
history.go(-1);
|
||||
exitFullscreen();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div class="chengdou-01__menus" :style="{width: width + 'px'}">
|
||||
<menu-cancel ref="menuCancel" />
|
||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||
<menu-request ref="menuRequest" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
@ -19,7 +18,6 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuRequest from './menuRequest';
|
||||
import MenuCancel from './menuCancel';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
import MenuSwitch from './menuSwitch';
|
||||
|
@ -1,94 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
import { runDiagramQuit } from '@/api/simulation';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name: 'CancelMenu',
|
||||
components: {
|
||||
PopMenu
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuScreen: [
|
||||
{
|
||||
label: '放大地图',
|
||||
handler: this.magnifyMap,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: '缩小地图',
|
||||
handler: this.shrinkMap,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: '返回',
|
||||
handler: this.back,
|
||||
disabled: false
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 放大地图
|
||||
magnifyMap() {
|
||||
this.$store.dispatch('menuOperation/handleMagnifyCount');
|
||||
},
|
||||
// 缩小地图
|
||||
shrinkMap() {
|
||||
this.$store.dispatch('menuOperation/handleShrinkCount');
|
||||
},
|
||||
// 返回
|
||||
async back() {
|
||||
await runDiagramQuit(this.group);
|
||||
EventBus.$emit('trainingSubscribeStop');
|
||||
history.go(-1);
|
||||
exitFullscreen();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-cancel ref="menuCancel" />
|
||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||
<menu-button ref="menuButton" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
@ -17,7 +16,6 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuCancel from './menuCancel';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuButton from './menuButton';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
|
@ -1,94 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
import { runDiagramQuit } from '@/api/simulation';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name: 'CancelMenu',
|
||||
components: {
|
||||
PopMenu
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuScreen: [
|
||||
{
|
||||
label: '放大地图',
|
||||
handler: this.magnifyMap,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: '缩小地图',
|
||||
handler: this.shrinkMap,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: '返回',
|
||||
handler: this.back,
|
||||
disabled: false
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 放大地图
|
||||
magnifyMap() {
|
||||
this.$store.dispatch('menuOperation/handleMagnifyCount');
|
||||
},
|
||||
// 缩小地图
|
||||
shrinkMap() {
|
||||
this.$store.dispatch('menuOperation/handleShrinkCount');
|
||||
},
|
||||
// 返回
|
||||
async back() {
|
||||
await runDiagramQuit(this.group);
|
||||
EventBus.$emit('trainingSubscribeStop');
|
||||
history.go(-1);
|
||||
exitFullscreen();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-cancel ref="menuCancel" />
|
||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||
<menu-button ref="menuButton" />
|
||||
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
||||
@ -20,7 +19,6 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuCancel from './menuCancel';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuButton from './menuButton';
|
||||
import MenuAxleReset from './menuAxleReset';
|
||||
|
@ -1,119 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
import { runDiagramQuit } from '@/api/simulation';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name: 'CancelMenu',
|
||||
components: {
|
||||
PopMenu
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: [],
|
||||
menuScreen: [
|
||||
{
|
||||
label: '放大地图',
|
||||
handler: this.magnifyMap,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: '缩小地图',
|
||||
handler: this.shrinkMap,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: '返回',
|
||||
handler: this.back,
|
||||
disabled: false
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
isScreen() { // 大屏隐藏所有菜单
|
||||
return this.$route.params.mode === 'dp' ||
|
||||
this.$store.state.training.roles == 'BigScreen';
|
||||
},
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.buttonOperation': function (val, old) {
|
||||
if (!this.isScreen && this.menu && this.menu.length > 1) {
|
||||
this.menu[0].disabled = true;
|
||||
this.menu[1].disabled = !((this.menu[1] && val));
|
||||
}
|
||||
},
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
this.menuNormal = [];
|
||||
if (this.isScreen) {
|
||||
this.menu = [...this.menuScreen];
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置地图定位
|
||||
mapLocation(item) {
|
||||
if (item) {
|
||||
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
// 放大地图
|
||||
magnifyMap() {
|
||||
this.$store.dispatch('menuOperation/handleMagnifyCount');
|
||||
},
|
||||
// 缩小地图
|
||||
shrinkMap() {
|
||||
this.$store.dispatch('menuOperation/handleShrinkCount');
|
||||
},
|
||||
// 返回
|
||||
async back() {
|
||||
await runDiagramQuit(this.group);
|
||||
EventBus.$emit('trainingSubscribeStop');
|
||||
history.go(-1);
|
||||
exitFullscreen();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-cancel ref="menuCancel" />
|
||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||
@ -16,7 +15,6 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuCancel from './menuCancel';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
import MenuSwitch from './menuSwitch';
|
||||
@ -32,7 +30,6 @@ export default {
|
||||
name: 'Menus',
|
||||
components: {
|
||||
MenuBar,
|
||||
MenuCancel,
|
||||
MenuSignal,
|
||||
MenuSwitch,
|
||||
MenuSection,
|
||||
|
@ -1,124 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { Notification } from 'element-ui';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
|
||||
export default {
|
||||
name: 'CancelMenu',
|
||||
components: {
|
||||
PopMenu
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: [],
|
||||
menuScreen: [
|
||||
{
|
||||
label: this.$t('menu.menuCancle.zoomIn'),
|
||||
handler: this.magnifyMap,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuCancle.zoomOut'),
|
||||
handler: this.shrinkMap,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuCancle.back'),
|
||||
handler: this.back,
|
||||
disabled: false
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
this.menuNormal = [];
|
||||
this.stationList.forEach(station => {
|
||||
if (station.chargeStationCodeList && station.chargeStationCodeList.length) {
|
||||
const node = {
|
||||
label: station.name,
|
||||
children: [{
|
||||
code: station.code,
|
||||
label: station.name,
|
||||
handler: this.mapLocation
|
||||
}]
|
||||
};
|
||||
station.chargeStationCodeList.forEach(item => {
|
||||
const next = this.$store.getters['map/getDeviceByCode'](item);
|
||||
node.children.push({
|
||||
code: next.code,
|
||||
label: next.name,
|
||||
handler: this.mapLocation
|
||||
});
|
||||
});
|
||||
this.menuNormal.push(node);
|
||||
}
|
||||
});
|
||||
|
||||
this.menu = [...this.menuNormal];
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置地图定位
|
||||
mapLocation(item) {
|
||||
if (item) {
|
||||
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
// 放大地图
|
||||
magnifyMap() {
|
||||
this.$store.dispatch('menuOperation/handleMagnifyCount');
|
||||
},
|
||||
// 缩小地图
|
||||
shrinkMap() {
|
||||
this.$store.dispatch('menuOperation/handleShrinkCount');
|
||||
},
|
||||
// 返回
|
||||
async back() {
|
||||
history.go(-1);
|
||||
Notification.closeAll();
|
||||
exitFullscreen();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-cancel ref="menuCancel" />
|
||||
<menu-bar v-if="$store.state.training.prdType === '01' || $store.state.training.prdType === '02'" ref="menuBar" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
<menu-train ref="menuTrain" :selected="selected" />
|
||||
@ -17,7 +16,6 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuCancel from './menuCancel';
|
||||
import MenuTrain from './menuTrain';
|
||||
import MenuBar from './menuBar';
|
||||
import MenuButton from './menuButton';
|
||||
@ -35,7 +33,6 @@ export default {
|
||||
components: {
|
||||
MenuBar,
|
||||
MenuButton,
|
||||
MenuCancel,
|
||||
MenuTrain,
|
||||
MenuSignal,
|
||||
MenuSwitch,
|
||||
|
@ -1,119 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { Notification } from 'element-ui';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
|
||||
export default {
|
||||
name: 'CancelMenu',
|
||||
components: {
|
||||
PopMenu
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: [],
|
||||
menuScreen: [
|
||||
{
|
||||
label: this.$t('menu.menuCancle.zoomIn'),
|
||||
handler: this.magnifyMap,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuCancle.zoomOut'),
|
||||
handler: this.shrinkMap,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuCancle.back'),
|
||||
handler: this.back,
|
||||
disabled: false
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
this.menuNormal = [];
|
||||
this.stationList.forEach(station => {
|
||||
if (station.chargeStationCodeList && station.chargeStationCodeList.length) {
|
||||
const node = {
|
||||
label: station.name,
|
||||
children: []
|
||||
};
|
||||
station.chargeStationCodeList.forEach(item => {
|
||||
const next = this.$store.getters['map/getDeviceByCode'](item);
|
||||
node.children.push({
|
||||
code: next.code,
|
||||
label: next.name,
|
||||
handler: this.mapLocation
|
||||
});
|
||||
});
|
||||
this.menuNormal.push(node);
|
||||
}
|
||||
});
|
||||
this.menu = [...this.menuNormal];
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置地图定位
|
||||
mapLocation(item) {
|
||||
if (item) {
|
||||
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
// 放大地图
|
||||
magnifyMap() {
|
||||
this.$store.dispatch('menuOperation/handleMagnifyCount');
|
||||
},
|
||||
// 缩小地图
|
||||
shrinkMap() {
|
||||
this.$store.dispatch('menuOperation/handleShrinkCount');
|
||||
},
|
||||
// 返回
|
||||
async back() {
|
||||
history.go(-1);
|
||||
Notification.closeAll();
|
||||
exitFullscreen();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-cancel ref="menuCancel" />
|
||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
||||
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
|
||||
@ -21,7 +20,6 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuCancel from './menuCancel';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuAxleReset from './menuAxleReset';
|
||||
import MenuAutoTrunRoute from './menuAutoTrunRoute';
|
||||
@ -44,7 +42,6 @@ export default {
|
||||
MenuBar,
|
||||
MenuAxleReset,
|
||||
MenuAutoTrunRoute,
|
||||
MenuCancel,
|
||||
MenuSignal,
|
||||
MenuSwitch,
|
||||
MenuSection,
|
||||
|
@ -1,119 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
import { runDiagramQuit } from '@/api/simulation';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name: 'CancelMenu',
|
||||
components: {
|
||||
PopMenu
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: [],
|
||||
menuScreen: [
|
||||
{
|
||||
label: '放大地图',
|
||||
handler: this.magnifyMap,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: '缩小地图',
|
||||
handler: this.shrinkMap,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: '返回',
|
||||
handler: this.back,
|
||||
disabled: false
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
isScreen() { // 大屏隐藏所有菜单
|
||||
return this.$route.params.mode === 'dp' ||
|
||||
this.$store.state.training.roles == 'BigScreen';
|
||||
},
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.buttonOperation': function (val, old) {
|
||||
if (!this.isScreen && this.menu && this.menu.length > 1) {
|
||||
this.menu[0].disabled = true;
|
||||
this.menu[1].disabled = !((this.menu[1] && val));
|
||||
}
|
||||
},
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
this.menuNormal = [];
|
||||
if (this.isScreen) {
|
||||
this.menu = [...this.menuScreen];
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置地图定位
|
||||
mapLocation(item) {
|
||||
if (item) {
|
||||
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
// 放大地图
|
||||
magnifyMap() {
|
||||
this.$store.dispatch('menuOperation/handleMagnifyCount');
|
||||
},
|
||||
// 缩小地图
|
||||
shrinkMap() {
|
||||
this.$store.dispatch('menuOperation/handleShrinkCount');
|
||||
},
|
||||
// 返回
|
||||
async back() {
|
||||
await runDiagramQuit(this.group);
|
||||
EventBus.$emit('trainingSubscribeStop');
|
||||
history.go(-1);
|
||||
exitFullscreen();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-cancel ref="menuCancel" />
|
||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
||||
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
|
||||
@ -21,7 +20,6 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuCancel from './menuCancel';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuAxleReset from './menuAxleReset';
|
||||
import MenuAutoTrunRoute from './menuAutoTrunRoute';
|
||||
@ -44,7 +42,6 @@ export default {
|
||||
MenuBar,
|
||||
MenuAxleReset,
|
||||
MenuAutoTrunRoute,
|
||||
MenuCancel,
|
||||
MenuSignal,
|
||||
MenuSwitch,
|
||||
MenuSection,
|
||||
|
@ -1,119 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
import { runDiagramQuit } from '@/api/simulation';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name: 'CancelMenu',
|
||||
components: {
|
||||
PopMenu
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: [],
|
||||
menuScreen: [
|
||||
{
|
||||
label: '放大地图',
|
||||
handler: this.magnifyMap,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: '缩小地图',
|
||||
handler: this.shrinkMap,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: '返回',
|
||||
handler: this.back,
|
||||
disabled: false
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
isScreen() { // 大屏隐藏所有菜单
|
||||
return this.$route.params.mode === 'dp' ||
|
||||
this.$store.state.training.roles == 'BigScreen';
|
||||
},
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.buttonOperation': function (val, old) {
|
||||
if (!this.isScreen && this.menu && this.menu.length > 1) {
|
||||
this.menu[0].disabled = true;
|
||||
this.menu[1].disabled = !((this.menu[1] && val));
|
||||
}
|
||||
},
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
this.menuNormal = [];
|
||||
if (this.isScreen) {
|
||||
this.menu = [...this.menuScreen];
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置地图定位
|
||||
mapLocation(item) {
|
||||
if (item) {
|
||||
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
// 放大地图
|
||||
magnifyMap() {
|
||||
this.$store.dispatch('menuOperation/handleMagnifyCount');
|
||||
},
|
||||
// 缩小地图
|
||||
shrinkMap() {
|
||||
this.$store.dispatch('menuOperation/handleShrinkCount');
|
||||
},
|
||||
// 返回
|
||||
async back() {
|
||||
await runDiagramQuit(this.group);
|
||||
EventBus.$emit('trainingSubscribeStop');
|
||||
history.go(-1);
|
||||
exitFullscreen();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-cancel ref="menuCancel" />
|
||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
||||
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
|
||||
@ -22,7 +21,6 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuCancel from './menuCancel';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuAxleReset from './menuAxleReset';
|
||||
import MenuAutoTrunRoute from './menuAutoTrunRoute';
|
||||
@ -46,7 +44,6 @@ export default {
|
||||
MenuBar,
|
||||
MenuAxleReset,
|
||||
MenuAutoTrunRoute,
|
||||
MenuCancel,
|
||||
MenuSignal,
|
||||
MenuSwitch,
|
||||
MenuSection,
|
||||
|
@ -1,119 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
import { runDiagramQuit } from '@/api/simulation';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name: 'CancelMenu',
|
||||
components: {
|
||||
PopMenu
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: [],
|
||||
menuScreen: [
|
||||
{
|
||||
label: '放大地图',
|
||||
handler: this.magnifyMap,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: '缩小地图',
|
||||
handler: this.shrinkMap,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: '返回',
|
||||
handler: this.back,
|
||||
disabled: false
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
isScreen() { // 大屏隐藏所有菜单
|
||||
return this.$route.params.mode === 'dp' ||
|
||||
this.$store.state.training.roles == 'BigScreen';
|
||||
},
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.buttonOperation': function (val, old) {
|
||||
if (!this.isScreen && this.menu && this.menu.length > 1) {
|
||||
this.menu[0].disabled = true;
|
||||
this.menu[1].disabled = !((this.menu[1] && val));
|
||||
}
|
||||
},
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
this.menuNormal = [];
|
||||
if (this.isScreen) {
|
||||
this.menu = [...this.menuScreen];
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置地图定位
|
||||
mapLocation(item) {
|
||||
if (item) {
|
||||
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
// 放大地图
|
||||
magnifyMap() {
|
||||
this.$store.dispatch('menuOperation/handleMagnifyCount');
|
||||
},
|
||||
// 缩小地图
|
||||
shrinkMap() {
|
||||
this.$store.dispatch('menuOperation/handleShrinkCount');
|
||||
},
|
||||
// 返回
|
||||
async back() {
|
||||
await runDiagramQuit(this.group);
|
||||
EventBus.$emit('trainingSubscribeStop');
|
||||
history.go(-1);
|
||||
exitFullscreen();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-cancel ref="menuCancel" />
|
||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||
@ -17,7 +16,6 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuCancel from './menuCancel';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
import MenuSwitch from './menuSwitch';
|
||||
@ -34,7 +32,6 @@ export default {
|
||||
name: 'Menus',
|
||||
components: {
|
||||
MenuBar,
|
||||
MenuCancel,
|
||||
MenuSignal,
|
||||
MenuSwitch,
|
||||
MenuSection,
|
||||
|
@ -1,119 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { Notification } from 'element-ui';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
|
||||
export default {
|
||||
name: 'CancelMenu',
|
||||
components: {
|
||||
PopMenu
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: [],
|
||||
menuScreen: [
|
||||
{
|
||||
label: this.$t('menu.menuCancle.zoomIn'),
|
||||
handler: this.magnifyMap,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuCancle.zoomOut'),
|
||||
handler: this.shrinkMap,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuCancle.back'),
|
||||
handler: this.back,
|
||||
disabled: false
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
this.menuNormal = [];
|
||||
this.stationList.forEach(station => {
|
||||
if (station.relStationCodeList && station.ciStation && station.relStationCodeList.length) {
|
||||
const node = {
|
||||
label: station.name,
|
||||
children: []
|
||||
};
|
||||
station.relStationCodeList.forEach(item => {
|
||||
const next = this.$store.getters['map/getDeviceByCode'](item);
|
||||
node.children.push({
|
||||
code: next.code,
|
||||
label: next.name,
|
||||
handler: this.mapLocation
|
||||
});
|
||||
});
|
||||
this.menuNormal.push(node);
|
||||
}
|
||||
});
|
||||
this.menu = [...this.menuNormal];
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置地图定位
|
||||
mapLocation(item) {
|
||||
if (item) {
|
||||
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
// 放大地图
|
||||
magnifyMap() {
|
||||
this.$store.dispatch('menuOperation/handleMagnifyCount');
|
||||
},
|
||||
// 缩小地图
|
||||
shrinkMap() {
|
||||
this.$store.dispatch('menuOperation/handleShrinkCount');
|
||||
},
|
||||
// 返回
|
||||
async back() {
|
||||
history.go(-1);
|
||||
Notification.closeAll();
|
||||
exitFullscreen();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div class="xian-02__menus" :style="{width: width + 'px'}">
|
||||
<menu-cancel ref="menuCancel" />
|
||||
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
||||
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
|
||||
<menu-station-control ref="menuStationControl" :selected="selected" />
|
||||
@ -19,7 +18,6 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuCancel from './menuCancel';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuAxleReset from './menuAxleReset';
|
||||
import MenuAutoTrunRoute from './menuAutoTrunRoute';
|
||||
@ -41,7 +39,6 @@ export default {
|
||||
components: {
|
||||
MenuAxleReset,
|
||||
MenuAutoTrunRoute,
|
||||
MenuCancel,
|
||||
MenuSignal,
|
||||
MenuSwitch,
|
||||
MenuSection,
|
||||
|
@ -1,259 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" pop-class="xian-02__pop_tip_station" />
|
||||
<notice-info ref="noticeInfo" pop-class="xian-02__system" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu/index';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import deviceType from '@/jmapNew/constant/deviceType';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'CancelMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: [
|
||||
{
|
||||
label: '发送',
|
||||
handler: this.sendRequestList
|
||||
},
|
||||
{
|
||||
label: '取消',
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '全部扣车',
|
||||
children: [
|
||||
{
|
||||
label: '正线上全部扣车',
|
||||
handler: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '全部发车',
|
||||
children: [
|
||||
{
|
||||
label: '缓解正线所有列车',
|
||||
handler: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '停止所有列车',
|
||||
children: [
|
||||
{
|
||||
label: '停止正线所有列车',
|
||||
handler: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '车站选择',
|
||||
children: []
|
||||
},
|
||||
{
|
||||
label: '列车选择',
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '缩放',
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '显示控制',
|
||||
children: [
|
||||
{
|
||||
label: '正线及车辆段',
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '列车信息',
|
||||
handler: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '下一窗口',
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '上一窗口',
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '激活所有菜单',
|
||||
children: [
|
||||
{
|
||||
label: '确认',
|
||||
handler: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '恢复激活菜单',
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '进路模式 - 授权车站',
|
||||
children: [
|
||||
{
|
||||
label: '自动',
|
||||
handler: this.undeveloped
|
||||
},
|
||||
{
|
||||
label: '人工',
|
||||
handler: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '列车报警确认',
|
||||
children: [
|
||||
{
|
||||
label: '列车完整性报警确认',
|
||||
handler: this.undeveloped
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.buttonOperation': function (val, old) {
|
||||
if (this.menu && this.menu.length > 1) {
|
||||
this.menu[0].disabled = true;
|
||||
this.menu[1].disabled = !((this.menu[1] && val));
|
||||
}
|
||||
},
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initStationList() {
|
||||
const list = [];
|
||||
this.stationList.forEach(station => {
|
||||
if (station.visible) {
|
||||
const node = {
|
||||
label: station.name,
|
||||
code: station.code,
|
||||
handler: this.mapLocation
|
||||
};
|
||||
|
||||
list.push(node);
|
||||
}
|
||||
});
|
||||
return list;
|
||||
},
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
this.menuNormal[5].children = this.initStationList();
|
||||
this.menu = this.menuNormal;
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置地图定位
|
||||
mapLocation(item) {
|
||||
if (item) {
|
||||
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
},
|
||||
sendRequestList() {
|
||||
const requestList = this.$store.state.menuOperation.requestList;
|
||||
if (requestList && requestList.length > 0) {
|
||||
this.commitEachCommand(requestList);
|
||||
}
|
||||
},
|
||||
commitEachCommand(requestList) {
|
||||
const eachCmd = requestList[0];
|
||||
let operate = '';
|
||||
if (eachCmd.ciConfirm) {
|
||||
operate = {
|
||||
code: eachCmd.device.code,
|
||||
operation: eachCmd.operation.code,
|
||||
param: eachCmd.param // 请求栈中参数配置
|
||||
};
|
||||
const deviceStatus = {code: eachCmd.device.code, _type: eachCmd.device._type, isCiConfirm: 1};
|
||||
if (eachCmd.device._type === deviceType.Signal) {
|
||||
deviceStatus.isRequestLock = 0;
|
||||
deviceStatus.isRequestGuide = 0;
|
||||
}
|
||||
this.$store.dispatch('training/updateMapState', [deviceStatus]);
|
||||
} else {
|
||||
operate = {
|
||||
send: true,
|
||||
operation: eachCmd.operation.code,
|
||||
cmdType: eachCmd.cmdType,
|
||||
param: eachCmd.param // 请求栈中参数配置
|
||||
};
|
||||
const deviceStatus = {code: eachCmd.device.code, _type: eachCmd.device._type, isCiConfirm: 0};
|
||||
if (eachCmd.device._type === deviceType.Signal) {
|
||||
deviceStatus.isRequestLock = 0;
|
||||
deviceStatus.isRequestGuide = 0;
|
||||
}
|
||||
this.$store.dispatch('training/updateMapState', [deviceStatus]);
|
||||
}
|
||||
this.$store.dispatch('menuOperation/spliceRequestList', {deviceCode:eachCmd.device.code, operateCode:eachCmd.operation.code});
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
if (requestList.length) {
|
||||
this.commitEachCommand(requestList);
|
||||
}
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -2,10 +2,10 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.8.129:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.8.119:9000'; // 张赛
|
||||
BASE_API = 'http://192.168.8.119:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.8.110:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
|
@ -15,7 +15,7 @@
|
||||
<script>
|
||||
import {adminPublishLesson, rejectedLessonRelease, reviewLessonList, reviewScriptList, publishScript, rejectScript, reviewRunPlanList, publishRunPlan, rejectRunPlan, previewRunPlan} from '@/api/designPlatform';
|
||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||
import { scriptDraftRecordNotify } from '@/api/simulation';
|
||||
import { scriptDraftRecordNotifyNew } from '@/api/simulation';
|
||||
import LessonDetail from './detail';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
@ -508,7 +508,7 @@ export default {
|
||||
},
|
||||
scriptPreview(index, row) {
|
||||
const mapInfo = this.mapList.find(elem=>{ return elem.id == row.mapId; });
|
||||
scriptDraftRecordNotify(row.id).then(resp => {
|
||||
scriptDraftRecordNotifyNew(row.id).then(resp => {
|
||||
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0, lineCode:mapInfo.lineCode};
|
||||
this.$router.push({ path: `${UrlConfig.design.displayNew}/demon`, query });
|
||||
launchFullscreen();
|
||||
|
@ -259,12 +259,8 @@ export default {
|
||||
}
|
||||
}).catch(error => {
|
||||
this.clearData();
|
||||
if (error.code == 30002) {
|
||||
this.handleReGenerate(day);
|
||||
} else {
|
||||
this.$messageBox(`${error.message}`);
|
||||
this.loading = false;
|
||||
}
|
||||
this.$messageBox(`${error.message}`);
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -282,20 +278,6 @@ export default {
|
||||
this.$messageBox(`${error.message}`);
|
||||
});
|
||||
},
|
||||
handleReGenerate(day) {
|
||||
generateSchedulingAgain(this.group).then(resp => {
|
||||
this.loading = false;
|
||||
this.tableData = this.initTableData(resp.data.planList || []);
|
||||
this.formModel.id = resp.data.id;
|
||||
this.formModel.planDate = resp.data.planDate;
|
||||
this.formModel.runPlanName = resp.data.runPlanName;
|
||||
this.$message.success(this.$t('display.schedule.regenerateSchedulePlanSuccess'));
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.clearData();
|
||||
this.$messageBox(`${error.message}`);
|
||||
});
|
||||
},
|
||||
handleSave() {
|
||||
if (this.formModel.planDate) {
|
||||
saveSchedulingNew(this.group, this.tableData).then(resp => {
|
||||
|
Loading…
Reference in New Issue
Block a user