diff --git a/src/App.vue b/src/App.vue
index 196366903..8ba7c2533 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -26,8 +26,8 @@ export default {
}
},
watch: {
- '$store.state.socket.roomInvite': function (val) {
- if (val.creatorId) {
+ '$store.state.socket.simulationInvite': function (val) {
+ if (val.creator) {
this.subscribeMessage(val);
}
},
@@ -73,7 +73,7 @@ export default {
if (getSessionStorage('project') != 'refereeJsxt' && getSessionStorage('project') != 'jsxt' && !(getSessionStorage('project').includes('design'))) {
this.$refs.deomonTopic.doShow(res);
}
- this.$store.dispatch('socket/setRoomInvite');
+ this.$store.dispatch('socket/setSimulationInvite');
}
},
subscribe() {
diff --git a/src/api/chat.js b/src/api/chat.js
index 34d09d360..948a4dc3d 100644
--- a/src/api/chat.js
+++ b/src/api/chat.js
@@ -360,4 +360,47 @@ export function quitCoversition(group, conversationId) {
method: 'delete'
});
}
-
+/** 发起会话 */
+export function startConversition(group, data) {
+ return request({
+ url: `/api/simulation/${group}/conversation`,
+ method: 'post',
+ data: data
+ });
+}
+/** 根据会话id获取仿真会话 */
+export function getSimulationConversition(group, conversationId) {
+ return request({
+ url: `/api/simulation/${group}/conversation/${conversationId}`,
+ method: 'get'
+ });
+}
+/** 发送会话消息 */
+export function sendSimulationConversition(group, conversationId, file) {
+ return request({
+ url: `/api/simulation/${group}/conversation/${conversationId}/chat`,
+ method: 'post',
+ data: file
+ });
+}
+/** 成员接收仿真会话邀请 */
+export function acceptConversitionInvite(group, conversationId) {
+ return request({
+ url: `/api/simulation/${group}/conversation/${conversationId}/connect`,
+ method: 'post'
+ });
+}
+/** 结束仿真会话 */
+export function overSimulationConversition(group, conversationId) {
+ return request({
+ url: `/api/simulation/${group}/conversation/${conversationId}/over`,
+ method: 'put'
+ });
+}
+/** 获取所有会话 */
+export function getAllConversition(group) {
+ return request({
+ url: `/api/simulation/${group}/conversation/listAll`,
+ method: 'get'
+ });
+}
diff --git a/src/api/jmap/map.js b/src/api/jmap/map.js
index 5e034d1c1..31b9bbca4 100644
--- a/src/api/jmap/map.js
+++ b/src/api/jmap/map.js
@@ -208,3 +208,17 @@ export function getByGroupStationList(group) {
method: 'get'
});
}
+/** 查询所有上线的地图信息列表 */
+export function getAllMapOnline() {
+ return request({
+ url: `/api/map/online/all`,
+ method: 'get'
+ });
+}
+/** 查询地图下所有需要值班员的车站 */
+export function getStationListNeedAttendant(id) {
+ return request({
+ url: `/api/map/${id}/station/needSupervisor`,
+ method: 'get'
+ });
+}
diff --git a/src/api/jointSimulation.js b/src/api/jointSimulation.js
new file mode 100644
index 000000000..b777bba2e
--- /dev/null
+++ b/src/api/jointSimulation.js
@@ -0,0 +1,47 @@
+import request from '@/utils/request';
+
+// 分配(取消)用户角色扮演
+export function assignUsersPlayRoles(data, group) {
+ return request({
+ url: `/api/jointSimulation/${group}/assignRoles`,
+ method: 'put',
+ data: data
+ });
+}
+// 添加新仿真成员
+export function addSimulationMember(data, group) {
+ return request({
+ url: `/api/jointSimulation/${group}/member`,
+ method: 'post',
+ data: data
+ });
+}
+// 获取权限生成仿真用户
+export function jointSimulationByPermission(group) {
+ return request({
+ url: `/api/jointSimulation/${group}/permission`,
+ method: 'post'
+ });
+}
+// 生成综合仿真分享二维码
+export function getSimulationQrcode(group) {
+ return request({
+ url: `/api/jointSimulation/${group}/qrCode`,
+ method: 'get'
+ });
+}
+// 获取用户所在的综合演练
+export function getSimulationListCantainUser() {
+ return request({
+ url: `/api/jointSimulation/list/containUser`,
+ method: 'get'
+ });
+}
+// 将制定用户踢出房间
+export function kickOutMember(group, userId) {
+ return request({
+ url: `/api/jointSimulation/${group}/kickOut?userId=${userId}`,
+ method: 'delete'
+
+ });
+}
diff --git a/src/api/login.js b/src/api/login.js
index 61f07a331..ee13e3772 100644
--- a/src/api/login.js
+++ b/src/api/login.js
@@ -83,3 +83,13 @@ export function checkLoginLine() {
method: 'get'
});
}
+// 获取登录信息(用户&设备)
+export function getLoginInfo(token) {
+ return request({
+ url: '/api/login/loginUserInfo',
+ method: 'get',
+ params: {
+ token
+ }
+ });
+}
diff --git a/src/api/management/exam.js b/src/api/management/exam.js
index b9cce0170..51d0ac757 100644
--- a/src/api/management/exam.js
+++ b/src/api/management/exam.js
@@ -8,6 +8,14 @@ export function setCourseList(data) {
data: data
});
}
+/** 贵州装备 创建对应课程考题 */
+export function setCourseListGzb(data) {
+ return request({
+ url: `/api/exam/project/GZB`,
+ method: 'post',
+ data: data
+ });
+}
/** 获取对应课程下类型 */
export function getCourseTypeList(data) {
@@ -93,3 +101,11 @@ export function getExamParperList(lessonId) {
method: 'get'
});
}
+
+/** 根据课程ID获取班级 */
+export function getExamClassList(lessonId) {
+ return request({
+ url: `/api/lesson/${lessonId}/classes`,
+ method: 'get'
+ });
+}
diff --git a/src/api/project.js b/src/api/project.js
index 82d0ed706..35e2d94e2 100644
--- a/src/api/project.js
+++ b/src/api/project.js
@@ -99,3 +99,47 @@ export function getDevicesByType(type) {
method: 'get'
});
}
+/** 添加/修改车站综合监控配置 */
+export function setIscsLwConfig(id, data) {
+ return request({
+ url: `/api/device/${id}/config/iscslw`,
+ method: 'put',
+ data: data
+ });
+}
+/** 添加/修改中心综合监控配置 */
+export function setIscsCwConfig(id, data) {
+ return request({
+ url: `/api/device/${id}/config/iscscw`,
+ method: 'put',
+ data: data
+ });
+}
+
+/** 添加/修改大屏工作站配置 */
+export function setLswConfig(id, data) {
+ return request({
+ url: `/api/device/${id}/config/lsw`,
+ method: 'put',
+ data: data
+ });
+}
+
+/** 添加/修改CCTV工作站配置 */
+export function setCctvConfig(id, data) {
+ return request({
+ url: `/api/device/${id}/config/cctv`,
+ method: 'put',
+ data: data
+ });
+}
+
+/** 添加/修改CCTV工作站配置 */
+export function setVrPsdConfig(id, data) {
+ return request({
+ url: `/api/device/${id}/config/vrpsd`,
+ method: 'put',
+ data: data
+ });
+}
+
diff --git a/src/api/simulation.js b/src/api/simulation.js
index f01605202..c10812b38 100644
--- a/src/api/simulation.js
+++ b/src/api/simulation.js
@@ -302,13 +302,6 @@ export function getScriptMemberData(group) {
method: 'get'
});
}
-/** 获取剧本编制的所有成员角色(新版地图)*/
-export function getScriptMemberDataNew(group) {
- return request({
- url: `/api/scriptSimulation/${group}/allMember`,
- method: 'get'
- });
-}
/** 获取剧本出演成员角色 */
export function getScriptPlayMember(group) {
@@ -770,4 +763,24 @@ export function getMemberInfo(group, memberId) {
method: 'get'
});
}
-
+/** 获取新版综合仿真仿真成员列表 */
+export function getSimulationMemberList(group) {
+ return request({
+ url: `/simulation/${group}/members`,
+ method: 'get'
+ });
+}
+/** 获取仿真用户信息 */
+export function getSimulationUserInfo(group) {
+ return request({
+ url: `/simulation/${group}/simulationUser`,
+ method: 'get'
+ });
+}
+// 获取所有仿真用户
+export function getAllSimulationUser(group) {
+ return request({
+ url: `/simulation/${group}/simulationUsers`,
+ method: 'get'
+ });
+}
diff --git a/src/i18n/langs/zh/global.js b/src/i18n/langs/zh/global.js
index cef890583..50aec8584 100644
--- a/src/i18n/langs/zh/global.js
+++ b/src/i18n/langs/zh/global.js
@@ -206,5 +206,5 @@ export default {
permissionAllNum:'权限总数',
set: '设 置',
joinNewRoom: '加入新房间',
- roomId: '房间号:'
+ roomId: '仿真号:'
};
diff --git a/src/jmapNew/config/skinCode/bejing_01.js b/src/jmapNew/config/skinCode/bejing_01.js
index ef8770859..0cee4be8e 100644
--- a/src/jmapNew/config/skinCode/bejing_01.js
+++ b/src/jmapNew/config/skinCode/bejing_01.js
@@ -494,7 +494,8 @@ class SkinCode extends defaultStyle {
},
lamp: {
radiusR: 6, // 灯大小
- controlColor: '#00FF00' // 灯颜色
+ controlColor: '#00FF00', // 灯颜色
+ activeColor:'#ff0000' // 控制灯激活颜色
},
mouseOverStyle: {
fontSize: 10,
diff --git a/src/jmapNew/config/skinCode/chengdu_01.js b/src/jmapNew/config/skinCode/chengdu_01.js
index aa9e114b0..725492b1e 100644
--- a/src/jmapNew/config/skinCode/chengdu_01.js
+++ b/src/jmapNew/config/skinCode/chengdu_01.js
@@ -449,7 +449,8 @@ class SkinCode extends defaultStyle {
},
lamp: {
radiusR: 6, // 控制灯大小
- controlColor: '#00FF00' // 控制灯颜色
+ controlColor: '#00FF00', // 控制灯颜色
+ activeColor:'#ff0000' // 控制灯激活颜色
}
};
diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js
index 3e2aeab49..5a66a2e8a 100644
--- a/src/jmapNew/config/skinCode/ningbo_01.js
+++ b/src/jmapNew/config/skinCode/ningbo_01.js
@@ -487,7 +487,8 @@ class SkinCode extends defaultStyle {
},
lamp: {
radiusR: 6, // 控制灯大小
- controlColor: '#00FF00' // 控制灯颜色
+ controlColor: '#00FF00', // 控制灯颜色
+ activeColor:'#ff0000' // 控制灯激活颜色
}
};
diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js
index 659c4e500..b33d1af11 100644
--- a/src/jmapNew/map.js
+++ b/src/jmapNew/map.js
@@ -11,7 +11,7 @@ import { selectLineCode } from './config/deviceStyle';
import { deviceFactory, createBoundingRect, calculateDCenter } from './utils/parser';
import { deepAssign } from '@/utils/index';
import store from '@/store/index_APP_TARGET';
-import { loadPropConvert } from './theme/factory';
+import Vue from 'vue';
const renderer = 'canvas';
const devicePixelRatio = 1;
@@ -27,6 +27,9 @@ class Jlmap {
// 线路参数
this.lineCode = '';
+ // 大屏判断
+ this.screenFlag = false;
+
// 皮肤风格
this.style = {};
@@ -135,8 +138,12 @@ class Jlmap {
setOptions(opts) {
const options = this.pullBack(opts);
- this.$options.update(options);
- this.$painter.updateTransform(this.$options);
+ if (this.screenFlag) {
+ this.$painter.updateScreen(options);
+ } else {
+ this.$options.update(options);
+ this.$painter.updateTransform(this.$options);
+ }
if (this.$options.disabled == true) {
this.$mouseController.disable();
} else {
@@ -148,6 +155,18 @@ class Jlmap {
if (this.methods.optionsUpdate instanceof Function) { this.methods.optionsUpdate(this.$options); }
}
+ switchScreen(data, num, sum) {
+ const sumHalf = sum / 2;
+ const dx = data.width / sumHalf;
+ const dy = data.height / sumHalf;
+ const row = num <= sumHalf ? 0 : 1;
+ const opts = {
+ dx: dx * (row == 0 ? num - 1 : num - sumHalf - 1),
+ dy: dy * row
+ };
+ this.$painter.updateScreenNum(opts);
+ }
+
setCenter(deviceCode) {
const device = this.mapDevice[deviceCode];
if (device && device.instance) {
@@ -157,20 +176,23 @@ class Jlmap {
}
}
setRevoverBigScreen() {
+ this.screenFlag = false;
this.$painter.updateTransform({ scaleRate: this.$options.scaleRate, offsetX: this.$options.offsetX, offsetY: this.$options.offsetY });
}
setRecover(opts) {
+ this.screenFlag = false;
this.$painter.updateTransform({ scaleRate: opts.scaleRate, offsetX: opts.offsetX, offsetY: opts.offsetY });
}
setUpdateScreen(opts) {
this.setRecover({ scaleRate: 1, offsetX: 0, offsetY: 0 });
- const arr = [];
+ this.screenFlag = true;
+ const screenList = [];
const rectList = [];
let rect = '';
for (const i in this.mapDevice) {
const element = this.mapDevice[i];
- if (element.instance && element._type == 'Section') {
+ if (element.instance && (element._type == 'Section' || element._type == 'Station' || element._type == 'StationStand')) {
if (!rect) {
rect = element.instance.getBoundingRect().clone();
} else {
@@ -178,18 +200,23 @@ class Jlmap {
}
}
}
- const screenSplit = opts.list.length ? opts.list : loadPropConvert(this.lineCode).screenSplit;
+ if (!opts.offsetList) {
+ opts.offsetList = [];
+ }
+ const screenSplit = opts.list.length ? opts.list : Vue.prototype.$theme.loadPropConvert(this.lineCode).screenSplit;
+ const screenDifference = Vue.prototype.$theme.loadPropConvert(this.lineCode).screenDifference || 160;
const splitList = JSON.parse(JSON.stringify(screenSplit));
const num = screenSplit.length + 1;
const offsetY = (opts.height - 100) / num; // 高度差
const maxWidth = rect.width;
splitList.push(maxWidth);
- const scaleWidth = Math.floor((((opts.width - 200) * num) / rect.width) * 100) / 100;
- const scaleHeight = Math.floor(((opts.height - 100) / (rect.height * num)) * 100) / 100;
- const scale = Math.min(scaleWidth, scaleHeight);
+ const scaleX = Math.floor((((opts.width - 200) * num) / rect.width) * 100) / 100;
+ const scaleY = Math.floor(((opts.height - 100) / (rect.height * num)) * 100) / 100;
+ const scale = Math.min(scaleX, scaleY);
+ // console.log('scaleX', scaleX, 'scaleY', scaleY, 'scale', scale, offsetY, rect.height * scale);
- // const offsetHeight = (offsetY - (rect.height * scale)) + Math.abs(rect.x * scale); // 高度差
- // console.log(offsetHeight, opts.height, screenSplit, offsetY, rect, '缩放对比>', scaleWidth, scaleHeight);
+ // const offsetHeight = (offsetY - (rect.height * scale)) / 2; // 高度差
+ // console.log(offsetHeight, opts.height, screenSplit, offsetY, rect, '缩放对比>', scaleX, scaleY);
for (let i = 0; i < splitList.length; i++) {
let offsetX = '';
@@ -199,13 +226,13 @@ class Jlmap {
const dx = (opts.width - (splitList[i] - splitList[i - 1]) * scale) / 2; // 居中计算偏移值
offsetX = splitList[i - 1] * scale - dx;
}
- // const param = { scaleRate: scale, offsetX: offsetX, offsetY: -(offsetY * i) - offsetHeight};
- const param = { scaleRate: scale, offsetX: offsetX, offsetY: -160 - (offsetY * i) };
- arr.push(param);
+ const offset = opts.offsetList[i] || 0;
+ const param = { scaleRateX: scale, scaleRateY: scale, offsetX: offsetX, offsetY: -screenDifference - (offsetY * i) - offset };
+ screenList.push(param);
const rect = {x: 0, y: 0, width: Number(splitList[i]) + 5, height: opts.height};
rectList.push(rect);
}
- this.$painter.updateTransform1(arr, rectList);
+ this.$painter.updateTransform1(screenList, rectList);
}
setLevelVisible(list) {
diff --git a/src/jmapNew/painter.js b/src/jmapNew/painter.js
index 6e9c41a15..f88631836 100644
--- a/src/jmapNew/painter.js
+++ b/src/jmapNew/painter.js
@@ -199,6 +199,12 @@ class Painter {
this.$transformHandle.updateTransform(opt);
}
+ updateScreen(opt) {
+ this.$transformHandleScreen.updataOffset(opt);
+ }
+ updateScreenNum(opts) {
+ this.$transformHandleScreen.updataOffsetNum(opts);
+ }
updateTransform1(list, opts) {
this.screenFlag = true;
this.$transformHandleScreen.updateTransform(list, opts);
diff --git a/src/jmapNew/shape/Signal/ESigLamp.js b/src/jmapNew/shape/Signal/ESigLamp.js
index 88a4dddc9..910688131 100644
--- a/src/jmapNew/shape/Signal/ESigLamp.js
+++ b/src/jmapNew/shape/Signal/ESigLamp.js
@@ -1,7 +1,7 @@
import Line from 'zrender/src/graphic/shape/Line';
import Arc from 'zrender/src/graphic/shape/Arc';
import Group from 'zrender/src/container/Group';
-import Path from 'zrender/src/graphic/Path';
+// import Path from 'zrender/src/graphic/Path';
import {ESigFault} from './ESigFault';
class ESigLamp extends Group {
@@ -103,11 +103,11 @@ class ESigLamp extends Group {
}
faultShow() {
- this.lampFault.show();
+ this.lampFault && this.lampFault.show();
}
faultHide() {
- this.lampFault.hide();
+ this.lampFault && this.lampFault.hide();
}
setColor(color) {
diff --git a/src/jmapNew/shape/Signal/index.js b/src/jmapNew/shape/Signal/index.js
index 3aec659eb..4edc37021 100644
--- a/src/jmapNew/shape/Signal/index.js
+++ b/src/jmapNew/shape/Signal/index.js
@@ -548,7 +548,9 @@ class Signal extends Group {
// 恢复状态
recover() {
this.lamps.forEach(item=> { item.show(); });
- this.lamps[0].faultHide();
+ if (this.style.Signal.lamp.faultType && this.style.Signal.lamp.faultType == 'flash') {
+ this.lamps[0].faultHide();
+ }
this.sigName.setStyle({ textBorderWidth: 0 });
this.sigName.setColor(this.style.Signal.text.defaultColor);
this.setAutoClose();
diff --git a/src/jmapNew/shape/ZcControl/index.js b/src/jmapNew/shape/ZcControl/index.js
index a5bf38970..6be973b52 100644
--- a/src/jmapNew/shape/ZcControl/index.js
+++ b/src/jmapNew/shape/ZcControl/index.js
@@ -61,8 +61,23 @@ export default class ZcControl extends Group {
// 设置状态
setState(model) {
+ this.recover();
+ model.fault == 'FAULT' && this.fault();
if (!this.isShowShape) return;
}
+
+ recover() {
+ if (this.style.ZcControl.visible) {
+ this.control.setControlColor(this.style.ZcControl.lamp.controlColor);
+ }
+ }
+
+ fault() {
+ if (this.style.ZcControl.visible) {
+ this.control.setControlColor(this.style.ZcControl.lamp.activeColor);
+ }
+ }
+
createMouseEvent() {
if (this.style.ZcControl.mouseOverStyle) {
this.mouseEvent = new EMouse(this);
diff --git a/src/jmapNew/theme/beijing_01/menus/index.vue b/src/jmapNew/theme/beijing_01/menus/index.vue
index 6b234ebdc..01a075fa4 100644
--- a/src/jmapNew/theme/beijing_01/menus/index.vue
+++ b/src/jmapNew/theme/beijing_01/menus/index.vue
@@ -3,7 +3,6 @@
-
@@ -22,7 +21,6 @@ import { mapGetters } from 'vuex';
import MenuCancel from './menuCancel';
import MenuSignal from './menuSignal';
import MenuButton from './menuButton';
-import MenuStationControl from './menuStationControl';
import MenuStationStand from './menuStationStand';
import MenuSwitch from './menuSwitch';
import MenuSection from './menuSection';
@@ -43,7 +41,6 @@ export default {
MenuSignal,
MenuSwitch,
MenuSection,
- MenuStationControl,
MenuStationStand,
MenuStation,
MenuTrain,
diff --git a/src/jmapNew/theme/beijing_01/menus/menuSection.vue b/src/jmapNew/theme/beijing_01/menus/menuSection.vue
index 5d2977505..d72b543b0 100644
--- a/src/jmapNew/theme/beijing_01/menus/menuSection.vue
+++ b/src/jmapNew/theme/beijing_01/menus/menuSection.vue
@@ -170,19 +170,10 @@ export default {
}
}
},
- // 添加计划车
+ // 添加计划车(开发专用)
addPlanTrain() {
- const operate = {
- start: true,
- code: this.selected.code,
- operation: OperationEvent.Train.createPlanTrain.menu.operation,
- param: {
- sectionCode: this.selected.code
- }
- };
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Train.createPlanTrain, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainAddPlan.doShow(operate);
}
});
diff --git a/src/jmapNew/theme/beijing_01/menus/menuStation.vue b/src/jmapNew/theme/beijing_01/menus/menuStation.vue
index bc19cf50f..76326273d 100644
--- a/src/jmapNew/theme/beijing_01/menus/menuStation.vue
+++ b/src/jmapNew/theme/beijing_01/menus/menuStation.vue
@@ -4,6 +4,7 @@
+
@@ -20,12 +21,15 @@ import { DeviceMenu } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
-import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
+// import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
+import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
+import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'StationMenu',
components: {
PopMenu,
+ SetFault,
StationCmdControl,
StationHumanControlAll,
StationSetRouteControlAll,
@@ -162,42 +166,18 @@ export default {
},
// 设置故障
setStoppage() {
- const operate = {
- start: true,
- send: true,
- code: this.selected.code,
- operation: OperationEvent.Station.stoppage.menu.operation
- };
-
- mouseCancelState(this.selected);
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
});
},
// 取消故障
cancelStoppage() {
- const operate = {
- start: true,
- send: true,
- code: this.selected.code,
- operation: OperationEvent.Station.cancelStoppage.menu.operation
- };
-
- mouseCancelState(this.selected);
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
});
},
// 全站设置联锁自动触发
diff --git a/src/jmapNew/theme/beijing_01/menus/menuStationControl.vue b/src/jmapNew/theme/beijing_01/menus/menuStationControl.vue
deleted file mode 100644
index 6e394cecd..000000000
--- a/src/jmapNew/theme/beijing_01/menus/menuStationControl.vue
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-
-
-
diff --git a/src/jmapNew/theme/chengdu_01/menus/menuStation.vue b/src/jmapNew/theme/chengdu_01/menus/menuStation.vue
index 369c0acad..fe3f61fff 100644
--- a/src/jmapNew/theme/chengdu_01/menus/menuStation.vue
+++ b/src/jmapNew/theme/chengdu_01/menus/menuStation.vue
@@ -1,6 +1,7 @@
@@ -12,11 +13,14 @@ import CancelMouseState from '@/mixin/CancelMouseState';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
+import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
+import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'StationMenu',
components: {
PopMenu,
+ SetFault,
NoticeInfo
},
mixins: [
@@ -98,38 +102,18 @@ export default {
},
// 设置故障
setStoppage() {
- const operate = {
- code: this.selected.code,
- operation: OperationEvent.Station.stoppage.menu.operation
- };
-
- this.mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
});
},
// 取消故障
cancelStoppage() {
- const operate = {
- code: this.selected.code,
- operation: OperationEvent.Station.cancelStoppage.menu.operation
- };
-
- this.mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
});
}
}
diff --git a/src/jmapNew/theme/chengdu_03/menus/dialog/sectionDetail.vue b/src/jmapNew/theme/chengdu_03/menus/dialog/sectionDetail.vue
index ebbdd8c4c..fd3803d05 100644
--- a/src/jmapNew/theme/chengdu_03/menus/dialog/sectionDetail.vue
+++ b/src/jmapNew/theme/chengdu_03/menus/dialog/sectionDetail.vue
@@ -59,9 +59,6 @@ export default {
};
},
computed: {
- ...mapGetters('map', [
- 'signalList'
- ]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
diff --git a/src/jmapNew/theme/chengdu_03/menus/menuSection.vue b/src/jmapNew/theme/chengdu_03/menus/menuSection.vue
index 9029a62ec..fc999e07c 100644
--- a/src/jmapNew/theme/chengdu_03/menus/menuSection.vue
+++ b/src/jmapNew/theme/chengdu_03/menus/menuSection.vue
@@ -2,7 +2,6 @@
-
@@ -16,7 +15,6 @@ import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionContr
import TrainAddPlan from '@/jmapNew/theme/components/menus/dialog/trainAddPlan';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import SectionDetail from './dialog/sectionDetail';
-import TrainCreate from './dialog/trainCreate';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
@@ -31,7 +29,6 @@ export default {
PopMenu,
SectionControl,
SectionDetail,
- TrainCreate,
NoticeInfo,
TrainAddPlan,
SetFault
diff --git a/src/jmapNew/theme/chengdu_03/menus/menuStation.vue b/src/jmapNew/theme/chengdu_03/menus/menuStation.vue
index 4b9d87511..d66dc9fa0 100644
--- a/src/jmapNew/theme/chengdu_03/menus/menuStation.vue
+++ b/src/jmapNew/theme/chengdu_03/menus/menuStation.vue
@@ -1,6 +1,7 @@
@@ -11,13 +12,15 @@ import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import CancelMouseState from '@/mixin/CancelMouseState';
import { mapGetters } from 'vuex';
-import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
+import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
+import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'StationMenu',
components: {
PopMenu,
+ SetFault,
NoticeInfo
},
mixins: [
@@ -100,42 +103,18 @@ export default {
},
// 设置故障
setStoppage() {
- const operate = {
- start: true,
- send: true,
- code: this.selected.code,
- operation: OperationEvent.Station.stoppage.menu.operation
- };
-
- this.mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
});
},
// 取消故障
cancelStoppage() {
- const operate = {
- start: true,
- send: true,
- code: this.selected.code,
- operation: OperationEvent.Station.cancelStoppage.menu.operation
- };
-
- this.mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
});
}
}
diff --git a/src/jmapNew/theme/components/menus/dialog/setFault.vue b/src/jmapNew/theme/components/menus/dialog/setFault.vue
index 535965719..cc702aabf 100644
--- a/src/jmapNew/theme/components/menus/dialog/setFault.vue
+++ b/src/jmapNew/theme/components/menus/dialog/setFault.vue
@@ -101,16 +101,25 @@ export default {
this.stationName = '';
this.operation = operate.operation;
this.cmdType = operate.cmdType;
+ if (selected._type == 'Station') {
+ if (selected.zcCode) {
+ selected = this.$store.getters['map/getDeviceByCode'](selected.zcCode);
+ } else {
+ selected._type = '';
+ }
+ }
this.deviceName = deviceType[selected._type] + '-' + selected.name;
this.faultList = deviceFaultType[selected._type];
- if (this.faultList.length) {
+ if (this.faultList && this.faultList.length) {
this.form.faultType = this.faultList[0].value;
}
}
- this.dialogShow = true;
- this.$nextTick(function () {
- this.$store.dispatch('training/emitTipFresh');
- });
+ if (selected._type) {
+ this.dialogShow = true;
+ this.$nextTick(function () {
+ this.$store.dispatch('training/emitTipFresh');
+ });
+ }
},
doClose() {
this.loading = false;
diff --git a/src/jmapNew/theme/factory.js b/src/jmapNew/theme/factory.js
index 3f21fcace..1cb580e17 100644
--- a/src/jmapNew/theme/factory.js
+++ b/src/jmapNew/theme/factory.js
@@ -34,6 +34,12 @@ class Theme {
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/index`).default);
}
+ // // 加载菜单组件
+ // loadMenuComponent(code) {
+ // const menuCode = code || this._code;
+ // return new LoadMenuComponent(menuCode);
+ // }
+
// 加载运行图计划表组件
// loadPlanComponent(code) {
// return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/planSchedule/index`).default);
diff --git a/src/jmapNew/theme/foshan_01/menus/menuStation.vue b/src/jmapNew/theme/foshan_01/menus/menuStation.vue
index 916396b92..1c500e738 100644
--- a/src/jmapNew/theme/foshan_01/menus/menuStation.vue
+++ b/src/jmapNew/theme/foshan_01/menus/menuStation.vue
@@ -4,6 +4,7 @@
+
@@ -16,7 +17,9 @@ import StationSetRouteControlAll from './dialog/stationSetRouteControlAll';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
+import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
+import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'StationMenu',
@@ -25,6 +28,7 @@ export default {
StationCmdControl,
StationHumanControlAll,
StationSetRouteControlAll,
+ SetFault,
NoticeInfo
},
props: {
@@ -133,46 +137,18 @@ export default {
},
// 设置故障
setStoppage() {
- const operate = {
- start: true,
- send: true,
- code: this.selected.code,
- type: MapDeviceType.Station.type,
- label: MapDeviceType.Station.label,
- operation: OperationEvent.Station.stoppage.menu.operation
- };
-
- this.mouseCancelState(this.selected);
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
});
},
// 取消故障
cancelStoppage() {
- const operate = {
- start: true,
- send: true,
- code: this.selected.code,
- type: MapDeviceType.Station.type,
- label: MapDeviceType.Station.label,
- operation: OperationEvent.Station.cancelStoppage.menu.operation
- };
-
- this.mouseCancelState(this.selected);
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
});
},
// 全站设置联锁自动触发
diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue b/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue
index beb684f1b..79d195383 100644
--- a/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue
+++ b/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue
@@ -4,6 +4,7 @@
+
@@ -15,9 +16,9 @@ import StationHumanControlAll from '@/jmapNew/theme/components/menus/dialog/stat
import StationSetRouteControlAll from '@/jmapNew/theme/components/menus/dialog/stationSetRouteControlAll';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
-import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
+import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
@@ -28,6 +29,7 @@ export default {
StationCmdControl,
StationHumanControlAll,
StationSetRouteControlAll,
+ SetFault,
NoticeInfo
},
props: {
@@ -156,44 +158,18 @@ export default {
},
// 设置故障
setStoppage() {
- const step = {
- start: true,
- code: `${this.selected.code}`,
- operation: OperationEvent.Station.stoppage.menu.operation,
- cmdType: CMD.Station.CMD_STOPPAGE,
- param: {
- Station_Code: `${this.selected.code}`
- }
- };
- this.$store.dispatch('training/next', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 取消故障
cancelStoppage() {
- const step = {
- start: true,
- code: `${this.selected.code}`,
- operation: OperationEvent.Station.cancelStoppage.menu.operation,
- cmdType: CMD.Station.CMD_CANCEL_STOPPAGE,
- param: {
- Station_Code: `${this.selected.code}`
- }
- };
- this.$store.dispatch('training/next', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 全站设置联锁自动触发
diff --git a/src/jmapNew/theme/haerbin_01/menus/menuStation.vue b/src/jmapNew/theme/haerbin_01/menus/menuStation.vue
index d0a34ba69..e0ec3abfc 100644
--- a/src/jmapNew/theme/haerbin_01/menus/menuStation.vue
+++ b/src/jmapNew/theme/haerbin_01/menus/menuStation.vue
@@ -4,6 +4,7 @@
+
@@ -18,6 +19,8 @@ import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
+import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
+import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
export default {
@@ -26,6 +29,7 @@ export default {
PopMenu,
StationCmdControl,
StationHumanControlAll,
+ SetFault,
StationSetRouteControlAll,
NoticeInfo
},
@@ -158,44 +162,18 @@ export default {
},
// 设置故障
setStoppage() {
- const step = {
- start: true,
- code: `${this.selected.code}`,
- operation: OperationEvent.Station.stoppage.menu.operation,
- cmdType: CMD.Station.CMD_STOPPAGE,
- param: {
- Station_Code: `${this.selected.code}`
- }
- };
- this.$store.dispatch('training/next', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 取消故障
cancelStoppage() {
- const step = {
- start: true,
- code: `${this.selected.code}`,
- operation: OperationEvent.Station.cancelStoppage.menu.operation,
- cmdType: CMD.Station.CMD_CANCEL_STOPPAGE,
- param: {
- Station_Code: `${this.selected.code}`
- }
- };
- this.$store.dispatch('training/next', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 全站设置联锁自动触发
diff --git a/src/jmapNew/theme/haerbin_01/model.js b/src/jmapNew/theme/haerbin_01/model.js
index c7d80a99e..53a250e7f 100644
--- a/src/jmapNew/theme/haerbin_01/model.js
+++ b/src/jmapNew/theme/haerbin_01/model.js
@@ -3,6 +3,7 @@ import deviceType from '../../constant/deviceType';
class Model {
constructor() {
this.screenLine = 3;
+ this.screenDifference = 50;
// 公共字段部分默认初始值
this['public'] = {};
this['public'][deviceType.Signal] = {
diff --git a/src/jmapNew/theme/ningbo_01/menus/index.vue b/src/jmapNew/theme/ningbo_01/menus/index.vue
index d025dcf85..db1f223ef 100644
--- a/src/jmapNew/theme/ningbo_01/menus/index.vue
+++ b/src/jmapNew/theme/ningbo_01/menus/index.vue
@@ -7,7 +7,6 @@
-
diff --git a/src/jmapNew/theme/ningbo_01/menus/menuStation.vue b/src/jmapNew/theme/ningbo_01/menus/menuStation.vue
index 681f789db..d31c404a0 100644
--- a/src/jmapNew/theme/ningbo_01/menus/menuStation.vue
+++ b/src/jmapNew/theme/ningbo_01/menus/menuStation.vue
@@ -4,6 +4,7 @@
+
@@ -17,9 +18,10 @@ import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
-import { OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
+import { DeviceMenu } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
-import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
+// import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
+import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'StationMenu',
@@ -27,6 +29,7 @@ export default {
PopMenu,
StationCmdControl,
StationHumanControlAll,
+ SetFault,
StationSetRouteControlAll,
NoticeInfo
},
@@ -85,12 +88,12 @@ export default {
menuForce: [
{
label: '设置ZC故障',
- handler: this.undeveloped,
+ handler: this.setStoppage,
cmdType: CMD.Station.CMD_STATION_ADD_FAULT
},
{
label: '取消ZC故障',
- handler: this.undeveloped,
+ handler: this.cancelStoppage,
cmdType: CMD.Station.CMD_STATION_REMOVE_FAULT
}
]
@@ -142,42 +145,18 @@ export default {
},
// 设置故障
setStoppage() {
- const operate = {
- start: true,
- send: true,
- code: this.selected.code,
- operation: OperationEvent.Station.stoppage.menu.operation
- };
-
- mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow();
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow();
});
},
// 取消故障
cancelStoppage() {
- const operate = {
- start: true,
- send: true,
- code: this.selected.code,
- operation: OperationEvent.Station.cancelStoppage.menu.operation
- };
-
- mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow();
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow();
});
},
// 全站设置联锁自动触发
diff --git a/src/jmapNew/theme/ningbo_01/model.js b/src/jmapNew/theme/ningbo_01/model.js
index 89c5550cf..c00fd4260 100644
--- a/src/jmapNew/theme/ningbo_01/model.js
+++ b/src/jmapNew/theme/ningbo_01/model.js
@@ -4,6 +4,7 @@ class Model {
constructor() {
this.screenLine = 3;
this.screenSplit = ['5165', '10303'];
+ this.screenDifference = 180;
// 公共字段部分默认初始值
this['public'] = {};
this['public'][deviceType.Signal] = {
diff --git a/src/jmapNew/theme/xian_01/menus/menuStation.vue b/src/jmapNew/theme/xian_01/menus/menuStation.vue
index 47f1bcd8b..876168d2d 100644
--- a/src/jmapNew/theme/xian_01/menus/menuStation.vue
+++ b/src/jmapNew/theme/xian_01/menus/menuStation.vue
@@ -5,6 +5,7 @@
+
@@ -17,7 +18,7 @@ import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { DeviceMenu } from '@/scripts/ConstDic';
-import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
+import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
@@ -28,6 +29,7 @@ export default {
PopMenu,
StationCmdControl,
StationHumanControlAll,
+ SetFault,
StationSetRouteControlAll,
NoticeInfo
},
@@ -95,13 +97,13 @@ export default {
},
menuForce: [
{
- label: '设置故障',
- handler: this.undeveloped,
+ label: '设置ZC故障',
+ handler: this.setStoppage,
cmdType: CMD.Station.CMD_STATION_ADD_FAULT
},
{
- label: '取消故障',
- handler: this.undeveloped,
+ label: '取消ZC故障',
+ handler: this.cancelStoppage,
cmdType: CMD.Station.CMD_STATION_REMOVE_FAULT
}
]
@@ -157,40 +159,18 @@ export default {
},
// 设置故障
setStoppage() {
- const operate = {
- start: true,
- send: true,
- code: this.selected.code,
- operation: OperationEvent.Station.stoppage.menu.operation
- };
-
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow();
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow();
});
},
// 取消故障
cancelStoppage() {
- const operate = {
- start: true,
- send: true,
- code: this.selected.code,
- operation: OperationEvent.Station.cancelStoppage.menu.operation
- };
-
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow();
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow();
});
},
// 全站设置联锁自动触发
diff --git a/src/jmapNew/theme/xian_02/menus/menuStation.vue b/src/jmapNew/theme/xian_02/menus/menuStation.vue
index 9f196748b..cdabc0a41 100644
--- a/src/jmapNew/theme/xian_02/menus/menuStation.vue
+++ b/src/jmapNew/theme/xian_02/menus/menuStation.vue
@@ -3,6 +3,7 @@
+
@@ -11,9 +12,10 @@ import PopMenu from '@/components/PopMenu/index';
import StationCmdControl from './dialog/stationCmdControl';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
-
+import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
+import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
@@ -22,6 +24,7 @@ export default {
components: {
PopMenu,
StationCmdControl,
+ SetFault,
NoticeInfo
},
props: {
@@ -142,12 +145,12 @@ export default {
},
menuForce: [
{
- label: '设置故障',
- handler: this.undeveloped
+ label: '设置ZC故障',
+ handler: this.setStoppage
},
{
- label: '取消故障',
- handler: this.undeveloped
+ label: '取消ZC故障',
+ handler: this.cancelStoppage
}
]
};
@@ -198,39 +201,18 @@ export default {
},
// 设置故障
setStoppage() {
- const operate = {
- start: true,
- send: true,
- code: this.selected.code,
- operation: OperationEvent.Station.stoppage.menu.operation
- };
-
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
});
},
// 取消故障
cancelStoppage() {
- const operate = {
- start: true,
- send: true,
- code: this.selected.code,
- operation: OperationEvent.Station.cancelStoppage.menu.operation
- };
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
});
},
// 所有进路自排关
diff --git a/src/jmapNew/transformHandleScreen.js b/src/jmapNew/transformHandleScreen.js
index 07f17fc9f..0e3a9e549 100644
--- a/src/jmapNew/transformHandleScreen.js
+++ b/src/jmapNew/transformHandleScreen.js
@@ -1,6 +1,5 @@
-import {createTransform, createBoundingRect} from './utils/parser';
-
+import {createTransform1, createBoundingRect} from './utils/parser';
class TransformHandle {
constructor(painter) {
this.$painter = painter;
@@ -9,7 +8,13 @@ class TransformHandle {
this.rect = { x: 0, y: 0, width: 0, height: 0 };
this.rectList = [];
- this.transform = [createTransform({ scaleRate: 1, offsetX: 0, offsetY: 0 })];
+ this.transformInit = [];
+ this.transform = [createTransform1({ scaleRateX: 1, scaleRateY: 1, offsetX: 0, offsetY: 0 })];
+ }
+
+ revisibleView(view) {
+ view.show();
+ view.dirty();
}
checkVisible(view, rect) {
@@ -31,6 +36,7 @@ class TransformHandle {
const rect = this.rectList[i];
if (this.checkVisible(view, rect)) {
view.transform = this.transform[i];
+ view.transformIndex = i;
view.decomposeTransform(); // 修改 transform 后同步位置
if (view.screenShow) {
view.screenShow();
@@ -44,6 +50,24 @@ class TransformHandle {
}
}
+ // 视图进行缩放/平移
+ transformView1(view) {
+ if (view) {
+ view.transform = this.transform[view.transformIndex];
+ view.decomposeTransform();
+ if (view.screenShow) {
+ view.screenShow();
+ } else {
+ view.show();
+ }
+ view.dirty();
+ }
+ }
+ // 处理所有视图缩放/平移
+ transformAll1() {
+ this.traverse(this.transformView1, this);
+ }
+
// 处理所有视图缩放/平移
transformAll() {
this.traverse(this.transformView, this);
@@ -59,10 +83,26 @@ class TransformHandle {
this.rectList = rectList;
this.transform = [];
list.forEach(item => {
- this.transform.push(createTransform(item));
+ this.transform.push(createTransform1(item));
});
+ this.transformInit = JSON.parse(JSON.stringify(this.transform));
this.transformAll();
}
+ updataOffset(opt) {
+ this.transform.forEach(item => {
+ item[4] = item[4] + opt.dx;
+ item[5] = item[5] + opt.dy;
+ });
+ this.transformAll1();
+ }
+ updataOffsetNum(opts) {
+ this.transform = JSON.parse(JSON.stringify(this.transformInit));
+ this.transform.forEach(item => {
+ item[4] = item[4] - opts.dx;
+ item[5] = item[5] - opts.dy;
+ });
+ this.transformAll1();
+ }
// 更新画布尺寸
updateZrSize(opts) {
diff --git a/src/jmapNew/utils/parser.js b/src/jmapNew/utils/parser.js
index c803229e2..150f053ca 100644
--- a/src/jmapNew/utils/parser.js
+++ b/src/jmapNew/utils/parser.js
@@ -12,6 +12,13 @@ export function createTransform(opts) {
return transform;
}
+export function createTransform1(opts) {
+ let transform = matrix.create();
+ transform = matrix.scale(matrix.create(), transform, [opts.scaleRateX, opts.scaleRateY]);
+ transform = matrix.translate(matrix.create(), transform, [-opts.offsetX, -opts.offsetY]);
+ return transform;
+}
+
export function createBoundingRect(view) {
const rect = view.getBoundingRect().clone();
const scale = view.scale[0];
diff --git a/src/layout/components/Entry.vue b/src/layout/components/Entry.vue
index bfdca93cf..d808fd3cd 100644
--- a/src/layout/components/Entry.vue
+++ b/src/layout/components/Entry.vue
@@ -30,7 +30,7 @@
diff --git a/src/views/demonstration/deomonTopic/index.vue b/src/views/demonstration/deomonTopic/index.vue
index a73851405..eb35c69e8 100644
--- a/src/views/demonstration/deomonTopic/index.vue
+++ b/src/views/demonstration/deomonTopic/index.vue
@@ -18,12 +18,7 @@
+
diff --git a/src/views/designPlatform/demonList.vue b/src/views/designPlatform/demonList.vue
index e48ed9465..4d25b3cf3 100644
--- a/src/views/designPlatform/demonList.vue
+++ b/src/views/designPlatform/demonList.vue
@@ -127,6 +127,10 @@ export default {
this.$router.push({ path: `/design/bigScreen/${obj.mapId}` });
break;
}
+ case 'bigSplitScreen': {
+ this.$router.push({ path: `/bigSplitScreen/${obj.mapId}` });
+ break;
+ }
}
},
async refresh(filterSelect) {
@@ -193,6 +197,14 @@ export default {
lineCode: elem.lineCode,
cityCode: elem.cityCode
});
+ elem.children.push({
+ id: '7',
+ name: '大屏分屏预览',
+ type: 'bigSplitScreen',
+ mapId: elem.id,
+ lineCode: elem.lineCode,
+ cityCode: elem.cityCode
+ });
});
this.treeData = res.data;
this.treeList = this.filterText
diff --git a/src/views/exam/detail/courseDetail.vue b/src/views/exam/detail/courseDetail.vue
index 69607c330..5af132ec0 100644
--- a/src/views/exam/detail/courseDetail.vue
+++ b/src/views/exam/detail/courseDetail.vue
@@ -8,25 +8,29 @@
-
-
-
-
- {{ node.label }}
-
-
+
+
+
+ {{ scope.row.name }}
+
+
+
+
+ {{ item.name }}
+
+
+
+
+ {{ scope.row.duration / 60 }}分钟
+
+
+
+
+
+ 查看详情
+
+
+
@@ -55,7 +59,7 @@ import { getCourseLessonDetail } from '@/api/management/exam';
import { PermissionType } from '@/scripts/ConstDic';
import { UrlConfig } from '@/scripts/ConstDic';
import LimitList from '@/views/components/limits/index';
-import { getSessionStorage, setSessionStorage } from '@/utils/auth';
+import { getSessionStorage } from '@/utils/auth';
import localStore from 'storejs';
export default {
@@ -77,15 +81,14 @@ export default {
},
EffectiveTypeList: [],
activeName: 'first',
- defaultProps: {
- children: 'children',
- label: 'name'
- },
expandList: [],
valid: false
};
},
computed: {
+ isGzbShow() {
+ return getSessionStorage('project').startsWith('gzb');
+ },
hasPermssion() {
let isShow = false;
if (this.courseModel.pmsList && this.courseModel.pmsList.length) {
@@ -184,7 +187,7 @@ export default {
this.$router.push({ path: `${UrlConfig.trainingPlatform.examHome}/${this.$route.params.subSystem}`});
}, 100);
},
- clickEvent(obj, node, data) {
+ clickEvent(obj) {
if (this.valid || obj.trial) {
this.$router.push({ path: `${UrlConfig.trainingPlatform.examDetail}/${obj.id}`, query: { subSystem: this.$route.params.subSystem, mapId: this.courseModel.mapId }});
} else {
@@ -199,21 +202,6 @@ export default {
this.buy();
}).catch(() => { });
},
- filterNode(value, data) {
- if (!value) return true;
- return data.name.indexOf(value) !== -1;
- },
- nodeExpand(obj, node, ele) {
- const key = obj.id;
- this.expandList = this.expandList.filter(item => item !== key);
- this.expandList.push(key);
- setSessionStorage('trainingExamExpandList' + this.courseModel.id, this.expandList);
- },
- nodeCollapse(obj, node, ele) {
- const key = obj.id;
- this.expandList = this.expandList.filter(item => item !== key);
- setSessionStorage('trainingExamExpandList' + this.courseModel.id, this.expandList);
- },
getExpandList(id) {
let expand = getSessionStorage('trainingExamExpandList' + id);
expand = expand ? (expand + '').split(',') : '';
diff --git a/src/views/exam/detail/examDetail.vue b/src/views/exam/detail/examDetail.vue
index a862bf1cf..4c96c9524 100644
--- a/src/views/exam/detail/examDetail.vue
+++ b/src/views/exam/detail/examDetail.vue
@@ -114,7 +114,8 @@ export default {
Stand: [],
Station: [],
ControlConvertMenu: [],
- TrainWindow: []
+ TrainWindow: [],
+ LimitControl: []
};
let ele;
for ( ele in CMD['Switch']) {
@@ -132,6 +133,9 @@ export default {
for ( ele in CMD['Station']) {
this.trainingOperateTypeMap['Station'].push(CMD['Station'][ele]);
}
+ for ( ele in CMD['LimitControl']) {
+ this.trainingOperateTypeMap['LimitControl'].push(CMD['LimitControl'][ele]);
+ }
for ( ele in CMD['ControlConvertMenu']) {
this.trainingOperateTypeMap['ControlConvertMenu'].push(CMD['ControlConvertMenu'][ele]);
}
diff --git a/src/views/exam/index.vue b/src/views/exam/index.vue
index a2e512726..0fa5fe1a7 100644
--- a/src/views/exam/index.vue
+++ b/src/views/exam/index.vue
@@ -8,7 +8,7 @@
-
+
{{ item }}
@@ -48,6 +48,11 @@ export default {
userId: ''
};
},
+ computed: {
+ isGzbShow() {
+ return getSessionStorage('project').startsWith('gzb');
+ }
+ },
watch: {
'$route.params.subSystem': function(newVal) {
this.loadInitPage();
diff --git a/src/views/ibp/ibpsystem/index.vue b/src/views/ibp/ibpsystem/index.vue
index cd75d9020..18e6f3f7f 100644
--- a/src/views/ibp/ibpsystem/index.vue
+++ b/src/views/ibp/ibpsystem/index.vue
@@ -9,11 +9,8 @@
import Vue from 'vue';
import IbpPan from '@/ibp/ibpPan';
import { parser } from '@/ibp/utils/parser';
-// import ibpData from '@/ibp/constant/ibpData';
import { mapGetters } from 'vuex';
import { exitFullscreen } from '@/utils/screen';
-import { putJointTrainingSimulationUser } from '@/api/chat';
-import { putJointTrainingSimulationUserNew} from '@/api/jointTraining';
import { handlerIbpEvent } from '@/api/simulation';
import { IbpOperation } from '@/scripts/ConstDic';
import { getIbpInfoByStation } from '@/api/ibp';
@@ -124,8 +121,6 @@ export default {
if (!deviceCode) {
return;
}
- // console.log(deviceCode);
- // const ibpDatas = ibpData[deviceCode];
try {
const res = await getIbpInfoByStation(this.$route.query.mapId, deviceCode);
if (res.data.data) {
@@ -241,16 +236,13 @@ export default {
back() {
this.group = this.$route.query.group;
this.$store.dispatch('training/over').then(() => {
- if (this.drawWay === 'true') {
- putJointTrainingSimulationUserNew(this.group).then(() => {
- this.$router.replace({ path: `/trainroom`, query: { group: this.group, lineCode:this.$route.query.lineCode, drawWay: this.drawWay } });
- exitFullscreen();
+ if (this.$route.query.projectDevice) {
+ this.$store.dispatch('LogOut').then(() => {
+ location.reload();
});
} else {
- putJointTrainingSimulationUser(this.group).then(() => {
- this.$router.replace({ path: `/trainroom`, query: { group: this.group, lineCode:this.$route.query.lineCode } });
- exitFullscreen();
- });
+ history.go(-1);
+ exitFullscreen();
}
});
},
diff --git a/src/views/iscs/iscsSystem/groupNav.vue b/src/views/iscs/iscsSystem/groupNav.vue
index 4f7fc6d4a..1ab04cbd5 100644
--- a/src/views/iscs/iscsSystem/groupNav.vue
+++ b/src/views/iscs/iscsSystem/groupNav.vue
@@ -16,7 +16,7 @@
-
+
- 返回主页面
+ {{ projectDevice? '退出': '返回主页面' }}
-
-
-
-
-
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 9b1302684..8c2b42ba6 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -1,28 +1,28 @@
-
主工作站未登录,点击重新检测
-
-
-
{{ loginTitle==='jyd'?'':loginTitle }}
+
主工作站未登录,点击重新检测
+
+
+
{{ loginTitle==='空串'?'':loginTitle }}
-
+
{{ title }}
-
+
{{ language }}
-
-
+
+
{{ $t('login.scanCodeLogin') }}
-
+
- {{ $t('login.welcomeTo') + title }}
+ {{ $t('login.welcomeTo') + title }}
@@ -110,16 +110,18 @@ import { setSessionStorage, removeSessionStorage } from '@/utils/auth';
import Cookies from 'js-cookie';
import md5 from 'js-md5';
import QrcodeVue from 'qrcode.vue';
-import { getLoginWmurl, checkLoginStatus } from '@/api/login';
+import { getLoginWmurl, checkLoginStatus, getLoginInfo } from '@/api/login';
import { LoginParams } from '@/utils/login';
import bgImg from '@/assets/bg1.jpg';
import bgIbpImg from '@/assets/bg_ibp.png';
import { UrlConfig } from '@/scripts/ConstDic';
import { loginInfo, ProjectIcon, GenerateRouteProjectList, VersionBaseNoShow, MainBodyNoShow} from '@/scripts/ProjectConfig';
-import { removeToken } from '@/utils/auth';
+import { removeToken, getToken } from '@/utils/auth';
import LangStorage from '@/utils/lang';
import FloatPart from './floatPart';
import { getIsSignUp } from '@/api/competition';
+import { getSimulationInfoNew } from '@/api/simulation';
+import { getSessionStorage } from '@/utils/auth';
export default {
name: 'Login',
@@ -175,39 +177,56 @@ export default {
language: '中文',
versionBaseNoShow: VersionBaseNoShow,
mainBodyNoShow: MainBodyNoShow
+
};
},
computed: {
project() {
- return this.$route.path.split('/')[1];
+ const project = this.$route.query.project;
+ const split = this.$route.path.split('/')[1];
+ if (split == 'design') {
+ return project ? split + project : split;
+ } else if (split == 'login') {
+ return project || 'login';
+ } else {
+ return split;
+ }
},
loginTitle () {
- return loginInfo[this.$route.path.split('/')[1]].loginTitle;
+ // this.$route.path.split('/')[1]
+ return loginInfo[this.project].loginTitle;
},
title() {
- return loginInfo[this.$route.path.split('/')[1]].title;
+ return loginInfo[this.project].title;
+ },
+ logoWidth() {
+ return loginInfo[this.project].logoWidth;
},
isProject() {
- const projectName = this.$route.path.split('/')[1];
+ const projectName = this.project;
return GenerateRouteProjectList.includes(projectName);
},
logoImg() {
- const projectName = this.$route.path.split('/')[1];
+ const projectName = this.project;
return ProjectIcon[projectName];
},
bgImg() {
- return this.$route.query.ibpDevice ? bgIbpImg : bgImg;
+ const bgImgAll = this.$route.query.project == 'hyd' ? '' : bgImg;
+ const synchronousLogin = ['IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW', 'VR_PSD'];
+ return synchronousLogin.includes(this.$route.query.type) ? bgIbpImg : bgImgAll;
},
- ibpDevice() {
- return this.$route.query.ibpDevice;
+ syncLogin() {
+ const synchronousLogin = ['IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW', 'VR_PSD'];
+ if (this.$route.query.type) {
+ return synchronousLogin.includes(this.$route.query.type);
+ } else {
+ return false;
+ }
}
},
created() {
document.querySelector("link[rel*='icon']").href = loginInfo[this.project].linkIcon || ProjectIcon[this.project];
this.computedAttribute();
- if (this.$route.query.projectDevice) {
-
- }
if (Cookies.get(this.cookiesName) && Cookies.get(this.cookiesToken)) {
const model = {'username': Cookies.get(this.cookiesName), 'password': Cookies.get(this.cookiesToken), 'project':loginInfo[this.project].loginParam};
model.type = this.modelType;
@@ -217,6 +236,8 @@ export default {
}).catch(error => {
if (error.code === '30001') {
this.tipsMsg = this.$t('login.accountOrPasswordIsIncorrect');
+ } else if (error.code == '10001') {
+ this.tipsMsg = '教研机尚未登录,请稍后重试!';
} else {
this.tipsMsg = error.message;
}
@@ -224,13 +245,12 @@ export default {
setTimeout(() => { this.tipsMsg = ''; }, 5000);
});
}
- if (this.project === 'hyd') {
- this.bgImg = '';
- }
},
mounted() {
document.title = loginInfo[this.project].browserTitle || loginInfo[this.project].title;
- this.loginRefresh();
+ if (this.syncLogin || this.$route.query.project != 'hyd') {
+ this.loginRefresh();
+ }
},
methods: {
computedAttribute() {
@@ -288,7 +308,6 @@ export default {
if (this && this._isDestroyed) {
return;
}
-
// 清空已存在的定时器
// 设置定时器检测
this.clearTimer(this.checkLogin);
@@ -332,6 +351,7 @@ export default {
const model = Object.assign({}, this.loginForm);
model.password = md5(model.password);
model.type = this.modelType;
+ model.project = loginInfo[this.project].loginParam;
model.deviceCode = this.$route.query.projectDevice;
this.loading = true;
if (this.isAutoLogin) {
@@ -344,6 +364,8 @@ export default {
}).catch(error => {
if (error.code === '30001') {
this.tipsMsg = this.$t('login.accountOrPasswordIsIncorrect');
+ } else if (error.code == '10001') {
+ this.tipsMsg = '教研机尚未登录,请稍后重试!';
} else {
this.tipsMsg = error.message;
}
@@ -378,8 +400,33 @@ export default {
this.$router.push({ path: this.path, query:{ raceId:this.$route.query.raceId } });
}
} else if (this.$route.query.projectDevice) {
- const query = { group: '', drawWay: true };
- this.$router.push({ path: `/trainroom`, query: query });
+ getLoginInfo(getToken()).then(res => {
+ getSimulationInfoNew(res.data.group).then(resp => {
+ const query = { group: res.data.group, drawWay: true, mapId: resp.data.map.id, lineCode:resp.data.map.lineCode, projectDevice: this.$route.query.projectDevice };
+ if (this.syncLogin) {
+ query.type = this.$route.query.type;
+ }
+ console.log(res.data);
+ setSessionStorage('projectDevice', JSON.stringify(res.data.deviceVO));
+ if (this.$route.query.type == 'LSW') {
+ console.log('进入', `/bigSplitScreen/${resp.data.map.id}`);
+ this.$router.push({ path: `/bigSplitScreen/${resp.data.map.id}`, query: query });
+ } else if (this.$route.query.type === 'ISCS_LW') {
+ this.$router.push({ path: `/displayIscs/system`, query: query });
+ } else if (this.$route.query.type == 'CCTV') {
+ this.$router.push({ path: `/jlmap3d/passengerflow`, query:{
+ mapid:resp.data.map.id,
+ group:res.data.group,
+ project: getSessionStorage('project')
+ } });
+ } else if (this.$route.query.type == 'VR_PSD') {
+ // 待添加
+ // this.$router.push({ path: `/bigSplitScreen/${resp.data.map.id}`, query: query });
+ } else {
+ this.$router.push({ path: `/jointTrainingNew`, query: query });
+ }
+ });
+ });
} else if (!this.$route.path.includes('jsxt/login') && !this.$route.path.includes('refereeJsxt/login')) {
this.$router.push({ path: this.path });
} else {
diff --git a/src/views/mapsystem/index.vue b/src/views/mapsystem/index.vue
index 719d4ebb6..6a7c5e5be 100644
--- a/src/views/mapsystem/index.vue
+++ b/src/views/mapsystem/index.vue
@@ -81,7 +81,6 @@ export default {
async simulationError() {
await this.$store.dispatch('map/clearJlmapTrainView');
await this.$store.dispatch('map/setTrainWindowShow', false);
- await this.$store.dispatch('socket/setSimulationError');
await this.$store.dispatch('training/setMapDefaultState');
this.clearSubscribe();
this.$confirm(this.$t('tip.getMapStateDataException'), this.$t('tip.hint'), {
diff --git a/src/views/newMap/displayNew/demon/addFault.vue b/src/views/newMap/displayNew/demon/addFault.vue
index 79f9a30f0..950b01d68 100644
--- a/src/views/newMap/displayNew/demon/addFault.vue
+++ b/src/views/newMap/displayNew/demon/addFault.vue
@@ -102,6 +102,9 @@ export default {
methods:{
deviceSelect(em) {
if (this.field.toUpperCase() === 'targetActive'.toUpperCase()) {
+ if (em._type == 'Station') {
+ em = this.$store.getters['map/getDeviceByCode'](em.zcCode);
+ }
this.faultRule.targetDeviceType = this.covertType(em._type);
this.faultRule.targetDeviceCode = em.code;
if (em._type.toUpperCase() === 'Section'.toUpperCase() && em.parentName) {
@@ -138,6 +141,7 @@ export default {
case 'Signal':return 'SIGNAL';
case 'Switch':return 'SWITCH';
case 'Station':return 'STATION';
+ case 'ZcControl':return 'ZC';
case 'StationStand':return 'STAND';
case 'Train':return 'TRAIN';
}
diff --git a/src/views/newMap/displayNew/demon/addQuest.vue b/src/views/newMap/displayNew/demon/addQuest.vue
index fcbf96444..acc221118 100644
--- a/src/views/newMap/displayNew/demon/addQuest.vue
+++ b/src/views/newMap/displayNew/demon/addQuest.vue
@@ -53,8 +53,6 @@
-
diff --git a/src/views/newMap/jointTrainingNew/chatView/chatCoversitionList.vue b/src/views/newMap/jointTrainingNew/chatView/chatCoversitionList.vue
deleted file mode 100644
index 9ac8b5273..000000000
--- a/src/views/newMap/jointTrainingNew/chatView/chatCoversitionList.vue
+++ /dev/null
@@ -1,172 +0,0 @@
-
-
-
-
-
-
{{ coversition.name }}
-
-
-
-
-
-
-
diff --git a/src/views/newMap/jointTrainingNew/chatView/chatCreateGroup.vue b/src/views/newMap/jointTrainingNew/chatView/chatCreateGroup.vue
deleted file mode 100644
index 5f16484b8..000000000
--- a/src/views/newMap/jointTrainingNew/chatView/chatCreateGroup.vue
+++ /dev/null
@@ -1,234 +0,0 @@
-
-
-
-
-
-
-
- {{ member.memberName }}
-
-
-
-
- {{ member.memberName }}
-
-
-
-
-
-
- 创建会话
- 取消
-
-
-
-
-
-
diff --git a/src/views/newMap/jointTrainingNew/index.vue b/src/views/newMap/jointTrainingNew/index.vue
index 1b5566e8d..5a93f0170 100644
--- a/src/views/newMap/jointTrainingNew/index.vue
+++ b/src/views/newMap/jointTrainingNew/index.vue
@@ -13,19 +13,22 @@
:group="group"
:data-error="dataError"
:user-role="userRole"
+ :is-admin="isAdmin"
:device-code="deviceCode"
:countdown-time="countdownTime"
+ :admin-mode="adminMode"
@getUserRole="getUserRole"
@hidepanel="hidepanel"
- @showIbp="showIbp"
@startCounting="startCounting"
@hidejl3dcctv="hidejl3dcctv"
+ @handlerMemberManage="handlerMemberManage"
/>
@@ -41,6 +45,8 @@
+
+
@@ -61,18 +67,19 @@ import { mapGetters } from 'vuex';
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
import { checkLoginLine } from '@/api/login';
import { loadNewMapDataByGroup } from '@/utils/loaddata';
-import { getUserRolesNew, deljointTrainRoomNew} from '@/api/jointTraining';
-import { clearSimulation, getSimulationInfoNew } from '@/api/simulation';
+import { clearSimulation, getSimulationInfoNew, getSimulationUserInfo, getSimulationMemberList, getAllSimulationUser } from '@/api/simulation';
import {getRaceUserById, getTestPaperDatail} from '@/api/competition';
-import { getSessionStorage } from '@/utils/auth';
+import { getSessionStorage, getToken } from '@/utils/auth';
import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
import Jl3dMaintainer from '@/views/jlmap3d/maintainer/jl3dmaintainer';
import { EventBus } from '@/scripts/event-bus';
-import ibpData from '@/ibp/constant/ibpData';
import { timeFormat } from '@/utils/date';
import { Message } from 'element-ui';
import Vue from 'vue';
import localStore from 'storejs';
+import MembersManage from './memberManage/membersManage';
+import AddMember from './memberManage/addMember';
+import { getLoginInfo } from '@/api/login';
export default {
name: 'JointTrainingDraft',
@@ -88,7 +95,9 @@ export default {
Jl3dDrive,
Jl3dMaintainer,
IbpPlate,
- JsQuestion
+ JsQuestion,
+ MembersManage,
+ AddMember
},
data() {
return {
@@ -120,7 +129,9 @@ export default {
practicalTime: 0,
countdown: null,
questionList: [],
- practicalExamTime: 0
+ practicalExamTime: 0,
+ isAdmin: false,
+ adminMode: true
};
},
computed: {
@@ -183,6 +194,10 @@ export default {
this.mapBoxP.style.cursor = '';
this.mapViewLoadedOver = true;
this.showSelectStation && this.setShowStation(this.showStation);
+ this.initMemberUserInfo();
+ },
+ '$store.state.socket.memberChangeCount': function () {
+ this.initMemberUserInfo();
},
'$store.state.socket.permissionOver': function () {
this.$alert(this.$t('tip.userRightsHaveBeenReclaimed'), this.$t('tip.hint'), {
@@ -191,24 +206,10 @@ export default {
callback: async (action) => {
await this.$store.dispatch('training/over');
await clearSimulation(this.group);
- await deljointTrainRoomNew(this.group);
this.$router.go(-1);
}
});
},
- '$store.state.socket.jointRoomInfo': function (val) { // 综合演练房间信息
- if (val.creatorId) {
- this.handleRoomInfo(val);
- }
- },
- '$store.state.socket.roleList': function (val) { // 综合演练被踢出房间
- val.forEach(elem => {
- if (elem.id == this.userId && !elem.userRole) {
- this.$router.go(-1);
- this.messageInfo(this.$t('tip.beKickedOut'), 'warning');
- }
- });
- },
'$store.state.app.windowSizeCount': function() {
this.setWindowSize();
},
@@ -220,6 +221,11 @@ export default {
'$store.state.map.map': function (val) {
this.showSelectStation = val.skinVO.code === '06' && this.$store.state.training.prdType === '01';
this.setStationList(val);
+ },
+ '$store.state.socket.simulationRoleList':function(val) {
+ if (val && val.length) {
+ this.checkRoleChange(val);
+ }
}
},
async created() {
@@ -248,18 +254,6 @@ export default {
mousemove(e) {
this.mouseNum = 1;
},
- handleRoomInfo(data) {
- if (data.state == '03') { // 退出房间
- this.$router.go(-1);
- } else if (data.state == '01') { // 进入准备中
- const query = { group: this.group, lineCode:this.lineCode };
- if (this.drawWay) {
- query.drawWay = this.drawWay;
- }
- this.$router.replace({ path: `/trainroom`, query: query });
- }
- this.$store.dispatch('socket/setJointRoomInfo'); // 清空房间信息
- },
// 清除检查在线定时器
clearAllTimer() {
if (this.ierval) {
@@ -354,6 +348,23 @@ export default {
this.endViewLoading();
}
},
+ async initDeviceVo() {
+ // getLoginInfo(getToken()).then(resp => {
+ // this.$store.dispatch('SetProjecteDevice', resp.data.deviceVO);
+ // });
+ },
+ initMemberUserInfo() {
+ getSimulationMemberList(this.$route.query.group).then(resp => {
+ this.$store.dispatch('training/setMemberList', {memberList:resp.data, userId: this.$store.state.user.id});
+ }).catch(() => {
+ this.$messageBox('获取仿真成员列表失败!');
+ });
+ getAllSimulationUser(this.$route.query.group).then(resp => {
+ this.$store.dispatch('training/setSimulationUserList', resp.data);
+ }).catch(() => {
+ this.$messageBox('获取所有仿真用户失败!');
+ });
+ },
async loadSimulationInfo() {
const resp = await getSimulationInfoNew(this.group);
if (resp && resp.code == 200 && resp.data && !resp.data.dataError) {
@@ -366,24 +377,23 @@ export default {
} else {
this.$store.dispatch('training/over');
}
- // if (this.isDemon) {
- // this.$refs.menuDemon.initPlannedDriving(resp.data.planRunning);
- // } else if (this.isScript) {
- // this.$refs.menuScript.initPlannedDriving(resp.data.planRunning);
- // }
} else if (resp && resp.code == 200 && resp.data && resp.data.dataError) {
this.dataError = true;
this.$messageBox('此地图数据正在维护中,无法运行!');
}
},
async getUserRole() {
- const res = await getUserRolesNew(this.group);
+ const res = await getSimulationUserInfo(this.group);
const data = res.data || {};
- this.userRole = data.userRole;
+ this.userRole = data.role || 'AUDIENCE';
this.deviceCode = data.deviceCode;
- this.ibpPart = data.ibpPart;
- if (this.userRole === 'IBP') {
+ this.isAdmin = data.admin;
+
+ const deviceVO = this.$store.state.user.projectDevice;
+ if (deviceVO && deviceVO.type === 'IBP') {
this.showIbp(this.deviceCode);
+ const config = JSON.parse(deviceVO.config);
+ this.ibpPart = config.part.toLowerCase();
} else {
this.hideIbp();
}
@@ -421,30 +431,35 @@ export default {
resp['code'] = 200;
resp.data['userRole'] = 'ADMIN';
} else {
+ await this.initDeviceVo();
resp = await this.getUserRole();
}
- // console.log('/////////////' + resp.data.userRole);
if (resp && resp.code == 200) {
- // Admin 管理员 Instructor 教员 Dispatcher 行调 STATION_SUPERVISOR 车站 Audience 观众 Driver 司机 MAINTAINER 通号 IBP:IBP盘
- this.userRole = resp.data.userRole;
- switch (this.userRole) {
- case 'ADMIN': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'ADMIN'); this.hideIbp(); break;
- case 'INSTRUCTOR': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'INSTRUCTOR'); this.hideIbp(); break;
- case 'DISPATCHER': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'DISPATCHER'); this.hideIbp(); break;
- case 'STATION_SUPERVISOR': this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR'); this.hideIbp(); break;
- case 'INTERLOCK': this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'INTERLOCK'); this.hideIbp(); break;
- case 'AUDIENCE': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'AUDIENCE'); this.hideIbp(); break;
- case 'DRIVER': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'DRIVER'); this.hideIbp(); break;
- case 'MAINTAINER': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'MAINTAINER'); this.hideIbp(); break;
- case 'IBP': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'IBP'); this.showIbp(resp.data.deviceCode); break;
- case 'BIGSCREEN': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'BIGSCREEN'); this.hideIbp(); break;
- }
+ this.userRole = resp.data.role || 'AUDIENCE';
+ this.setSimulationPrdType();
}
await this.getTrainDetail();
} else {
this.endViewLoading();
}
},
+ // 设置prdType和role
+ setSimulationPrdType(swch) {
+ // Admin 管理员 Dispatcher 行调 STATION_SUPERVISOR 车站 Audience 观众 Driver 司机 MAINTAINER 通号 IBP:IBP盘
+ switch (this.userRole) {
+ // case 'ADMIN': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'ADMIN'); this.hideIbp(); break;
+ case 'DISPATCHER': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'DISPATCHER'); this.hideIbp(); break;
+ case 'STATION_SUPERVISOR': this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR'); this.hideIbp(); break;
+ case 'AUDIENCE': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'AUDIENCE'); this.hideIbp(); break;
+ case 'DRIVER': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'DRIVER'); this.hideIbp(); break;
+ case 'MAINTAINER': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'MAINTAINER'); this.hideIbp(); break;
+ }
+ if (this.isAdmin && this.adminMode) {
+ this.$store.dispatch('training/setPrdType', swch || '02');
+ this.$store.dispatch('training/setRoles', 'AUDIENCE');
+ this.hideIbp();
+ }
+ },
startCounting() {
const storeKey = this.$store.state.user.id + '' + this.$route.query.raceId + 'practical';
const startTime = localStore.get(storeKey);
@@ -515,18 +530,10 @@ export default {
this.ibpShow = false;
},
showIbp(deviceCode) {
- if (!this.ibpShow) {
- this.drivingShow = false;
- this.panelShow = false;
- this.ibpShow = true;
- if (!deviceCode || !ibpData[deviceCode]) {
- Message.warning({message: this.$t('error.ibpNoDraw'), duration: 0, showClose: true, type: 'error'});
- return;
- } else {
- Message.closeAll();
- }
- this.$refs.ibpPlate.show(deviceCode, this.ibpPart);
- }
+ this.drivingShow = false;
+ this.panelShow = false;
+ this.ibpShow = true;
+ this.$refs.ibpPlate.show(deviceCode, this.ibpPart);
},
hidejl3dcctv() {
const routeData = this.$router.resolve({
@@ -610,23 +617,42 @@ export default {
list: this.bigScreenSplitConfig.map(ele => ele.position)
};
this.$jlmap.off('zoom');
- this.$jlmap.off('pan');
this.$jlmap.setUpdateScreen(size);
}
},
cancelBigScreenMode() {
this.$jlmap.on('zoom');
- this.$jlmap.on('pan');
this.$jlmap.setRevoverBigScreen();
+ },
+ handlerMemberManage() {
+ this.$refs.membersManage.doShow();
+ },
+ addSimulationMember() {
+ this.$refs.addMember.doShow();
+ },
+ changeAdminMode(adminMode, swch) {
+ this.adminMode = adminMode;
+ this.setSimulationPrdType(swch);
+ },
+ checkRoleChange(data) {
+ data.forEach(item => {
+ if (item.messageType === 'KICK_OUT' && item.userId == this.userId) {
+ this.$messageBox('您已经被请离房间!');
+ this.$refs.demonMenu.back();
+ } else if (item.messageType === 'PLAY_CHANGE' && item.userId == this.userId) {
+ this.userRole = item.role || 'AUDIENCE';
+ this.setSimulationPrdType();
+ }
+ });
}
}
};
diff --git a/src/views/newMap/jointTrainingNew/memberManage/addMember.vue b/src/views/newMap/jointTrainingNew/memberManage/addMember.vue
new file mode 100644
index 000000000..7c2d173ed
--- /dev/null
+++ b/src/views/newMap/jointTrainingNew/memberManage/addMember.vue
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/newMap/jointTrainingNew/memberManage/content-menu.vue b/src/views/newMap/jointTrainingNew/memberManage/content-menu.vue
new file mode 100644
index 000000000..a537967dc
--- /dev/null
+++ b/src/views/newMap/jointTrainingNew/memberManage/content-menu.vue
@@ -0,0 +1,103 @@
+
+
+
+
+
+
diff --git a/src/views/newMap/jointTrainingNew/memberManage/e-members.vue b/src/views/newMap/jointTrainingNew/memberManage/e-members.vue
new file mode 100644
index 000000000..cd338fe4b
--- /dev/null
+++ b/src/views/newMap/jointTrainingNew/memberManage/e-members.vue
@@ -0,0 +1,142 @@
+
+
+
+
成员列表
+
{{ members.length }}/{{ room.totalNum }}
+
+
+
+
+
+
+ {{ data.nickName + (data.admin? '【管理员】':'') + (data.referee? '【裁判员】':'') + (data.deviceVO? ` -- (${data.deviceVO.code})`:'') }}
+ {{ data.nickName + (data.admin? '【管理员】':'') + (data.referee? '【裁判员】':'') + (data.deviceVO? ` -- (${data.deviceVO.code})`:'') }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/newMap/jointTrainingNew/memberManage/membersManage.vue b/src/views/newMap/jointTrainingNew/memberManage/membersManage.vue
new file mode 100644
index 000000000..a26c29a39
--- /dev/null
+++ b/src/views/newMap/jointTrainingNew/memberManage/membersManage.vue
@@ -0,0 +1,343 @@
+
+
+
+
+
+
+
+
+
+ 添加仿真成员
+
+
+
+ {{ data.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/newMap/jointTrainingNew/menuDemon.vue b/src/views/newMap/jointTrainingNew/menuDemon.vue
index b8f0cf4ea..8da8fba5e 100644
--- a/src/views/newMap/jointTrainingNew/menuDemon.vue
+++ b/src/views/newMap/jointTrainingNew/menuDemon.vue
@@ -3,22 +3,23 @@
- {{ $t('joinTraining.connectRealDevices') }}
+ 成员管理
+ 生成二维码
+ {{ $t('joinTraining.connectRealDevices') }}
{{ $t('joinTraining.driverPerspective') }}
cctv
-
+
{{ $t('joinTraining.drivingByPlan') }}
{{ $t('joinTraining.initialize') }}
-
{{ '剩余时间:'+countdownTime }}
开始
提交
-
返回
-
{{ $t('global.back') }}
+
退出
+
退出
@@ -28,11 +29,11 @@
diff --git a/src/views/newMap/jointTrainingNew/menuSchema.vue b/src/views/newMap/jointTrainingNew/menuSchema.vue
index b8ec393d7..22c2ab3aa 100644
--- a/src/views/newMap/jointTrainingNew/menuSchema.vue
+++ b/src/views/newMap/jointTrainingNew/menuSchema.vue
@@ -1,7 +1,7 @@
{{ $t('joinTraining.runGraphPreview') }}
-
+
{{ $t('joinTraining.runGraphLoading') }}
-
+
{{ $t('joinTraining.faultSetting') }}
-
{{ $t('joinTraining.normalOperation') }}
{{ $t('joinTraining.faultOperation') }}
+
+ 管理模式
+ 演练模式
+
+
diff --git a/src/views/newMap/jointTrainingNew/chatView/chatContent.vue b/src/views/newMap/jointTrainingNew/newChatView/chatContent.vue
similarity index 53%
rename from src/views/newMap/jointTrainingNew/chatView/chatContent.vue
rename to src/views/newMap/jointTrainingNew/newChatView/chatContent.vue
index 7405bdf0d..04b43dfc6 100644
--- a/src/views/newMap/jointTrainingNew/chatView/chatContent.vue
+++ b/src/views/newMap/jointTrainingNew/newChatView/chatContent.vue
@@ -1,19 +1,19 @@
-
+
- {{ covertName(chatContent.targetUser,true) }}
+ {{ covertName(chatContent,true) }}
- {{ chatContent.message }}
+ {{ chatContent.content }}
@@ -23,23 +23,30 @@