From 9bfad2fdebcfb45fdf299ff94af394a4cc72834c Mon Sep 17 00:00:00 2001
From: zyy <1787816799@qq.com>
Date: Fri, 15 Nov 2019 16:31:48 +0800
Subject: [PATCH] =?UTF-8?q?desc:=20=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/management/dictionary.js | 91 +-
src/i18n/langs/en/router.js | 3 +-
src/i18n/langs/en/system.js | 10 +-
src/i18n/langs/zh/router.js | 3 +-
src/i18n/langs/zh/system.js | 10 +-
src/jmap/map.js | 4 +
.../beijing_01/menus/menuStationStand.vue | 938 +++++++--------
.../beijing_01/menus/utils/menuItemStatus.js | 1024 ++++++++---------
src/router/index.js | 10 +-
src/store/modules/exam.js | 229 ++--
src/store/modules/map.js | 1 +
src/utils/baseUrl.js | 4 +-
src/views/display/menuExam.vue | 2 +-
src/views/display/tipExamList.vue | 3 +-
src/views/jlmap/index.vue | 3 +
src/views/system/commandDictionary/edit.vue | 131 +++
src/views/system/commandDictionary/index.vue | 163 +++
17 files changed, 1489 insertions(+), 1140 deletions(-)
create mode 100644 src/views/system/commandDictionary/edit.vue
create mode 100644 src/views/system/commandDictionary/index.vue
diff --git a/src/api/management/dictionary.js b/src/api/management/dictionary.js
index 7fcc79f70..f0c5d0a7a 100644
--- a/src/api/management/dictionary.js
+++ b/src/api/management/dictionary.js
@@ -1,51 +1,51 @@
import request from '@/utils/request';
export function list(params) {
- return request({
- url: '/api/dictionary/list',
- method: 'get',
- params: params
- });
+ return request({
+ url: '/api/dictionary/list',
+ method: 'get',
+ params: params
+ });
}
export function checkDicCodeExist(code) {
- return request({
- url: '/api/dictionary/checkExistByCode',
- method: 'get',
- params: {
- code: code
- }
- });
+ return request({
+ url: '/api/dictionary/checkExistByCode',
+ method: 'get',
+ params: {
+ code: code
+ }
+ });
}
export function getData(id) {
- return request({
- url: `/api/dictionary/${id}`,
- method: 'get'
- });
+ return request({
+ url: `/api/dictionary/${id}`,
+ method: 'get'
+ });
}
export function create(data) {
- return request({
- url: '/api/dictionary/create',
- method: 'post',
- data: data
- });
+ return request({
+ url: '/api/dictionary/create',
+ method: 'post',
+ data: data
+ });
}
export function del(id) {
- return request({
- url: `/api/dictionary/delete/${id}`,
- method: 'delete'
- });
+ return request({
+ url: `/api/dictionary/delete/${id}`,
+ method: 'delete'
+ });
}
export function update(data) {
- return request({
- url: `/api/dictionary/update/${data.id}`,
- method: 'put',
- data: data
- });
+ return request({
+ url: `/api/dictionary/update/${data.id}`,
+ method: 'put',
+ data: data
+ });
}
/**
@@ -53,11 +53,28 @@ export function update(data) {
* @param {*} code
*/
export function getDetailList(code) {
- return request({
- url: '/api/dictionary/getDetailListByCode',
- method: 'get',
- params: {
- code: code
- }
- });
+ return request({
+ url: '/api/dictionary/getDetailListByCode',
+ method: 'get',
+ params: {
+ code: code
+ }
+ });
+}
+
+// 根据线路code分页查询指令
+export function getCommandList(parmas) {
+ return request({
+ url: '/api/cmd',
+ method: 'get',
+ params: parmas
+ });
+}
+
+// 根据线路code分页查询指令
+export function delCommand(id) {
+ return request({
+ url: `/api/cmd/${id}`,
+ method: 'delete'
+ });
}
diff --git a/src/i18n/langs/en/router.js b/src/i18n/langs/en/router.js
index bce60c680..620e292ab 100644
--- a/src/i18n/langs/en/router.js
+++ b/src/i18n/langs/en/router.js
@@ -68,5 +68,6 @@ export default {
scriptReleaseApplication: 'Script release application',
runGraphReleaseApplication: 'Run graph release application',
subsystemGeneration: 'Subsystem generation',
- newsBulletin: 'New bulletin'
+ newsBulletin: 'New bulletin',
+ commandDictionary: 'Command dictionary'
};
diff --git a/src/i18n/langs/en/system.js b/src/i18n/langs/en/system.js
index 06fe14b17..1319e2c90 100644
--- a/src/i18n/langs/en/system.js
+++ b/src/i18n/langs/en/system.js
@@ -53,5 +53,13 @@ export default {
newsHeadlines: 'News headlines:',
newsContent: 'News content:',
whetherTheNewsCanBeClosed: 'Whether the news can be closed:',
- push: 'Push'
+ push: 'Push',
+ controlMode: 'Control mode',
+ deviceType: 'Device type',
+ lineCode: 'Line code',
+ simulationRole: 'Simulation role',
+ instructionType: 'type of instruction',
+ paramDetail: 'Check Parameters',
+ createDirective: '新增指令',
+ editDirective: '修改指令'
};
diff --git a/src/i18n/langs/zh/router.js b/src/i18n/langs/zh/router.js
index b4f040b5e..750f95150 100644
--- a/src/i18n/langs/zh/router.js
+++ b/src/i18n/langs/zh/router.js
@@ -69,5 +69,6 @@ export default {
scriptReleaseApplication: '剧本发布申请',
runGraphReleaseApplication: '运行图发布申请',
subsystemGeneration: '子系统生成',
- newsBulletin: '消息公告'
+ newsBulletin: '消息公告',
+ commandDictionary: '命令字典'
};
diff --git a/src/i18n/langs/zh/system.js b/src/i18n/langs/zh/system.js
index ad40c1636..f68d006e3 100644
--- a/src/i18n/langs/zh/system.js
+++ b/src/i18n/langs/zh/system.js
@@ -53,5 +53,13 @@ export default {
newsHeadlines: '消息标题:',
newsContent: '消息内容:',
whetherTheNewsCanBeClosed: '消息是否可关闭:',
- push: '推送'
+ push: '推送',
+ controlMode: '控制模式',
+ deviceType: '设备类型',
+ lineCode: '线路编号',
+ simulationRole: '仿真角色',
+ instructionType: '指令类型',
+ paramDetail: '查看参数',
+ createDirective: '新增指令',
+ editDirective: '修改指令'
};
diff --git a/src/jmap/map.js b/src/jmap/map.js
index 2b3fd0603..b1394209d 100644
--- a/src/jmap/map.js
+++ b/src/jmap/map.js
@@ -107,6 +107,10 @@ class Jlmap {
if (this.methods.viewLoaded instanceof Function) { this.methods.viewLoaded(this.mapDevice); }
}
+ setMapDevice(mapDevice) {
+ this.mapDevice = mapDevice;
+ }
+
setDefaultState() {
const list = [];
diff --git a/src/jmap/theme/beijing_01/menus/menuStationStand.vue b/src/jmap/theme/beijing_01/menus/menuStationStand.vue
index dfd522fe5..341c4ba16 100644
--- a/src/jmap/theme/beijing_01/menus/menuStationStand.vue
+++ b/src/jmap/theme/beijing_01/menus/menuStationStand.vue
@@ -29,480 +29,480 @@ import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItem
import { mouseCancelState } from './utils/menuItemStatus';
export default {
- name: 'StationStandMenu',
- components: {
- PopMenu,
- StandControl,
- StandJumpStopControl,
- StandDetail,
- StandRunLevel,
- NoticeInfo,
- StandBackStrategy,
- StandStopTime,
- StandDetainTrainAll
- },
- props: {
- selected: {
- type: Object,
- default() {
- return null;
- }
- }
- },
- data() {
- return {
- menu: [],
- menuNormal: {
- local: [
- {
- label: '设置扣车',
- handler: this.setDetainTrain,
- disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
- auth: { station: true, center: false }
- },
- {
- label: '取消扣车',
- handler: this.cancelDetainTrain,
- disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
- auth: { station: true, center: true }
- },
- {
- label: '设置跳停',
- handler: this.setJumpStop,
- disabledCallback: MenuDisabledState.StationStand.setJumpStop,
- auth: { station: true, center: false }
- },
- {
- label: '取消跳停',
- handler: this.cancelJumpStop,
- disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
- auth: { station: true, center: true }
- },
- {
- type: 'separator'
- },
- {
- label: '提前发车',
- handler: this.earlyDeparture,
- disabledCallback: MenuDisabledState.StationStand.earlyDeparture,
- auth: { station: true, center: true }
- },
- {
- label: '设置停站时间',
- handler: this.setStopTime,
- disabledCallback: MenuDisabledState.StationStand.setStopTime,
- auth: { station: true, center: true }
- },
- {
- type: 'separator'
- },
- {
- label: '站台详细信息',
- handler: this.detail,
- disabledCallback: MenuDisabledState.StationStand.detail,
- auth: { station: true, center: true }
- },
- {
- label: '运行时间控制',
- handler: this.setRunLevel,
- disabledCallback: MenuDisabledState.StationStand.setRunLevel,
- auth: { station: false, center: false }
- },
- {
- label: '设置提前发车',
- handler: this.earlyDeparture,
- disabledCallback: MenuDisabledState.StationStand.earlyDeparture,
- auth: { station: false, center: false }
- },
- {
- label: '人工折返策略设置',
- handler: this.setBackStrategy,
- disabledCallback: MenuDisabledState.StationStand.setBackStrategy,
- auth: { station: false, center: false }
- },
- {
- label: '查询站台状态',
- handler: this.detail,
- disabledCallback: MenuDisabledState.StationStand.detail,
- auth: { station: false, center: false }
- }
- ],
- central: [
- {
- label: '设置扣车',
- handler: this.setDetainTrain,
- disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
- auth: { station: true, center: true }
- },
- {
- label: '取消扣车',
- handler: this.cancelDetainTrain,
- disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
- auth: { station: true, center: true }
- },
- {
- label: '设置跳停',
- handler: this.setJumpStop,
- disabledCallback: MenuDisabledState.StationStand.setJumpStop,
- auth: { station: true, center: true }
- },
- {
- label: '取消跳停',
- handler: this.cancelJumpStop,
- disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
- auth: { station: true, center: true }
- },
- {
- label: '提前发车',
- handler: this.earlyDeparture,
- disabledCallback: MenuDisabledState.StationStand.earlyDeparture,
- auth: { station: true, center: true }
- },
- {
- type: 'separator'
- },
- {
- label: '停站时间控制',
- handler: this.setStopTime,
- disabledCallback: MenuDisabledState.StationStand.setStopTime,
- auth: { station: true, center: true }
- },
- {
- label: '运行时间控制',
- handler: this.setRunLevel,
- disabledCallback: MenuDisabledState.StationStand.setRunLevel,
- auth: { station: true, center: true }
- },
- {
- label: '变通策略管理',
- handler: this.setBackStrategy,
- disabledCallback: MenuDisabledState.StationStand.setBackStrategy,
- auth: { station: true, center: true }
- },
- {
- type: 'separator'
- },
- {
- label: '站台信息',
- handler: this.detail,
- disabledCallback: MenuDisabledState.StationStand.detail,
- auth: { station: true, center: true }
- }
- ]
- },
- menuForce: [
- {
- label: '设置故障',
- handler: this.setStoppage,
- disabledCallback: MenuDisabledState.StationStand.setStoppage
- },
- {
- label: '取消故障',
- handler: this.cancelStoppage,
- disabledCallback: MenuDisabledState.StationStand.cancelStoppage
- }
- ]
- };
- },
- computed: {
- ...mapGetters('training', [
- 'mode',
- 'operatemode'
- ]),
- ...mapGetters('menuOperation', [
- 'buttonOperation'
- ])
- },
- watch: {
- '$store.state.menuOperation.menuCount': function (val) {
- if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation) {
- this.doShow(this.$store.state.menuOperation.menuPosition);
- } else {
- this.doClose();
- }
- }
- },
- methods: {
- clickEvent() {
- const self = this;
- window.onclick = function (e) {
- self.doClose();
- };
- },
- initMenu() {
- // 编辑模式菜单列表
- this.menu = menuFiltration(this.menuNormal);
- if (this.operatemode === OperateMode.ADMIN) {
- this.menu = [...this.menu, ...this.menuForce];
- }
+ name: 'StationStandMenu',
+ components: {
+ PopMenu,
+ StandControl,
+ StandJumpStopControl,
+ StandDetail,
+ StandRunLevel,
+ NoticeInfo,
+ StandBackStrategy,
+ StandStopTime,
+ StandDetainTrainAll
+ },
+ props: {
+ selected: {
+ type: Object,
+ default() {
+ return null;
+ }
+ }
+ },
+ data() {
+ return {
+ menu: [],
+ menuNormal: {
+ local: [
+ {
+ label: '设置扣车',
+ handler: this.setDetainTrain,
+ disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
+ auth: { station: true, center: false }
+ },
+ {
+ label: '取消扣车',
+ handler: this.cancelDetainTrain,
+ disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
+ auth: { station: true, center: true }
+ },
+ {
+ label: '设置跳停',
+ handler: this.setJumpStop,
+ disabledCallback: MenuDisabledState.StationStand.setJumpStop,
+ auth: { station: true, center: false }
+ },
+ {
+ label: '取消跳停',
+ handler: this.cancelJumpStop,
+ disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
+ auth: { station: true, center: true }
+ },
+ {
+ type: 'separator'
+ },
+ {
+ label: '提前发车',
+ handler: this.earlyDeparture,
+ disabledCallback: MenuDisabledState.StationStand.earlyDeparture,
+ auth: { station: true, center: true }
+ },
+ {
+ label: '设置停站时间',
+ handler: this.setStopTime,
+ disabledCallback: MenuDisabledState.StationStand.setStopTime,
+ auth: { station: true, center: true }
+ },
+ {
+ type: 'separator'
+ },
+ {
+ label: '站台详细信息',
+ handler: this.detail,
+ disabledCallback: MenuDisabledState.StationStand.detail,
+ auth: { station: true, center: true }
+ },
+ {
+ label: '运行时间控制',
+ handler: this.setRunLevel,
+ disabledCallback: MenuDisabledState.StationStand.setRunLevel,
+ auth: { station: false, center: false }
+ },
+ {
+ label: '设置提前发车',
+ handler: this.earlyDeparture,
+ disabledCallback: MenuDisabledState.StationStand.earlyDeparture,
+ auth: { station: false, center: false }
+ },
+ {
+ label: '人工折返策略设置',
+ handler: this.setBackStrategy,
+ disabledCallback: MenuDisabledState.StationStand.setBackStrategy,
+ auth: { station: false, center: false }
+ },
+ {
+ label: '查询站台状态',
+ handler: this.detail,
+ disabledCallback: MenuDisabledState.StationStand.detail,
+ auth: { station: false, center: false }
+ }
+ ],
+ central: [
+ {
+ label: '设置扣车',
+ handler: this.setDetainTrain,
+ disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
+ auth: { station: true, center: true }
+ },
+ {
+ label: '取消扣车',
+ handler: this.cancelDetainTrain,
+ disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
+ auth: { station: true, center: true }
+ },
+ {
+ label: '设置跳停',
+ handler: this.setJumpStop,
+ disabledCallback: MenuDisabledState.StationStand.setJumpStop,
+ auth: { station: true, center: true }
+ },
+ {
+ label: '取消跳停',
+ handler: this.cancelJumpStop,
+ disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
+ auth: { station: true, center: true }
+ },
+ {
+ label: '提前发车',
+ handler: this.earlyDeparture,
+ disabledCallback: MenuDisabledState.StationStand.earlyDeparture,
+ auth: { station: true, center: true }
+ },
+ {
+ type: 'separator'
+ },
+ {
+ label: '停站时间控制',
+ handler: this.setStopTime,
+ disabledCallback: MenuDisabledState.StationStand.setStopTime,
+ auth: { station: true, center: true }
+ },
+ {
+ label: '运行时间控制',
+ handler: this.setRunLevel,
+ disabledCallback: MenuDisabledState.StationStand.setRunLevel,
+ auth: { station: true, center: true }
+ },
+ {
+ label: '变通策略管理',
+ handler: this.setBackStrategy,
+ disabledCallback: MenuDisabledState.StationStand.setBackStrategy,
+ auth: { station: true, center: true }
+ },
+ {
+ type: 'separator'
+ },
+ {
+ label: '站台信息',
+ handler: this.detail,
+ disabledCallback: MenuDisabledState.StationStand.detail,
+ auth: { station: true, center: true }
+ }
+ ]
+ },
+ menuForce: [
+ {
+ label: '设置故障',
+ handler: this.setStoppage,
+ disabledCallback: MenuDisabledState.StationStand.setStoppage
+ },
+ {
+ label: '取消故障',
+ handler: this.cancelStoppage,
+ disabledCallback: MenuDisabledState.StationStand.cancelStoppage
+ }
+ ]
+ };
+ },
+ computed: {
+ ...mapGetters('training', [
+ 'mode',
+ 'operatemode'
+ ]),
+ ...mapGetters('menuOperation', [
+ 'buttonOperation'
+ ])
+ },
+ watch: {
+ '$store.state.menuOperation.menuCount': function (val) {
+ if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation) {
+ this.doShow(this.$store.state.menuOperation.menuPosition);
+ } else {
+ this.doClose();
+ }
+ }
+ },
+ methods: {
+ clickEvent() {
+ const self = this;
+ window.onclick = function (e) {
+ self.doClose();
+ };
+ },
+ initMenu() {
+ // 编辑模式菜单列表
+ this.menu = menuFiltration(this.menuNormal);
+ if (this.operatemode === OperateMode.ADMIN) {
+ this.menu = [...this.menu, ...this.menuForce];
+ }
- // 故障模式菜单列表
- if (this.operatemode === OperateMode.FAULT) {
- this.menu = this.menuForce;
- }
+ // 故障模式菜单列表
+ if (this.operatemode === OperateMode.FAULT) {
+ this.menu = this.menuForce;
+ }
- this.menu = menuConvert(this.menu);
- },
- 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();
- }
- },
- // 设置故障
- setStoppage() {
- const operate = {
- start: true,
- send: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- label: MapDeviceType.StationStand.label,
- operation: OperationEvent.StationStand.stoppage.menu.operation
- };
+ this.menu = menuConvert(this.menu);
+ },
+ 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();
+ }
+ },
+ // 设置故障
+ setStoppage() {
+ const operate = {
+ start: true,
+ send: true,
+ code: this.selected.code,
+ type: MapDeviceType.StationStand.type,
+ label: MapDeviceType.StationStand.label,
+ operation: OperationEvent.StationStand.stoppage.menu.operation
+ };
- mouseCancelState(this.selected);
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(operate);
- }
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
- });
- },
- // 取消故障
- cancelStoppage() {
- const operate = {
- start: true,
- send: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- label: MapDeviceType.StationStand.label,
- operation: OperationEvent.StationStand.cancelStoppage.menu.operation
- };
+ mouseCancelState(this.selected);
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ } else {
+ this.$refs.noticeInfo.doShow(operate);
+ }
+ }).catch(() => {
+ this.$refs.noticeInfo.doShow(operate);
+ });
+ },
+ // 取消故障
+ cancelStoppage() {
+ const operate = {
+ start: true,
+ send: true,
+ code: this.selected.code,
+ type: MapDeviceType.StationStand.type,
+ label: MapDeviceType.StationStand.label,
+ operation: OperationEvent.StationStand.cancelStoppage.menu.operation
+ };
- mouseCancelState(this.selected);
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(operate);
- }
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
- });
- },
- // 设置扣车
- setDetainTrain() {
- const operate = {
- start: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- label: MapDeviceType.StationStand.label,
- operation: OperationEvent.StationStand.setDetainTrain.menu.operation
- };
+ mouseCancelState(this.selected);
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ } else {
+ this.$refs.noticeInfo.doShow(operate);
+ }
+ }).catch(() => {
+ this.$refs.noticeInfo.doShow(operate);
+ });
+ },
+ // 设置扣车
+ setDetainTrain() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.StationStand.type,
+ label: MapDeviceType.StationStand.label,
+ operation: OperationEvent.StationStand.setDetainTrain.menu.operation
+ };
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standControl.doShow(operate, this.selected);
- }
- });
- },
- // 取消扣车
- cancelDetainTrain() {
- const operate = {
- start: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- label: MapDeviceType.StationStand.label,
- operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
- };
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standControl.doShow(operate, this.selected);
- }
- });
- },
- // 强制取消扣车
- cancelDetainTrainForce() {
- const operate = {
- start: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- label: MapDeviceType.StationStand.label,
- operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation
- };
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standControl.doShow(operate, this.selected);
- }
- });
- },
- // 全线取消扣车
- cancelDetainTrainAll() {
- const operate = {
- start: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- label: MapDeviceType.StationStand.label,
- operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation
- };
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standDetainTrainAll.doShow(operate, this.selected);
- }
- });
- },
- // 设置跳停
- setJumpStop() {
- const operate = {
- start: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- label: MapDeviceType.StationStand.label,
- operation: OperationEvent.StationStand.setJumpStop.menu.operation
- };
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standJumpStopControl.doShow(operate, this.selected);
- }
- });
- },
- // 取消跳停
- cancelJumpStop() {
- const operate = {
- start: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- label: MapDeviceType.StationStand.label,
- operation: OperationEvent.StationStand.cancelJumpStop.menu.operation
- };
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standJumpStopControl.doShow(operate, this.selected);
- }
- });
- },
- // 停站时间控制
- setStopTime() {
- const operate = {
- start: true,
- send: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- label: MapDeviceType.StationStand.label,
- operation: OperationEvent.StationStand.setStopTime.menu.operation
- };
- this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
- if (valid) {
- let tempDate = null;
- if (response) {
- tempDate = response.data;
- }
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standStopTime.doShow(operate, this.selected, tempDate);
- }
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
- });
- },
- // 运行时间控制
- setRunLevel() {
- const operate = {
- start: true,
- send: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- label: MapDeviceType.StationStand.label,
- operation: OperationEvent.StationStand.setRunLevel.menu.operation
- };
- this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
- if (valid) {
- let tempDate = null;
- if (response) {
- tempDate = response.data;
- }
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standRunLevel.doShow(operate, this.selected, tempDate);
- }
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
- });
- },
- // 设置提前发车
- earlyDeparture() {
- const operate = {
- start: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- operation: OperationEvent.StationStand.earlyDeparture.menu.operation
- };
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standControl.doShow(operate, this.selected);
- }
- });
- },
- // 设置折返策略
- setBackStrategy() {
- const operate = {
- start: true,
- send: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- operation: OperationEvent.StationStand.setBackStrategy.menu.operation
- };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.standControl.doShow(operate, this.selected);
+ }
+ });
+ },
+ // 取消扣车
+ cancelDetainTrain() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.StationStand.type,
+ label: MapDeviceType.StationStand.label,
+ operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.standControl.doShow(operate, this.selected);
+ }
+ });
+ },
+ // 强制取消扣车
+ cancelDetainTrainForce() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.StationStand.type,
+ label: MapDeviceType.StationStand.label,
+ operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.standControl.doShow(operate, this.selected);
+ }
+ });
+ },
+ // 全线取消扣车
+ cancelDetainTrainAll() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.StationStand.type,
+ label: MapDeviceType.StationStand.label,
+ operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.standDetainTrainAll.doShow(operate, this.selected);
+ }
+ });
+ },
+ // 设置跳停
+ setJumpStop() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.StationStand.type,
+ label: MapDeviceType.StationStand.label,
+ operation: OperationEvent.StationStand.setJumpStop.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.standJumpStopControl.doShow(operate, this.selected);
+ }
+ });
+ },
+ // 取消跳停
+ cancelJumpStop() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.StationStand.type,
+ label: MapDeviceType.StationStand.label,
+ operation: OperationEvent.StationStand.cancelJumpStop.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.standJumpStopControl.doShow(operate, this.selected);
+ }
+ });
+ },
+ // 停站时间控制
+ setStopTime() {
+ const operate = {
+ start: true,
+ send: true,
+ code: this.selected.code,
+ type: MapDeviceType.StationStand.type,
+ label: MapDeviceType.StationStand.label,
+ operation: OperationEvent.StationStand.setStopTime.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
+ if (valid) {
+ let tempDate = null;
+ if (response) {
+ tempDate = response.data;
+ }
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.standStopTime.doShow(operate, this.selected, tempDate);
+ }
+ }).catch(() => {
+ this.$refs.noticeInfo.doShow(operate);
+ });
+ },
+ // 运行时间控制
+ setRunLevel() {
+ const operate = {
+ start: true,
+ send: true,
+ code: this.selected.code,
+ type: MapDeviceType.StationStand.type,
+ label: MapDeviceType.StationStand.label,
+ operation: OperationEvent.StationStand.setRunLevel.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
+ if (valid) {
+ let tempDate = null;
+ if (response) {
+ tempDate = response.data;
+ }
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.standRunLevel.doShow(operate, this.selected, tempDate);
+ }
+ }).catch(() => {
+ this.$refs.noticeInfo.doShow(operate);
+ });
+ },
+ // 设置提前发车
+ earlyDeparture() {
+ const operate = {
+ start: true,
+ code: this.selected.code,
+ type: MapDeviceType.StationStand.type,
+ operation: OperationEvent.StationStand.earlyDeparture.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.standControl.doShow(operate, this.selected);
+ }
+ });
+ },
+ // 设置折返策略
+ setBackStrategy() {
+ const operate = {
+ start: true,
+ send: true,
+ code: this.selected.code,
+ type: MapDeviceType.StationStand.type,
+ operation: OperationEvent.StationStand.setBackStrategy.menu.operation
+ };
- this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
- if (valid) {
- let tempDate = null;
- if (response) {
- tempDate = response.data;
- }
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standBackStrategy.doShow(operate, this.selected, tempDate);
- }
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
- });
- },
- // 查询站台状态
- detail() {
- const operate = {
- start: true,
- send: true,
- code: this.selected.code,
- type: MapDeviceType.StationStand.type,
- label: MapDeviceType.StationStand.label,
- operation: OperationEvent.StationStand.detail.menu.operation
- };
- this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
- if (valid) {
- let tempDate = null;
- if (response) {
- tempDate = response.data;
- }
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standDetail.doShow(operate, this.selected, tempDate);
- }
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
- });
- }
- }
+ this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
+ if (valid) {
+ let tempDate = null;
+ if (response) {
+ tempDate = response.data;
+ }
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.standBackStrategy.doShow(operate, this.selected, tempDate);
+ }
+ }).catch(() => {
+ this.$refs.noticeInfo.doShow(operate);
+ });
+ },
+ // 查询站台状态
+ detail() {
+ const operate = {
+ start: true,
+ send: true,
+ code: this.selected.code,
+ type: MapDeviceType.StationStand.type,
+ label: MapDeviceType.StationStand.label,
+ operation: OperationEvent.StationStand.detail.menu.operation
+ };
+ this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
+ if (valid) {
+ let tempDate = null;
+ if (response) {
+ tempDate = response.data;
+ }
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.$refs.standDetail.doShow(operate, this.selected, tempDate);
+ }
+ }).catch(() => {
+ this.$refs.noticeInfo.doShow(operate);
+ });
+ }
+ }
};
diff --git a/src/jmap/theme/beijing_01/menus/utils/menuItemStatus.js b/src/jmap/theme/beijing_01/menus/utils/menuItemStatus.js
index 6ebec4c88..dada7aa32 100644
--- a/src/jmap/theme/beijing_01/menus/utils/menuItemStatus.js
+++ b/src/jmap/theme/beijing_01/menus/utils/menuItemStatus.js
@@ -4,426 +4,426 @@ import deviceState from '@/jmap/constant/deviceState';
import { OperateMode } from '@/scripts/ConstDic';
export function getCurrentStateObject() {
- return store.getters['menuOperation/selected'];
+ return store.getters['menuOperation/selected'];
}
/** 系统类型 */
export const SystemType = {
- '01': 'local', // 现地工作站
- '02': 'central' // 中心调度工作站
+ '01': 'local', // 现地工作站
+ '02': 'central' // 中心调度工作站
};
export const StationControlType = {
- '01': 'center', // 中控
- '02': 'station' // 站控
+ '01': 'center', // 中控
+ '02': 'station' // 站控
};
// 控制禁用
export const MenuDisabledState = {
- Section: {
- // 故障解锁
- fault() {
- },
- // 切除
- split() {
- const device = getCurrentStateObject();
- if (device && device.cutOff != deviceState.Section.cutOff.Default) {
- return true;
- }
- },
- // 激活
- active() {
- const device = getCurrentStateObject();
- if (device && device.cutOff == deviceState.Section.cutOff.Default) {
- return true;
- }
- },
- // 区段封锁
- lock() {
- const device = getCurrentStateObject();
- if (device && device.status == deviceState.Section.status.State06) {
- return true;
- }
- },
- // 区段解禁
- unlock() {
- const device = getCurrentStateObject();
- if (device && device.status != deviceState.Section.status.State06) {
- return true;
- }
- },
- // 区段设置限速
- setSpeed() {
- },
- // 区段取消限速
- cancelSpeed() {
- const device = getCurrentStateObject();
- if (device && device.speedUpperLimit == deviceState.Section.speedUpperLimit.Default) {
- return true;
- }
- },
- // 新建列车
- newTrain() {
- },
- // 计轴预复位
- axlePreReset() {
- },
- // 设置计轴有效
- alxeEffective() {
- },
- // 设置计轴失效
- alxeFailure() {
- const device = getCurrentStateObject();
- if (device && device.status == deviceState.Section.status.State13) {
- return true;
- }
- }
- },
- Signal: {
- // 进路选排
- arrangementRoute() {
+ Section: {
+ // 故障解锁
+ fault() {
+ },
+ // 切除
+ split() {
+ const device = getCurrentStateObject();
+ if (device && device.cutOff != deviceState.Section.cutOff.Default) {
+ return true;
+ }
+ },
+ // 激活
+ active() {
+ const device = getCurrentStateObject();
+ if (device && device.cutOff == deviceState.Section.cutOff.Default) {
+ return true;
+ }
+ },
+ // 区段封锁
+ lock() {
+ const device = getCurrentStateObject();
+ if (device && device.status == deviceState.Section.status.State06) {
+ return true;
+ }
+ },
+ // 区段解禁
+ unlock() {
+ const device = getCurrentStateObject();
+ if (device && device.status != deviceState.Section.status.State06) {
+ return true;
+ }
+ },
+ // 区段设置限速
+ setSpeed() {
+ },
+ // 区段取消限速
+ cancelSpeed() {
+ const device = getCurrentStateObject();
+ if (device && device.speedUpperLimit == deviceState.Section.speedUpperLimit.Default) {
+ return true;
+ }
+ },
+ // 新建列车
+ newTrain() {
+ },
+ // 计轴预复位
+ axlePreReset() {
+ },
+ // 设置计轴有效
+ alxeEffective() {
+ },
+ // 设置计轴失效
+ alxeFailure() {
+ const device = getCurrentStateObject();
+ if (device && device.status == deviceState.Section.status.State13) {
+ return true;
+ }
+ }
+ },
+ Signal: {
+ // 进路选排
+ arrangementRoute() {
- },
- // 进路取消
- cancelTrainRoute() {
- },
- // 信号封闭
- lock() {
- const device = getCurrentStateObject();
- if (device && device.status == deviceState.Signal.status.State05) {
- return true;
- }
- },
- // 信号解封
- unlock() {
- const device = getCurrentStateObject();
- if (device && device.status != deviceState.Signal.status.State05) {
- return true;
- }
- },
- // 信号重开
- reopenSignal() {
- },
- // 进路引导
- guide() {
- },
- // 设置联锁自动进路
- setAutoInterlock() {
- },
- // 取消联锁自动进路
- cancelAutoInterlock() {
- },
- // 设置联锁自动触发
- setAutoTrigger() {
- },
- // 取消联锁自动触发
- cancelAutoTrigger() {
- },
- // 关灯
- signalClose() {
- const device = getCurrentStateObject();
- if (device && device.status == deviceState.Signal.status.State01) {
- return true;
- }
- },
- // 人工控
- humanControl() {
- },
- // ats自动控
- atsAutoControl() {
- },
- // 查询进路状态
- detail() {
- },
- // 设置故障
- setStoppage() {
- const device = getCurrentStateObject();
- if (device && device.fault) {
- return true;
- }
- },
- // 取消故障
- cancelStoppage() {
- const device = getCurrentStateObject();
- if (device && !device.fault) {
- return true;
- }
- }
- },
- Station: {
- // 全站设置联锁自动触发
- setAutoTrigger() {
- },
- // 全站取消联锁自动触发
- cancelAutoTrigger() {
- },
- // 上电解锁
- powerUnLock() {
- },
- // 执行关键操作测试
- execKeyOperationTest() {
- },
- // 所有进路自排开
- atsAutoControlALL() {
- },
- // 所有进路自排关
- humanControlALL() {
- },
- // 设置ZC故障
- setStoppage() {
- const device = getCurrentStateObject();
- if (device && device.fault) {
- return true;
- }
- },
- // 取消ZC故障
- cancelStoppage() {
- const device = getCurrentStateObject();
- if (device && !device.fault) {
- return true;
- }
- }
- },
- StationControl: {
- // 紧急站控
- emergencyStationControl() {
- const device = getCurrentStateObject();
- if (device && device.status == deviceState.StationControl.status.State03) {
- return true;
- }
- },
- // 请求站控
- requestStationControl() {
- const device = getCurrentStateObject();
- if (device && device.status == deviceState.StationControl.status.State02) {
- return true;
- }
- },
- // 强行站控
- forcedStationControl() {
- const device = getCurrentStateObject();
- if (device && device.status == deviceState.StationControl.status.State02) {
- return true;
- }
- },
- // 请求中控
- requestCentralControl() {
- const device = getCurrentStateObject();
- if (device && device.status == deviceState.StationControl.status.State01) {
- return true;
- }
- },
- // 设置故障
- setStoppage() {
- const device = getCurrentStateObject();
- if (device && device.fault) {
- return true;
- }
- },
- // 取消故障
- cancelStoppage() {
- const device = getCurrentStateObject();
- if (device && !device.fault) {
- return true;
- }
- }
- },
- StationStand: {
- // 设置扣车
- setDetainTrain() {
- const device = getCurrentStateObject();
- if (device && device.holdStatus != deviceState.StationStand.holdStatus.State01) {
- return true;
- }
- },
- // 取消扣车
- cancelDetainTrain() {
- const device = getCurrentStateObject();
- if (device && device.holdStatus == deviceState.StationStand.holdStatus.State01) {
- return true;
- }
- },
- // 强制取消扣车
- cancelDetainTrainForce() {
- const device = getCurrentStateObject();
- if (device && device.holdStatus == deviceState.StationStand.holdStatus.State01) {
- return true;
- }
- },
- // 设置全站扣车
- cancelDetainTrainAll() {
- },
- // 设置运行等级
- setRunLevel() {
- },
- // 设置停站时间
- setStopTime() {
- },
- // 设置跳停
- setJumpStop() {
- const device = getCurrentStateObject();
- if (device && device.jumpStopStatus != deviceState.StationStand.jumpStopStatus.State01) {
- return true;
- }
- },
- // 取消跳停
- cancelJumpStop() {
- const device = getCurrentStateObject();
- if (device && device.jumpStopStatus == deviceState.StationStand.jumpStopStatus.State01) {
- return true;
- }
- },
- // 提前发车
- earlyDeparture() {
- },
- // 站台详细信息
- detail() {
- },
- // 设置折返策略
- setBackStrategy() {
- },
- // 设置故障
- setStoppage() {
- const device = getCurrentStateObject();
- if (device && device.fault) {
- return true;
- }
- },
- // 取消故障
- cancelStoppage() {
- const device = getCurrentStateObject();
- if (device && !device.fault) {
- return true;
- }
- }
- },
- Switch: {
- // 单锁
- lock() {
- const device = getCurrentStateObject();
- if (device && device.status == deviceState.Switch.status.State10) {
- return true;
- }
- },
- // 解锁
- unlock() {
- const device = getCurrentStateObject();
- if (device && device.status != deviceState.Switch.status.State10) {
- return true;
- }
- },
- // 封锁
- block() {
- const device = getCurrentStateObject();
- if (device && device.status == deviceState.Switch.status.State14) {
- return true;
- }
- },
- // 解封
- unblock() {
- const device = getCurrentStateObject();
- if (device && device.status != deviceState.Switch.status.State14) {
- return true;
- }
- },
- // 强扳
- switchTurnoutForce() {
- },
- // 转动
- switchTurnout() {
- },
- // 道岔故障解锁
- fault() {
- },
- // 计轴预复位
- axlePreReset() {
- },
- // 道岔切除
- split() {
- },
- // 道岔激活
- active() {
- },
- // 道岔设置速度
- setSpeed() {
- // const device = getCurrentStateObject();
- },
- // 设置计轴有效
- alxeEffective() {
- },
- // 道岔取消速度
- cancelSpeed() {
- },
- // 设置故障
- setStoppage() {
- const device = getCurrentStateObject();
- if (device && device.fault) {
- return true;
- }
- },
- // 取消故障
- cancelStoppage() {
- const device = getCurrentStateObject();
- if (device && !device.fault) {
- return true;
- }
- }
- },
- Train: {
- // 添加列车识别号
- addTrainId() {
- },
- // 删除列车识别号
- delTrainId() {
- },
- // 修改列车识别号
- editTrainId() {
- },
- // 修改车组号
- editTrainNo() {
- },
- // 移动列车识别号
- moveTrainId() {
- },
- // 交换列车识别号
- switchTrainId() {
- },
- // 设置限速
- limitSpeed() {
- },
- // 设置通信故障
- setStoppage() {
- const device = getCurrentStateObject();
- if (device && device.fault) {
- return true;
- }
- },
- // 取消通信故障
- cancelStoppage() {
- const device = getCurrentStateObject();
- if (device && !device.fault) {
- return true;
- }
- },
- // 添加计划车
- addPlanTrain() {
- },
- // 设置计划车
- setPlanTrain() {
- },
- // 设置头码车
- setHeadTrain() {
- },
- // 设置人工车
- setWorkTrain() {
- },
- // 标记重点车
- trainToFlag() {
- },
- // 取消标记重点车
- trainUnFlag() {
- }
- }
+ },
+ // 进路取消
+ cancelTrainRoute() {
+ },
+ // 信号封闭
+ lock() {
+ const device = getCurrentStateObject();
+ if (device && device.status == deviceState.Signal.status.State05) {
+ return true;
+ }
+ },
+ // 信号解封
+ unlock() {
+ const device = getCurrentStateObject();
+ if (device && device.status != deviceState.Signal.status.State05) {
+ return true;
+ }
+ },
+ // 信号重开
+ reopenSignal() {
+ },
+ // 进路引导
+ guide() {
+ },
+ // 设置联锁自动进路
+ setAutoInterlock() {
+ },
+ // 取消联锁自动进路
+ cancelAutoInterlock() {
+ },
+ // 设置联锁自动触发
+ setAutoTrigger() {
+ },
+ // 取消联锁自动触发
+ cancelAutoTrigger() {
+ },
+ // 关灯
+ signalClose() {
+ const device = getCurrentStateObject();
+ if (device && device.status == deviceState.Signal.status.State01) {
+ return true;
+ }
+ },
+ // 人工控
+ humanControl() {
+ },
+ // ats自动控
+ atsAutoControl() {
+ },
+ // 查询进路状态
+ detail() {
+ },
+ // 设置故障
+ setStoppage() {
+ const device = getCurrentStateObject();
+ if (device && device.fault) {
+ return true;
+ }
+ },
+ // 取消故障
+ cancelStoppage() {
+ const device = getCurrentStateObject();
+ if (device && !device.fault) {
+ return true;
+ }
+ }
+ },
+ Station: {
+ // 全站设置联锁自动触发
+ setAutoTrigger() {
+ },
+ // 全站取消联锁自动触发
+ cancelAutoTrigger() {
+ },
+ // 上电解锁
+ powerUnLock() {
+ },
+ // 执行关键操作测试
+ execKeyOperationTest() {
+ },
+ // 所有进路自排开
+ atsAutoControlALL() {
+ },
+ // 所有进路自排关
+ humanControlALL() {
+ },
+ // 设置ZC故障
+ setStoppage() {
+ const device = getCurrentStateObject();
+ if (device && device.fault) {
+ return true;
+ }
+ },
+ // 取消ZC故障
+ cancelStoppage() {
+ const device = getCurrentStateObject();
+ if (device && !device.fault) {
+ return true;
+ }
+ }
+ },
+ StationControl: {
+ // 紧急站控
+ emergencyStationControl() {
+ const device = getCurrentStateObject();
+ if (device && device.status == deviceState.StationControl.status.State03) {
+ return true;
+ }
+ },
+ // 请求站控
+ requestStationControl() {
+ const device = getCurrentStateObject();
+ if (device && device.status == deviceState.StationControl.status.State02) {
+ return true;
+ }
+ },
+ // 强行站控
+ forcedStationControl() {
+ const device = getCurrentStateObject();
+ if (device && device.status == deviceState.StationControl.status.State02) {
+ return true;
+ }
+ },
+ // 请求中控
+ requestCentralControl() {
+ const device = getCurrentStateObject();
+ if (device && device.status == deviceState.StationControl.status.State01) {
+ return true;
+ }
+ },
+ // 设置故障
+ setStoppage() {
+ const device = getCurrentStateObject();
+ if (device && device.fault) {
+ return true;
+ }
+ },
+ // 取消故障
+ cancelStoppage() {
+ const device = getCurrentStateObject();
+ if (device && !device.fault) {
+ return true;
+ }
+ }
+ },
+ StationStand: {
+ // 设置扣车
+ setDetainTrain() {
+ const device = getCurrentStateObject();
+ if (device && device.holdStatus != deviceState.StationStand.holdStatus.State01) {
+ return true;
+ }
+ },
+ // 取消扣车
+ cancelDetainTrain() {
+ const device = getCurrentStateObject();
+ if (device && device.holdStatus == deviceState.StationStand.holdStatus.State01) {
+ return true;
+ }
+ },
+ // 强制取消扣车
+ cancelDetainTrainForce() {
+ const device = getCurrentStateObject();
+ if (device && device.holdStatus == deviceState.StationStand.holdStatus.State01) {
+ return true;
+ }
+ },
+ // 设置全站扣车
+ cancelDetainTrainAll() {
+ },
+ // 设置运行等级
+ setRunLevel() {
+ },
+ // 设置停站时间
+ setStopTime() {
+ },
+ // 设置跳停
+ setJumpStop() {
+ const device = getCurrentStateObject();
+ if (device && device.jumpStopStatus != deviceState.StationStand.jumpStopStatus.State01) {
+ return true;
+ }
+ },
+ // 取消跳停
+ cancelJumpStop() {
+ const device = getCurrentStateObject();
+ if (device && device.jumpStopStatus == deviceState.StationStand.jumpStopStatus.State01) {
+ return true;
+ }
+ },
+ // 提前发车
+ earlyDeparture() {
+ },
+ // 站台详细信息
+ detail() {
+ },
+ // 设置折返策略
+ setBackStrategy() {
+ },
+ // 设置故障
+ setStoppage() {
+ const device = getCurrentStateObject();
+ if (device && device.fault) {
+ return true;
+ }
+ },
+ // 取消故障
+ cancelStoppage() {
+ const device = getCurrentStateObject();
+ if (device && !device.fault) {
+ return true;
+ }
+ }
+ },
+ Switch: {
+ // 单锁
+ lock() {
+ const device = getCurrentStateObject();
+ if (device && device.status == deviceState.Switch.status.State10) {
+ return true;
+ }
+ },
+ // 解锁
+ unlock() {
+ const device = getCurrentStateObject();
+ if (device && device.status != deviceState.Switch.status.State10) {
+ return true;
+ }
+ },
+ // 封锁
+ block() {
+ const device = getCurrentStateObject();
+ if (device && device.status == deviceState.Switch.status.State14) {
+ return true;
+ }
+ },
+ // 解封
+ unblock() {
+ const device = getCurrentStateObject();
+ if (device && device.status != deviceState.Switch.status.State14) {
+ return true;
+ }
+ },
+ // 强扳
+ switchTurnoutForce() {
+ },
+ // 转动
+ switchTurnout() {
+ },
+ // 道岔故障解锁
+ fault() {
+ },
+ // 计轴预复位
+ axlePreReset() {
+ },
+ // 道岔切除
+ split() {
+ },
+ // 道岔激活
+ active() {
+ },
+ // 道岔设置速度
+ setSpeed() {
+ // const device = getCurrentStateObject();
+ },
+ // 设置计轴有效
+ alxeEffective() {
+ },
+ // 道岔取消速度
+ cancelSpeed() {
+ },
+ // 设置故障
+ setStoppage() {
+ const device = getCurrentStateObject();
+ if (device && device.fault) {
+ return true;
+ }
+ },
+ // 取消故障
+ cancelStoppage() {
+ const device = getCurrentStateObject();
+ if (device && !device.fault) {
+ return true;
+ }
+ }
+ },
+ Train: {
+ // 添加列车识别号
+ addTrainId() {
+ },
+ // 删除列车识别号
+ delTrainId() {
+ },
+ // 修改列车识别号
+ editTrainId() {
+ },
+ // 修改车组号
+ editTrainNo() {
+ },
+ // 移动列车识别号
+ moveTrainId() {
+ },
+ // 交换列车识别号
+ switchTrainId() {
+ },
+ // 设置限速
+ limitSpeed() {
+ },
+ // 设置通信故障
+ setStoppage() {
+ const device = getCurrentStateObject();
+ if (device && device.fault) {
+ return true;
+ }
+ },
+ // 取消通信故障
+ cancelStoppage() {
+ const device = getCurrentStateObject();
+ if (device && !device.fault) {
+ return true;
+ }
+ },
+ // 添加计划车
+ addPlanTrain() {
+ },
+ // 设置计划车
+ setPlanTrain() {
+ },
+ // 设置头码车
+ setHeadTrain() {
+ },
+ // 设置人工车
+ setWorkTrain() {
+ },
+ // 标记重点车
+ trainToFlag() {
+ },
+ // 取消标记重点车
+ trainUnFlag() {
+ }
+ }
};
/**
@@ -431,20 +431,20 @@ export const MenuDisabledState = {
* @param {Array} menu
*/
export function menuConvert(menu) {
- if (menu.constructor === Array) {
- menu.forEach(elem => {
- if (elem.type === 'separator') {
- elem.show = true;
- return;
- }
- if (elem.disabledCallback.constructor === Function) {
- if (!elem.defaultDisabled) {
- elem.disabled = elem.disabledCallback();
- }
- }
- });
- }
- return menu;
+ if (menu.constructor === Array) {
+ menu.forEach(elem => {
+ if (elem.type === 'separator') {
+ elem.show = true;
+ return;
+ }
+ if (elem.disabledCallback.constructor === Function) {
+ if (!elem.defaultDisabled) {
+ elem.disabled = elem.disabledCallback();
+ }
+ }
+ });
+ }
+ return menu;
}
/**
@@ -452,39 +452,39 @@ export function menuConvert(menu) {
* @param {*} menuObj
*/
export function menuBarConvert(menu, mode) {
- if (menu) {
- if (mode === OperateMode.NORMAL) {
- menu.forEach(item => {
- if (item.type === 'separator') {
- item.show = true;
- return;
- }
+ if (menu) {
+ if (mode === OperateMode.NORMAL) {
+ menu.forEach(item => {
+ if (item.type === 'separator') {
+ item.show = true;
+ return;
+ }
- item.show = false;
- if (!item.click) {
- item.click = () => { };
- }
+ item.show = false;
+ if (!item.click) {
+ item.click = () => { };
+ }
- if (!item.froce) {
- item.show = true;
- if (item.children && item.children.length > 0) {
- menuBarConvert(item.children, mode);
- }
- }
- });
- } else if (mode === OperateMode.ADMIN) {
- menu.forEach(item => {
- item.show = true;
- if (!item.click) {
- item.click = () => { };
- }
- if (item.children && item.children.length > 0) {
- menuBarConvert(item.children, mode);
- }
- });
- }
- }
- return menu || [];
+ if (!item.froce) {
+ item.show = true;
+ if (item.children && item.children.length > 0) {
+ menuBarConvert(item.children, mode);
+ }
+ }
+ });
+ } else if (mode === OperateMode.ADMIN) {
+ menu.forEach(item => {
+ item.show = true;
+ if (!item.click) {
+ item.click = () => { };
+ }
+ if (item.children && item.children.length > 0) {
+ menuBarConvert(item.children, mode);
+ }
+ });
+ }
+ }
+ return menu || [];
}
/**
@@ -492,79 +492,79 @@ export function menuBarConvert(menu, mode) {
* @param {Array} menu
*/
export function menuFiltration(menuObj) {
- var selected = getCurrentStateObject();
- var control;
- var menu = [];
+ var selected = getCurrentStateObject();
+ var control;
+ var menu = [];
- if (selected._type == 'StationStand') {
- control = store.getters['map/getStationControlByStationCode'](selected.deviceStationCode);
- } else if (selected._type == 'Station') {
- control = store.getters['map/getStationControlByStationCode'](selected.code);
- } else {
- control = store.getters['map/getStationControlByStationCode'](selected.stationCode);
- }
+ if (selected._type == 'StationStand') {
+ control = store.getters['map/getStationControlByStationCode'](selected.deviceStationCode);
+ } else if (selected._type == 'Station') {
+ control = store.getters['map/getStationControlByStationCode'](selected.code);
+ } else {
+ control = store.getters['map/getStationControlByStationCode'](selected.stationCode);
+ }
- if (control) {
- if (store.state.training.prdType != '') {
- const type = SystemType[store.state.training.prdType];
- const status = StationControlType[control.status];
- menu = [...menuObj[type]];
- if (menu.constructor === Array) {
- menu.forEach(elem => {
- if (elem.type === 'separator') {
- elem.show = true;
- return;
- }
+ if (control) {
+ if (store.state.training.prdType != '') {
+ const type = SystemType[store.state.training.prdType];
+ const status = StationControlType[control.status];
+ menu = [...menuObj[type]];
+ if (menu.constructor === Array) {
+ menu.forEach(elem => {
+ if (elem.type === 'separator') {
+ elem.show = true;
+ return;
+ }
- if (elem.auth.constructor === Object) {
- elem.show = true;
- if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
- elem.show = false;
- }
- elem.defaultDisabled = !elem.auth[status];
- }
- });
- }
- }
- }
- return menu;
+ if (elem.auth.constructor === Object) {
+ elem.show = true;
+ if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
+ elem.show = false;
+ }
+ elem.defaultDisabled = !elem.auth[status];
+ }
+ });
+ }
+ }
+ }
+ return menu;
}
/**
* 将train menu的show属性过滤返回
*/
export function trainMenuFiltration(menuObj) {
- var menu = [];
- if (store.state.training.prdType != '') {
- const type = SystemType[store.state.training.prdType];
- menu = [...menuObj[type]];
- if (menu.constructor === Array) {
- menu.forEach(elem => {
- if (elem.type === 'separator') {
- elem.show = true;
- return;
- }
+ var menu = [];
+ if (store.state.training.prdType != '') {
+ const type = SystemType[store.state.training.prdType];
+ menu = [...menuObj[type]];
+ if (menu.constructor === Array) {
+ menu.forEach(elem => {
+ if (elem.type === 'separator') {
+ elem.show = true;
+ return;
+ }
- if (elem.auth.constructor === Object) {
- elem.show = true;
- if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
- elem.show = false;
- }
- }
- });
- }
- }
- return menu;
+ if (elem.auth.constructor === Object) {
+ elem.show = true;
+ if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
+ elem.show = false;
+ }
+ }
+ });
+ }
+ }
+ return menu;
}
/**
* 离开菜单以及执行完菜单取消选中状态
*/
export function mouseCancelState(selected) {
- const device = Vue.prototype.$jlmap.getDeviceByCode(selected.code);
- const instance = (device || {}).instance;
- if (instance && instance.mouseEvent && instance.mouseEvent.mouseout) {
- device['down'] = false;
- instance.mouseEvent.mouseout(Vue.prototype.$jlmap.$zr.curEvent);
- }
+ const device = Vue.prototype.$jlmap.getDeviceByCode(selected.code);
+ const instance = (device || {}).instance;
+ if (instance && instance.mouseEvent && instance.mouseEvent.mouseout) {
+ device['down'] = false;
+ instance.mouseEvent.mouseout(Vue.prototype.$jlmap.$zr.curEvent);
+ }
}
diff --git a/src/router/index.js b/src/router/index.js
index 3fa5b1490..46bb35b09 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -31,6 +31,7 @@ const CacheControl = () => import('@/views/system/cacheControl/index');
const SystemGenerate = () => import('@/views/system/systemGenerate/index');
const IbpDraw = () => import('@/views/system/ibpDraw/index');
const News = () => import('@/views/system/news/index');
+const CommandDictionary = () => import('@/views/system/commandDictionary/index');
const Mapedit = () => import('@/views/mapdraft/index');
@@ -806,12 +807,19 @@ export const asyncRouter = [
i18n: 'router.productEdit'
}
},
- {
+ { // 消息公告
path: 'news',
component: News,
meta: {
i18n: 'router.newsBulletin'
}
+ },
+ { // 命令管理
+ path: 'commands',
+ component: CommandDictionary,
+ meta: {
+ i18n: 'router.commandDictionary'
+ }
}
]
},
diff --git a/src/store/modules/exam.js b/src/store/modules/exam.js
index 593ebef87..1079e8ef7 100644
--- a/src/store/modules/exam.js
+++ b/src/store/modules/exam.js
@@ -1,121 +1,124 @@
import store from '@/store';
const exam = {
- namespaced: true,
+ namespaced: true,
- state: {
- started: false, // 考试状态
- usedTime: 0, // 考试当前所用时间
- totalTime: 0, // 考试总时间
- timeInterval: null, // 计时器
- suspend: false, // 暂停
- ruleList: [], // 考试规则列表
- courseDetail: {}, // 课程详情
- courseList: [] // 课程列表
- },
- getters: {
- started: (state) => {
- return state.started;
- },
- usedTime: (state) => {
- return state.usedTime;
- },
- totalTime: (state) => {
- return state.totalTime;
- },
- suspend: (state) => {
- return state.suspend;
- }
- },
- mutations: {
- setStarted: (state, started) => {
- state.started = started;
- },
- setSuspend: (state, suspend) => {
- state.suspend = suspend;
- },
- setUsedTime: (state, usedTime) => {
- state.usedTime = usedTime;
- },
- setTotalTime: (state, totalTime) => {
- state.totalTime = totalTime;
- },
- countUsedTime: (state) => {
- if (state.timeInterval) {
- clearInterval(state.timeInterval);
- state.timeInterval = null;
- }
- state.timeInterval = setInterval(() => {
- if (!state.suspend) {
- state.usedTime++;
- }
- }, 1000);
- },
- stopCountTime: (state) => {
- if (state.timeInterval) {
- clearInterval(state.timeInterval);
- state.timeInterval = null;
- }
- },
- setRuleList: (state, ruleList) => {
- state.ruleList = ruleList;
- },
- setCourseDetail: (state, courseDetail) => {
- state.courseDetail = courseDetail;
- },
- setCourse: (state, courseList) => {
- state.courseList = courseList;
- }
- },
- actions: {
- start({ commit }) {
- commit('setStarted', true);
- commit('setSuspend', false);
- commit('setUsedTime', 0);
- commit('countUsedTime');
- },
- over({ commit }) {
- commit('setStarted', false);
- commit('setSuspend', true);
- commit('setUsedTime', 0);
- commit('stopCountTime');
- },
- isOver() {
- const trainingList = store.getters['trainingList/trainingList'];
- const doList = trainingList.filter(elem => {
- if (elem.usedTime !== undefined) return true;
- });
+ state: {
+ deviceCode: '', // 考试目标code
+ started: false, // 考试状态
+ usedTime: 0, // 考试当前所用时间
+ totalTime: 0, // 考试总时间
+ timeInterval: null, // 计时器
+ suspend: false, // 暂停
+ ruleList: [], // 考试规则列表
+ courseDetail: {}, // 课程详情
+ courseList: [] // 课程列表
+ },
+ getters: {
+ started: (state) => {
+ return state.started;
+ },
+ usedTime: (state) => {
+ return state.usedTime;
+ },
+ totalTime: (state) => {
+ return state.totalTime;
+ },
+ suspend: (state) => {
+ return state.suspend;
+ }
+ },
+ mutations: {
+ setStarted: (state, started) => {
+ state.started = started;
+ },
+ setSuspend: (state, suspend) => {
+ state.suspend = suspend;
+ },
+ setUsedTime: (state, usedTime) => {
+ state.usedTime = usedTime;
+ },
+ setTotalTime: (state, totalTime) => {
+ state.totalTime = totalTime;
+ },
+ countUsedTime: (state) => {
+ if (state.timeInterval) {
+ clearInterval(state.timeInterval);
+ state.timeInterval = null;
+ }
+ state.timeInterval = setInterval(() => {
+ if (!state.suspend) {
+ state.usedTime++;
+ }
+ }, 1000);
+ },
+ stopCountTime: (state) => {
+ if (state.timeInterval) {
+ clearInterval(state.timeInterval);
+ state.timeInterval = null;
+ }
+ },
+ setRuleList: (state, ruleList) => {
+ state.ruleList = ruleList;
+ },
+ setCourseDetail: (state, courseDetail) => {
+ state.courseDetail = courseDetail;
+ },
+ setCourse: (state, courseList) => {
+ state.courseList = courseList;
+ },
+ setCenter: (state, deviceCode) => {
+ state.deviceCode = deviceCode;
+ }
+ },
+ actions: {
+ start({ commit }) {
+ commit('setStarted', true);
+ commit('setSuspend', false);
+ commit('setUsedTime', 0);
+ commit('countUsedTime');
+ },
+ over({ commit }) {
+ commit('setStarted', false);
+ commit('setSuspend', true);
+ commit('setUsedTime', 0);
+ commit('stopCountTime');
+ },
+ isOver() {
+ const trainingList = store.getters['trainingList/trainingList'];
+ const doList = trainingList.filter(elem => {
+ if (elem.usedTime !== undefined) return true;
+ });
- if (doList.length >= trainingList.length) {
- return true;
- }
- },
- setSuspend({ commit }, suspend) {
- commit('setSuspend', suspend);
- },
- setUsedTime({ state }, usedTime) {
- if (usedTime) {
- state.usedTime = usedTime;
- }
- },
- setTotalTime({ commit }, totalTime) {
- if (totalTime) {
- commit('setTotalTime', totalTime);
- }
- },
- countUsedTime({ commit }) {
- commit('countUsedTime');
- },
- setRuleList({ commit }, ruleList) {
- commit('setRuleList', ruleList);
- },
- setCourseDetail({ commit }, courseDetail) {
- commit('setCourseDetail', courseDetail);
- },
- setCourse({ commit }, course) {
- commit('setCourse', course);
- }
- }
+ if (doList.length >= trainingList.length) {
+ return true;
+ }
+ },
+ setSuspend({ commit }, suspend) {
+ commit('setSuspend', suspend);
+ },
+ setUsedTime({ commit }, usedTime) {
+ commit('setUsedTime', usedTime || 0);
+ },
+ setTotalTime({ commit }, totalTime) {
+ commit('setTotalTime', totalTime || 0);
+ },
+ countUsedTime({ commit }) {
+ commit('countUsedTime');
+ },
+ setRuleList({ commit }, ruleList) {
+ commit('setRuleList', ruleList);
+ },
+ setCourseDetail({ commit }, courseDetail) {
+ commit('setCourseDetail', courseDetail);
+ },
+ setCourse({ commit }, course) {
+ commit('setCourse', course);
+ },
+ setCenter({ commit }, deviceCode) {
+ commit('setCenter', deviceCode);
+ }
+ }
};
export default exam;
diff --git a/src/store/modules/map.js b/src/store/modules/map.js
index b6ae172a4..1a26229cd 100644
--- a/src/store/modules/map.js
+++ b/src/store/modules/map.js
@@ -530,6 +530,7 @@ const map = {
if (map && map.skinVO) {
state.map = map;
state.mapDevice = parser(map, map.skinVO.code);
+ Vue.prototype.$jlmap.setMapDevice(state.mapDevice);
} else {
state.mapDevice = {};
}
diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js
index 55be58dc3..469782cec 100644
--- a/src/utils/baseUrl.js
+++ b/src/utils/baseUrl.js
@@ -3,11 +3,11 @@ 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.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 杜闪
- // BASE_API = 'http://192.168.3.82:9000'; // 杜康
+ BASE_API = 'http://192.168.3.82:9000'; // 杜康
} else {
BASE_API = process.env.VUE_APP_BASE_API;
}
diff --git a/src/views/display/menuExam.vue b/src/views/display/menuExam.vue
index ec13c0292..1b11dccff 100644
--- a/src/views/display/menuExam.vue
+++ b/src/views/display/menuExam.vue
@@ -20,7 +20,7 @@
import TipExamList from './tipExamList';
import { Notification } from 'element-ui';
import { startTraining } from '@/api/jmap/training';
-import { exitFullscreen } from '@/utils/screen';
+// import { exitFullscreen } from '@/utils/screen';
import { timeFormat } from '@/utils/date';
import { refreshExamList, finishOneExamQuestion } from '@/api/management/userexam';
import { launchFullscreen } from '@/utils/screen';
diff --git a/src/views/display/tipExamList.vue b/src/views/display/tipExamList.vue
index 9cc73ee45..b2670c4ab 100644
--- a/src/views/display/tipExamList.vue
+++ b/src/views/display/tipExamList.vue
@@ -148,7 +148,7 @@ export default {
}
});
if (obj) {
- getTrainingDetail(obj.trainingId ).then(res => {
+ getTrainingDetail(obj.trainingId).then(res => {
this.courseModel = {
id: res.data.id,
name: res.data.name,
@@ -157,6 +157,7 @@ export default {
minDuration: res.data.minDuration,
updateTime: res.data.updateTime
};
+ this.$store.dispatch('exam/setCenter ', res.data.locateDeviceCode);
}).catch(error => {
this.$message.error(this.$t('display.exam.getTestInformation') + ':' + error.message);
});
diff --git a/src/views/jlmap/index.vue b/src/views/jlmap/index.vue
index d946938c4..7d3c6b7d9 100644
--- a/src/views/jlmap/index.vue
+++ b/src/views/jlmap/index.vue
@@ -89,6 +89,9 @@ export default {
'$store.state.training.rezoomCount': function (val, old) {
this.setCenter(this.$store.state.training.offsetStationCode);
},
+ '$store.state.exam.deviceCode': function (val) {
+ val && this.setCenter(val);
+ },
'$store.state.config.canvasSizeCount': function (val) {
this.resetSize();
},
diff --git a/src/views/system/commandDictionary/edit.vue b/src/views/system/commandDictionary/edit.vue
new file mode 100644
index 000000000..f72c884f2
--- /dev/null
+++ b/src/views/system/commandDictionary/edit.vue
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
+
diff --git a/src/views/system/commandDictionary/index.vue b/src/views/system/commandDictionary/index.vue
new file mode 100644
index 000000000..eabfa8f6b
--- /dev/null
+++ b/src/views/system/commandDictionary/index.vue
@@ -0,0 +1,163 @@
+
+
+
+
+
+
+
+
+