This commit is contained in:
sunzhenyu 2021-01-04 16:21:43 +08:00
commit 5751a6bbad
63 changed files with 1300 additions and 438 deletions

View File

@ -47,3 +47,128 @@ export function setCompanyManager(companyId, data) {
data data
}); });
} }
/** 获取单位所有部门 */
export function getAllDept(companyId) {
return request({
url: `/api/company/${companyId}/dept`,
method: 'get'
});
}
/** 获取单位的部门树结构 */
export function getAllDeptTree(companyId) {
return request({
url: `/api/company/${companyId}/dept/tree`,
method: 'get'
});
}
/** 获取部门及其子部门 */
export function getDeptAndChild(companyId, deptId) {
return request({
url: `/api/company/${companyId}/dept/${deptId}`,
method: 'get'
});
}
/** 获取部门及其子树 */
export function getDeptTree(companyId, deptId) {
return request({
url: `/api/company/${companyId}/dept/${deptId}/tree`,
method: 'get'
});
}
/** 获取单位所属的职位信息 */
export function getCompanyPosition(companyId) {
return request({
url: `/api/company/${companyId}/position`,
method: 'get'
});
}
/** 分页获取单位的成员信息 */
export function getCompanyMemberPaging(companyId) {
return request({
url: `/api/company/${companyId}/refUserInfo`,
method: 'get'
});
}
/** 更新单位成员信息 */
export function putCompanyMember(companyId, data) {
return request({
url: `/api/company/${companyId}/refUserInfo`,
method: 'put',
data
});
}
/** 导入单位成员信息 */
export function importCompanyMember(companyId, data) {
return request({
url: `/api/company/${companyId}/refUserInfo/import`,
method: 'post',
data
});
}
/** 删除单位成员信息 */
export function deleteCompanyMember(companyId, memberId) {
return request({
url: `/api/company/${companyId}/refUserInfo/${memberId}`,
method: 'delete'
});
}
/** 查询职位信息 */
export function getPositionInfo(positionId) {
return request({
url: `/api/company/position/${positionId}`,
method: 'get'
});
}
/** 更新职位信息 */
export function updatePositionInfo(positionId, data) {
return request({
url: `/api/company/position/${positionId}`,
method: 'put',
data
});
}
/** 删除职位信息 */
export function deletePositionInfo(positionId) {
return request({
url: `/api/company/position/${positionId}`,
method: 'delete'
});
}
/** 添加职位信息 */
export function addPositionInfo(data) {
return request({
url: `/api/company/position`,
method: 'post',
data
});
}
/** 查询部门信息 */
export function getDeptInfo(deptId) {
return request({
url: `/api/company/dept/${deptId}`,
method: 'get'
});
}
/** 更新部门信息 */
export function updateDeptInfo(deptId, data) {
return request({
url: `/api/company/dept/${deptId}`,
method: 'put',
data
});
}
/** 添加部门信息 */
export function addDeptInfo(data) {
return request({
url: `/api/company/dept`,
method: 'post',
data
});
}
/** 删除部门信息 */
export function deleteDeptInfo(deptId) {
return request({
url: `/api/company/dept/${deptId}`,
method: 'delete'
});
}

View File

@ -147,3 +147,11 @@ export function getSceneExport(id) {
}); });
} }
/** 查询国赛剧本权限 */
export function queryCompetitionPracticalPermissions(params) {
return request({
url: `/api/v1/competitionPractical/query/permissions`,
method: 'get',
params
});
}

View File

@ -183,6 +183,7 @@ export default {
examSystem: 'Examination System', examSystem: 'Examination System',
runPlanSystem: 'The run plan system', runPlanSystem: 'The run plan system',
personalDetails: 'information', personalDetails: 'information',
organization: 'organization',
trainingPlatformEntrance: 'Training platform entrance', trainingPlatformEntrance: 'Training platform entrance',
designPlatformEntrance: 'Design platform entrance', designPlatformEntrance: 'Design platform entrance',
connect: 'connect', connect: 'connect',

View File

@ -183,6 +183,7 @@ export default {
examSystem: '考试系统', examSystem: '考试系统',
runPlanSystem: '运行图系统', runPlanSystem: '运行图系统',
personalDetails: '个人信息', personalDetails: '个人信息',
organization: '单位组织',
trainingPlatformEntrance: '实训平台入口', trainingPlatformEntrance: '实训平台入口',
designPlatformEntrance: '设计平台入口', designPlatformEntrance: '设计平台入口',
connect: '连接', connect: '连接',

View File

@ -8,7 +8,7 @@ import KeyboardController from './keyboardController';
import {calculateDCenter, createBoundingRect, deviceFactory} from './utils/parser'; import {calculateDCenter, createBoundingRect, deviceFactory} from './utils/parser';
import { updateIscsData } from './utils/parser'; import { updateIscsData } from './utils/parser';
import store from '@/store/index'; import store from '@/store/index';
import { selectLineCode } from './constant/deviceStyle'; import fuzhouStyle from './constant/skinCode/fuzhou_01.js';
const renderer = 'canvas'; const renderer = 'canvas';
const devicePixelRatio = 1; const devicePixelRatio = 1;
@ -60,7 +60,7 @@ class Iscs {
// 保存原始数据 // 保存原始数据
this.data = config; this.data = config;
this.lineCode = lineCode; this.lineCode = lineCode;
this.style = this.loadStyle(lineCode); this.style = fuzhouStyle;
// 保存需展现的画布大小 // 保存需展现的画布大小
this.canvasSize = { this.canvasSize = {
x: 0, x: 0,
@ -112,9 +112,11 @@ class Iscs {
if (this.methods.optionsUpdate instanceof Function) { this.methods.optionsUpdate(this.$options); } if (this.methods.optionsUpdate instanceof Function) { this.methods.optionsUpdate(this.$options); }
} }
loadStyle(lineCode) {
return selectLineCode(lineCode); // loadStyle(lineCode) {
} // return selectLineCode(lineCode);
// }
setCenter(deviceCode) { setCenter(deviceCode) {
const device = this.iscsDevice[deviceCode]; const device = this.iscsDevice[deviceCode];
if (device && device.instance) { if (device && device.instance) {

View File

@ -374,13 +374,13 @@ class SkinCode extends defaultStyle {
// 屏蔽门 // 屏蔽门
this[deviceType.Psd] = { this[deviceType.Psd] = {
// 宁波一号线 屏蔽门 // 宁波一号线 屏蔽门
elemnetType:['safetyDoorNormal'], elemnetType:['rectDoor'],
safetyDoorNormal: { // 屏蔽门 rectDoor: { // 屏蔽门
z:0, z:0,
height: 3, // 站台屏蔽门高度 height: 3, // 站台屏蔽门高度
distance: 4, // 站台和屏蔽门之间的距离 distance: 4, // 站台和屏蔽门之间的距离
defaultColor: 'green', // 屏蔽门默认颜色 defaultColor: '#000000', // 屏蔽门默认颜色
splitDoorColor: 'green' // 屏蔽门切除颜色 splitDoorColor: '#00FF00' // 屏蔽门切除颜色
} }
}; };

View File

@ -411,55 +411,58 @@ class SkinCode extends defaultStyle {
lampSpace: 60 // 灯间距 lampSpace: 60 // 灯间距
}, },
StationControl:{ StationControl:{
special:true, // 文字 cc 或者 lc
text: { text: {
distance: 2, // 灯和文字之间的距离 distance: 2, // 灯和文字之间的距离
fontSize: 12, // 字体大小 fontSize: 12, // 字体大小
fontFormat: 'consolas', // 字体格式 fontFormat: 'consolas', // 字体格式
fontColor: '#ffffff', // 字体颜色 centerControlColor: '#ffffff', // 中控字体颜色
stationControlColor: '#ff0', // 站控字体颜色
emergencyControlColor:'#f00', // 紧急站控字体颜色
fontWeight: 'normal', // 字体粗细 fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐 textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top' // 字体垂直对齐 textVerticalAlign: 'top' // 字体垂直对齐
},
lamp: {
count: 4, // 控制模式的个数
offset: {x: 20, y: 0}, // 偏移量
emergencyOffset: {x: 0, y: 0},
radiusR: 4, // 控制模式灯的半径
distance: 46, // 控制模式之间灯之间的距离
grayColor: '#C0C0C0', // 控制模式灰色
greenColor: 'green', // 控制模式绿色
redColor: 'red', // 控制模式红色
yellowColor: 'yellow' // 控制模式黄色
},
emergencyControl: { // 紧急站控
show: true,
offset: { x: 0, y: 0 },
text: '紧急',
arrowShow: false,
grayColor: '#7F7F7F'
},
centerControl: { // 中控
show: true,
offset: { x: 0, y: 0 },
text: '中控',
buttonShow: false,
arrowShow: false,
grayColor: '#7F7F7F'
},
substationControl: { // 站控按钮
show: true,
offset: { x: 0, y: 0 },
text: '站控',
arrowShow: false,
grayColor: '#7F7F7F'
},
interconnectedControl: { // 联锁控
show: false,
offset: { x: 0, y: 0 },
text: '联锁控',
arrowShow: false,
grayColor: '#7F7F7F'
} }
// lamp: {
// count: 4, // 控制模式的个数
// offset: {x: 20, y: 0}, // 偏移量
// emergencyOffset: {x: 0, y: 0},
// radiusR: 4, // 控制模式灯的半径
// distance: 46, // 控制模式之间灯之间的距离
// grayColor: '#C0C0C0', // 控制模式灰色
// greenColor: 'green', // 控制模式绿色
// redColor: 'red', // 控制模式红色
// yellowColor: 'yellow' // 控制模式黄色
// },
// emergencyControl: { // 紧急站控
// show: true,
// offset: { x: 0, y: 0 },
// text: '紧急',
// arrowShow: false,
// grayColor: '#7F7F7F'
// },
// centerControl: { // 中控
// show: true,
// offset: { x: 0, y: 0 },
// text: '中控',
// buttonShow: false,
// arrowShow: false,
// grayColor: '#7F7F7F'
// },
// substationControl: { // 站控按钮
// show: true,
// offset: { x: 0, y: 0 },
// text: '站控',
// arrowShow: false,
// grayColor: '#7F7F7F'
// },
// interconnectedControl: { // 联锁控
// show: false,
// offset: { x: 0, y: 0 },
// text: '联锁控',
// arrowShow: false,
// grayColor: '#7F7F7F'
// }
} }
}; };
@ -690,14 +693,14 @@ class SkinCode extends defaultStyle {
artificialRouteText: 'MU', // 人工进路模式 artificialRouteText: 'MU', // 人工进路模式
artificialRouteColor: '#FF0000' // 人工进路模式 artificialRouteColor: '#FF0000' // 人工进路模式
}, },
stationControlMode: { // stationControlMode: {
defaultText: 'CC', // 中央控制车站 // defaultText: 'CC', // 中央控制车站
defaultColor: '#FFFFFF', // 中央控制车站 // defaultColor: '#FFFFFF', // 中央控制车站
localControlText: 'LC', // 本地控制车站 // localControlText: 'LC', // 本地控制车站
localControlColor: '#FFFF00', // 本地控制车站 // localControlColor: '#FFFF00', // 本地控制车站
emergencyControlText: 'EL', // 本地紧急越权控制 // emergencyControlText: 'EL', // 本地紧急越权控制
emergencyControlColor: '#FF0000' // 本地紧急越权控制 // emergencyControlColor: '#FF0000' // 本地紧急越权控制
}, // },
stationCommunication: { stationCommunication: {
defaultText: 'CL', // 现场建立通信 defaultText: 'CL', // 现场建立通信
defaultColor: '#00FF00', // 现场建立通信 defaultColor: '#00FF00', // 现场建立通信

View File

@ -49,7 +49,7 @@ export default class Line2 extends Group {
switch (type) { switch (type) {
case '01': break; case '01': break;
case '02': case '02':
this.segment.setStyle('lineDash', this.style.lineDash || [4]); this.segment && this.segment.setStyle('lineDash', this.style.lineDash || [4]);
break; break;
} }
} }

View File

@ -0,0 +1,59 @@
import Group from 'zrender/src/container/Group';
import Rect from 'zrender/src/graphic/shape/Rect';
import store from '@/store/index';
class ERect2Door extends Group {
constructor(model) {
super();
this.model = model;
this.create();
}
create() {
const model = this.model.modelData;
const style = this.model.style;
const stand = store.getters['map/getDeviceByCode'](model.standCode);
this.psd = new Rect({
zlevel: this.model.zlevel,
z: this.model.z,
shape: {
x: stand.position.x - (stand.width / 2) - 5,
y: stand.position.y - (stand.height / 2) - 5,
width: stand.width + 10,
height: stand.height + 10
},
style: {
lineWidth: 0,
stroke: style.sidelineColor,
fill: style.Psd.rectDoor.defaultColor
}
});
this.add(this.psd);
}
recover() {
const style = this.model.style;
this.psd.setStyle('fill', style.Psd.rectDoor.defaultColor);
}
setState(model) {
const style = this.model.style;
if (model.fault == 'PSD_CANNOT_BE_CLOSED') {
// 开门
this.psd.setStyle('fill', style.Psd.rectDoor.splitDoorColor);
} else {
if (model.screenDoorOpenStatus == 0) {
// 开门
this.psd.setStyle('fill', style.Psd.rectDoor.splitDoorColor);
} else {
// 关门
this.psd.setStyle('fill', style.Psd.rectDoor.defaultColor);
}
}
if (model.noStatus) {
this.psd.setStyle('fill', '#7F7F7F');
}
}
}
export default ERect2Door;

View File

@ -4,6 +4,7 @@ import EVertical2Door from './EVertical2Door';
import EHorizontal2Door from './EHorizontal2Door'; import EHorizontal2Door from './EHorizontal2Door';
import EHighlight from '../element/EHighlight'; import EHighlight from '../element/EHighlight';
import {traverseLineElements} from '../utils/ShapeStatusCovert'; import {traverseLineElements} from '../utils/ShapeStatusCovert';
import ERectDoor from './ERectDoor';
export default class Line2 extends Group { export default class Line2 extends Group {
constructor(model, style) { constructor(model, style) {
@ -28,7 +29,8 @@ export default class Line2 extends Group {
const elementTypeList = { const elementTypeList = {
'safetyDoorNormal':ESafeDoor, // 正常屏蔽门 'safetyDoorNormal':ESafeDoor, // 正常屏蔽门
'vertical2Door':EVertical2Door, // 西安二号线屏蔽门 上下两条虚线型 'vertical2Door':EVertical2Door, // 西安二号线屏蔽门 上下两条虚线型
'horizontal2Door':EHorizontal2Door // 哈尔滨线路屏蔽门 左右两个 'horizontal2Door':EHorizontal2Door, // 哈尔滨线路屏蔽门 左右两个
'rectDoor': ERectDoor // 泰雷兹 宁波三号线 站台边框
}; };
// 遍历当前线路下的绘图元素 组合模式 // 遍历当前线路下的绘图元素 组合模式
traverseLineElements(style.Psd, elementTypeList, model, style, this); traverseLineElements(style.Psd, elementTypeList, model, style, this);

View File

@ -27,21 +27,21 @@ export default class EDeviceStatus extends Group {
textVerticalAlign: style.textStyle.textVerticalAlign textVerticalAlign: style.textStyle.textVerticalAlign
} }
}); });
this.stationControlMode = new Text({ // this.stationControlMode = new Text({
zlevle: this.zlevle, // zlevle: this.zlevle,
z: this.z, // z: this.z,
style: { // style: {
x: model.x + style.ModeStatusGroup.distance, // x: model.x + style.ModeStatusGroup.distance,
y: model.y, // y: model.y,
fontWeight: style.textStyle.fontWeight, // fontWeight: style.textStyle.fontWeight,
fontSize: style.ModeStatusGroup.fontSize, // fontSize: style.ModeStatusGroup.fontSize,
fontFamily: style.fontFamily, // fontFamily: style.fontFamily,
text: style.ModeStatusGroup.stationControlMode.defaultText, // text: style.ModeStatusGroup.stationControlMode.defaultText,
textFill: style.ModeStatusGroup.stationControlMode.defaultColor, // textFill: style.ModeStatusGroup.stationControlMode.defaultColor,
textAlign: style.textStyle.textAlign, // textAlign: style.textStyle.textAlign,
textVerticalAlign: style.textStyle.textVerticalAlign // textVerticalAlign: style.textStyle.textVerticalAlign
} // }
}); // });
this.stationCommunication = new Text({ this.stationCommunication = new Text({
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
@ -73,7 +73,7 @@ export default class EDeviceStatus extends Group {
} }
}); });
this.add(this.routeMode); this.add(this.routeMode);
this.add(this.stationControlMode); // this.add(this.stationControlMode);
this.add(this.stationCommunication); this.add(this.stationCommunication);
this.add(this.verifyBypass); this.add(this.verifyBypass);
} }

View File

@ -151,16 +151,43 @@ export default class Station extends Group {
createControlMode() { createControlMode() {
const model = this.model; const model = this.model;
if (!this.style.Station.StationControl.disPlayNone) { if (!this.style.Station.StationControl.disPlayNone) {
if (model.visible && model.createControlMode) { // model.createControlMode 控制模式 if (this.style.Station.StationControl.special) {
this.createEmergencyControl(); // 紧急站控 if (model.visible && model.createControlMode) { // model.createControlMode 控制模式
this.createCenterControl(); // 中控按钮 this.createSpecialControlMode();
this.createSubstationControl(); // 站控按钮 }
this.createInterconnectedControl(); // 联锁控 } else {
if (model.visible && model.createControlMode) { // model.createControlMode 控制模式
this.createEmergencyControl(); // 紧急站控
this.createCenterControl(); // 中控按钮
this.createSubstationControl(); // 站控按钮
this.createInterconnectedControl(); // 联锁控
}
} }
} }
this.setState(model); this.setState(model);
} }
createSpecialControlMode() {
const model = this.model;
this.stationControlText = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: model.controlModePoint.x,
y: model.controlModePoint.y,
fontWeight: this.style.Station.StationControl.text.fontWeight,
fontSize: this.style.Station.StationControl.text.fontSize,
fontFamily: this.style.fontFamily,
text: 'CC',
textFill: this.style.Station.StationControl.text.centerControlColor,
textAlign: this.style.Station.StationControl.text.textAlign,
textVerticalAlign: this.style.Station.StationControl.text.textVerticalAlign
}
});
this.add(this.stationControlText);
}
createEmergencyControl() { // 紧急站控 createEmergencyControl() { // 紧急站控
const model = this.model; const model = this.model;
if (this.style.Station.StationControl.emergencyControl.show) { if (this.style.Station.StationControl.emergencyControl.show) {
@ -329,6 +356,9 @@ export default class Station extends Group {
this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.greenColor); this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.greenColor);
this.centerControl && this.centerControl.setTextColor(this.style.Station.StationControl.lamp.greenColor); // 文字颜色 this.centerControl && this.centerControl.setTextColor(this.style.Station.StationControl.lamp.greenColor); // 文字颜色
this.stationText.setColor('#1fdc1f'); this.stationText.setColor('#1fdc1f');
this.stationControlText && this.stationControlText.setStyle({text:'CC', textFill:this.style.Station.StationControl.text.centerControlColor});
//
//
// if (this.style.Station.StationControl.disPlayNone) { // if (this.style.Station.StationControl.disPlayNone) {
// this.stationText && this.stationText.setStyle('textFill', '#1fdc1f'); // this.stationText && this.stationText.setStyle('textFill', '#1fdc1f');
// if (this.model.subheadDisplay) { // 副标题 // if (this.model.subheadDisplay) { // 副标题
@ -343,6 +373,7 @@ export default class Station extends Group {
this.substationControl && this.substationControl.setTextColor(this.style.Station.StationControl.lamp.yellowColor); // 文字颜色 this.substationControl && this.substationControl.setTextColor(this.style.Station.StationControl.lamp.yellowColor); // 文字颜色
this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor); this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor);
this.stationControlText && this.stationControlText.setStyle({text:'LC', textFill:this.style.Station.StationControl.text.stationControlColor});
// if (this.style.Station.StationControl.disPlayNone) { // if (this.style.Station.StationControl.disPlayNone) {
// this.stationText && this.stationText.setStyle('textFill', '#fff'); // this.stationText && this.stationText.setStyle('textFill', '#fff');
// if (this.model.subheadDisplay) { // 副标题 // if (this.model.subheadDisplay) { // 副标题
@ -358,6 +389,7 @@ export default class Station extends Group {
this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.emergencyArrowsControl && this.emergencyArrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor); this.emergencyArrowsControl && this.emergencyArrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor);
this.stationControlText && this.stationControlText.setStyle({text:'EL', textFill:this.style.Station.StationControl.text.emergencyControlColor});
// if (this.style.Station.StationControl.disPlayNone) { // if (this.style.Station.StationControl.disPlayNone) {
// this.stationText && this.stationText.setStyle('textFill', '#fff'); // this.stationText && this.stationText.setStyle('textFill', '#fff');
// if (this.model.subheadDisplay) { // 副标题 // if (this.model.subheadDisplay) { // 副标题

View File

@ -107,8 +107,8 @@ class StationStand extends Group {
if (path.includes('/map/draw')) { if (path.includes('/map/draw')) {
this.highlight = new EHighlight(this); this.highlight = new EHighlight(this);
this.add(this.highlight); this.add(this.highlight);
this.on('mouseout', () => { this.highlight.mouseout(); }); this.on('mouseout', () => { console.log('====='); this.highlight.mouseout(); });
this.on('mouseover', () => { this.highlight.mouseover(); }); this.on('mouseover', () => { console.log('111111'); this.highlight.mouseover(); });
} else { } else {
if (this.style.StationStand.mouseOverStyle) { if (this.style.StationStand.mouseOverStyle) {
this.mouseEvent = new EMouse(this); this.mouseEvent = new EMouse(this);

View File

@ -17,7 +17,7 @@ class ESolidStand extends Group {
this.stand = new Rect({ this.stand = new Rect({
zlevel: this.model.zlevel, zlevel: this.model.zlevel,
z: this.model.z, z: this.model.z + 2,
shape: { shape: {
x: standX, x: standX,
y: standY, y: standY,
@ -26,8 +26,7 @@ class ESolidStand extends Group {
}, },
style: { style: {
fill:style.StationStand.solidStand.spareColor, fill:style.StationStand.solidStand.spareColor,
lineWidth: style.StationStand.solidStand.lineWidth || 0, lineWidth: 0
stroke: style.StationStand.solidStand.spareStrokeColor
} }
}); });
this.add(this.stand); this.add(this.stand);
@ -69,7 +68,6 @@ class ESolidStand extends Group {
recover() { recover() {
const style = this.model.style; const style = this.model.style;
this.setColor(style.StationStand.solidStand.spareColor); this.setColor(style.StationStand.solidStand.spareColor);
this.setStroke(style.StationStand.solidStand.spareStrokeColor);
} }
setState(model) { setState(model) {
@ -82,7 +80,6 @@ class ESolidStand extends Group {
model.allSkip && this.setColor(style.StationStand.solidStand.jumpStopColor); model.allSkip && this.setColor(style.StationStand.solidStand.jumpStopColor);
// 停车 // 停车
model.trainParking && this.setColor(style.StationStand.solidStand.stopColor); model.trainParking && this.setColor(style.StationStand.solidStand.stopColor);
model.trainParking && this.setStroke(style.StationStand.solidStand.doorOpenColor);
// 紧急停车 // 紧急停车
model.emergencyClosed && this.setColor(style.StationStand.solidStand.spareColor); model.emergencyClosed && this.setColor(style.StationStand.solidStand.spareColor);
} else { } else {

View File

@ -17,7 +17,7 @@ class EHighlight extends Group {
const rect = this.device.getBoundingRect(); const rect = this.device.getBoundingRect();
this.lineBorder = new Rect({ this.lineBorder = new Rect({
zlevel: this.device.zlevel, zlevel: this.device.zlevel,
z: this.device.z + 1, z: this.device._type === 'StationStand' ? this.device.z + 3 : this.device.z + 1,
shape: rect, shape: rect,
style: { style: {
fill: fill fill: fill

View File

@ -231,7 +231,28 @@ export default {
const type = State2SimulationMap[this.$store.state.training.prdType]; const type = State2SimulationMap[this.$store.state.training.prdType];
if (control.controlMode != type) { if (control.controlMode != type) {
this.clearAllMenuShow(); this.clearAllMenuShow();
this.centralizedStationList = new Array(15).fill({}); if (type == 'Center' && this.selected._type == 'Station') {
this.selectedObj = this.selected;
if (this.selectedObj._type) {
this.canCommand = true;
const step = {
operation: 'click',
code: this.selectedObj.code,
subType:this.$store.state.menuOperation.subType
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.centralizedStationList = new Array(15).fill({});
this.centralizedStationList[0] = { name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, show: false, disabledName: 'controlMode', mode: 'Center' };
this.tempData = [];
this.tempData.push(this.selectedObj);
this.param = { stationCode: this.selectedObj.code };
}
});
}
} else {
this.centralizedStationList = new Array(15).fill({});
}
return false; return false;
} }
} }

View File

@ -98,15 +98,27 @@ export default {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
commit() { commit() {
this.$store.dispatch('menuOperation/pushRequestList', { const operate = {
device: this.selected, operation: OperationEvent.Section.unlock.confirm.operation
operation: { code: OperationEvent.Section.unlock.menu.operation, name: '区段解锁'}, };
cmdType: CMD.Section.CMD_SECTION_UNBLOCK, this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
param: { if (valid) {
sectionCode: this.selected.code this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '区段解锁'},
cmdType: CMD.Section.CMD_SECTION_UNBLOCK,
param: {
sectionCode: this.selected.code
}
});
this.doClose();
} }
}).catch(() => {
this.doClose();
this.$refs.noticeInfo.doShow();
}); });
this.doClose();
}, },
cancel() { cancel() {
const operate = { const operate = {

View File

@ -1,8 +1,9 @@
<template> <template>
<div class="xian-02__menus" :style="{width: width + 'px'}"> <div class="xian-02__menus" :style="{width: width + 'px'}">
<menu-axle-reset ref="menuAxleReset" :selected="selected" /> <menu-axle-reset ref="menuAxleReset" :selected="selected" />
<menu-cancel ref="menuCancel" />
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" /> <menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
<menu-station-control ref="menuStationControl" :selected="selected" /> <!-- <menu-station-control ref="menuStationControl" :selected="selected" /> -->
<menu-switch ref="menuSwitch" :selected="selected" /> <menu-switch ref="menuSwitch" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" /> <menu-signal ref="menuSignal" :selected="selected" />
<menu-section ref="menuSection" :selected="selected" /> <menu-section ref="menuSection" :selected="selected" />
@ -21,12 +22,13 @@ import { mapGetters } from 'vuex';
import MenuSignal from './menuSignal'; import MenuSignal from './menuSignal';
import MenuAxleReset from './menuAxleReset'; import MenuAxleReset from './menuAxleReset';
import MenuAutoTrunRoute from './menuAutoTrunRoute'; import MenuAutoTrunRoute from './menuAutoTrunRoute';
import MenuStationControl from './menuStationControl'; // import MenuStationControl from './menuStationControl';
import MenuSwitch from './menuSwitch'; import MenuSwitch from './menuSwitch';
import MenuSection from './menuSection'; import MenuSection from './menuSection';
import MenuTrain from './menuTrain'; import MenuTrain from './menuTrain';
import MenuStation from './menuStation'; import MenuStation from './menuStation';
import MenuLimit from './menuLimit'; import MenuLimit from './menuLimit';
import MenuCancel from './menuCancel';
// import PassiveAlarm from './passiveDialog/alarm'; // import PassiveAlarm from './passiveDialog/alarm';
import PassiveContorl from './passiveDialog/control'; import PassiveContorl from './passiveDialog/control';
import MenuStationStand from './menuStationStand'; import MenuStationStand from './menuStationStand';
@ -42,11 +44,12 @@ export default {
MenuSignal, MenuSignal,
MenuSwitch, MenuSwitch,
MenuSection, MenuSection,
MenuStationControl, // MenuStationControl,
MenuStation, MenuStation,
MenuTrain, MenuTrain,
MenuLimit, MenuLimit,
MenuStationStand, MenuStationStand,
MenuCancel,
// PassiveAlarm, // PassiveAlarm,
PassiveContorl, PassiveContorl,
PopStationStand, PopStationStand,

View File

@ -0,0 +1,259 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" pop-class="xian-02__pop_tip_station" />
<notice-info ref="noticeInfo" pop-class="xian-02__system" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu/index';
import { mapGetters } from 'vuex';
import { DeviceMenu } from '@/scripts/ConstDic';
import deviceType from '@/jmapNew/constant/deviceType';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
export default {
name: 'CancelMenu',
components: {
PopMenu,
NoticeInfo
},
data() {
return {
menu: [],
menuNormal: [
{
label: '发送',
handler: this.sendRequestList
},
{
label: '取消',
handler: this.undeveloped
},
{
label: '全部扣车',
children: [
{
label: '正线上全部扣车',
handler: this.undeveloped
}
]
},
{
label: '全部发车',
children: [
{
label: '缓解正线所有列车',
handler: this.undeveloped
}
]
},
{
label: '停止所有列车',
children: [
{
label: '停止正线所有列车',
handler: this.undeveloped
}
]
},
{
label: '车站选择',
children: []
},
{
label: '列车选择',
handler: this.undeveloped
},
{
label: '缩放',
handler: this.undeveloped
},
{
label: '显示控制',
children: [
{
label: '正线及车辆段',
handler: this.undeveloped
},
{
label: '列车信息',
handler: this.undeveloped
}
]
},
{
label: '下一窗口',
handler: this.undeveloped
},
{
label: '上一窗口',
handler: this.undeveloped
},
{
label: '激活所有菜单',
children: [
{
label: '确认',
handler: this.undeveloped
}
]
},
{
label: '恢复激活菜单',
handler: this.undeveloped
},
{
label: '进路模式 - 授权车站',
children: [
{
label: '自动',
handler: this.undeveloped
},
{
label: '人工',
handler: this.undeveloped
}
]
},
{
label: '列车报警确认',
children: [
{
label: '列车完整性报警确认',
handler: this.undeveloped
}
]
}
]
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
group() {
return this.$route.query.group;
}
},
watch: {
'$store.state.menuOperation.buttonOperation': function (val, old) {
if (this.menu && this.menu.length > 1) {
this.menu[0].disabled = true;
this.menu[1].disabled = !((this.menu[1] && val));
}
},
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
initStationList() {
const list = [];
this.stationList.forEach(station => {
if (station.visible) {
const node = {
label: station.name,
code: station.code,
handler: this.mapLocation
};
list.push(node);
}
});
return list;
},
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
this.menuNormal[5].children = this.initStationList();
this.menu = this.menuNormal;
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
mapLocation(item) {
if (item) {
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
this.doClose();
}
},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
},
sendRequestList() {
const requestList = this.$store.state.menuOperation.requestList;
if (requestList && requestList.length > 0) {
this.commitEachCommand(requestList);
}
},
commitEachCommand(requestList) {
const eachCmd = requestList[0];
let operate = '';
if (eachCmd.ciConfirm) {
operate = {
code: eachCmd.device.code,
operation: eachCmd.operation.code,
param: eachCmd.param //
};
const deviceStatus = {code: eachCmd.device.code, _type: eachCmd.device._type, isCiConfirm: 1};
if (eachCmd.device._type === deviceType.Signal) {
deviceStatus.isRequestLock = 0;
deviceStatus.isRequestGuide = 0;
}
this.$store.dispatch('training/updateMapState', [deviceStatus]);
} else {
operate = {
send: true,
operation: eachCmd.operation.code,
cmdType: eachCmd.cmdType,
param: eachCmd.param //
};
const deviceStatus = {code: eachCmd.device.code, _type: eachCmd.device._type, isCiConfirm: 0};
if (eachCmd.device._type === deviceType.Signal) {
deviceStatus.isRequestLock = 0;
deviceStatus.isRequestGuide = 0;
}
this.$store.dispatch('training/updateMapState', [deviceStatus]);
}
this.$store.dispatch('menuOperation/spliceRequestList', {deviceCode:eachCmd.device.code, operateCode:eachCmd.operation.code});
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
if (requestList.length) {
this.commitEachCommand(requestList);
}
} else {
this.$refs.noticeInfo.doShow();
}
}).catch(() => {
this.loading = false;
this.$refs.noticeInfo.doShow();
});
}
}
};
</script>

View File

@ -154,7 +154,7 @@ export default {
} else { } else {
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
} }
}).catch(() => { }).catch((e) => {
this.loading = false; this.loading = false;
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });

View File

@ -276,7 +276,7 @@ export default {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/pushRequestList', { this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected, device: this.selected,
operation: { code: OperationEvent.Section.lock.menu.operation, name: '区段封锁'}, operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '区段封锁'},
cmdType: CMD.Section.CMD_SECTION_BLOCK, cmdType: CMD.Section.CMD_SECTION_BLOCK,
param: operate.param param: operate.param
}); });

View File

@ -221,7 +221,7 @@ export default {
'$store.state.menuOperation.menuCount': function (val) { '$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) { if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition); this.doShow(this.$store.state.menuOperation.menuPosition);
} else if (this.selected._type === 'Signal' && this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Enabled) && !this.buttonOperation) { } else if (this.selected && this.selected._type === 'Signal' && this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Enabled) && !this.buttonOperation) {
this.doEnabledShow(this.$store.state.menuOperation.menuPosition); this.doEnabledShow(this.$store.state.menuOperation.menuPosition);
} else { } else {
this.doClose(); this.doClose();

View File

@ -18,6 +18,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault'; import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
export default { export default {
name: 'StationMenu', name: 'StationMenu',
@ -41,14 +42,42 @@ export default {
tipSubhead: '', tipSubhead: '',
menu: [], menu: [],
menuNormal: { menuNormal: {
Local: [], Local: [
{
label: '本地控制许可',
children: [
{
label: '请求',
handler: this.setStationControl,
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
},
// {
// label: '',
// handler: this.undeveloped
// },
{
label: '取消',
handler: this.setCenterControl,
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
},
// /** */
// CMD_CM_EMERGENCY_STATION_CONTROL: {value:'CM_Emergency_Station_Control', label: ''},
{
label: '紧急本地控制',
handler: this.setEmergencyControl,
cmdType: CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
}
]
}
],
Center: [ Center: [
{ {
label: '本地控制许可', label: '本地控制许可',
children: [ children: [
{ {
label: '请求', label: '请求',
handler: this.undeveloped handler: this.setStationControl,
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
}, },
{ {
label: '授权', label: '授权',
@ -69,11 +98,13 @@ export default {
children: [ children: [
{ {
label: '自动', label: '自动',
handler: this.atsAutoControlALL handler: this.atsAutoControlALL,
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
}, },
{ {
label: '人工', label: '人工',
handler: this.humanControlALL handler: this.humanControlALL,
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING
} }
] ]
}, },
@ -190,7 +221,9 @@ export default {
}, },
initMenu() { initMenu() {
this.menu = []; this.menu = [];
this.menu = [...this.menuNormal.Center]; // this.menu = [...this.menuNormal.Center];
//
this.menu = MenuContextHandler.covert(this.menuNormal);
if (this.selected.reentry) { if (this.selected.reentry) {
const menuAdd = { const menuAdd = {
label: '折返模式', label: '折返模式',
@ -328,6 +361,48 @@ export default {
} }
} }
}, },
setStationControl() {
//
commitOperate(menuOperate.StationControl.requestStationControl, {stationCodes:[this.selected.code]}, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.StationControl.requestStationControl.menu.operation, name: '请求站控'},
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL,
param: {stationCodes:[this.selected.code]}
});
}
});
},
setCenterControl() {
//
commitOperate(menuOperate.StationControl.requestCentralControl, {stationCodes:[this.selected.code]}, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.StationControl.requestCentralControl.menu.operation, name: '请求中控'},
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL,
param: {stationCodes:[this.selected.code]}
});
}
});
},
setEmergencyControl() {
//
commitOperate(menuOperate.StationControl.emergencyStationControl, {stationCodes:[this.selected.code]}, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.StationControl.emergencyStationControl.menu.operation, name: '请求中控'},
cmdType: CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL,
param: {stationCodes:[this.selected.code]}
});
}
});
},
undeveloped() { undeveloped() {
this.doClose(); this.doClose();
this.$alert('实现中......', '提示', { this.$alert('实现中......', '提示', {

View File

@ -12,6 +12,7 @@
custom-class="station-stand" custom-class="station-stand"
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<div :id="domCancelTableMenu" style="position: relative; top: -40px;left: 440px;" />
<el-row> <el-row>
<el-col :span="24"><div style="text-align: center;width: 100%;height: 50px;" @contextmenu="totalMenuEvent"><div style="display: initial;font-size: 18px" :style="{background: bgColor, color: fontColor}">{{ title }}</div></div></el-col> <el-col :span="24"><div style="text-align: center;width: 100%;height: 50px;" @contextmenu="totalMenuEvent"><div style="display: initial;font-size: 18px" :style="{background: bgColor, color: fontColor}">{{ title }}</div></div></el-col>
</el-row> </el-row>
@ -49,7 +50,7 @@
<div class="left-table-cell"><span>跳停</span></div> <div class="left-table-cell"><span>跳停</span></div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="center-table-cell"><span @contextmenu="menuEvent('stopJumping')">设置/取消 所有列车跳停本站</span></div> <div class="center-table-cell"><span :id="domSetOrCancelJump" @contextmenu="menuEvent('stopJumping')">设置/取消 所有列车跳停本站</span></div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="right-table-cell"><span @contextmenu="menuEvent('allTrainStopJump')">所有列车跳停本站</span></div> <div class="right-table-cell"><span @contextmenu="menuEvent('allTrainStopJump')">所有列车跳停本站</span></div>
@ -60,7 +61,7 @@
<div class="left-table-cell"><span @click="clickEvent()">ATS站台扣车</span></div> <div class="left-table-cell"><span @click="clickEvent()">ATS站台扣车</span></div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="center-table-cell"><span :style="{color:detainInterval ? standDetainColor :detainStatusColor}" @contextmenu="menuEvent('standDetain')">设置/取消 所有列车本站扣车</span></div> <div class="center-table-cell"><span :id="domSetOrCancelDetain" :style="{color:detainInterval ? standDetainColor :detainStatusColor}" @contextmenu="menuEvent('standDetain')">设置/取消 所有列车本站扣车</span></div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="right-table-cell"><span :style="{color: detainStatusColor}">所有列车本站扣车</span></div> <div class="right-table-cell"><span :style="{color: detainStatusColor}">所有列车本站扣车</span></div>
@ -172,6 +173,15 @@ export default {
}, },
domIdConfirm() { domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : ''; return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
},
domSetOrCancelJump() {
return OperationEvent.StationStand.setJumpStop.tableMenu.domId;
},
domCancelTableMenu() {
return OperationEvent.StationStand.tableMenu.cancelTableMenu.domId;
},
domSetOrCancelDetain() {
return OperationEvent.StationStand.setDetainTrain.tableMenu.domId;
} }
}, },
watch: { watch: {
@ -207,13 +217,27 @@ export default {
}, },
methods: { methods: {
doShow(position) { doShow(position) {
// this.operate = operate || {}; const step = {
const requestList = this.$store.state.menuOperation.requestList; start: true,
this.initStatus(requestList || []); code: `${this.selected.code}`,
this.position = position; operation: OperationEvent.StandTable.menu.operation,
this.dialogShow = true; param: {
this.$nextTick(function () { standCode: `${this.selected.code}`
this.$store.dispatch('training/emitTipFresh'); }
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
const requestList = this.$store.state.menuOperation.requestList;
this.initStatus(requestList || []);
this.position = position;
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
}); });
}, },
initStatus(requestList) { initStatus(requestList) {
@ -233,13 +257,21 @@ export default {
}); });
}, },
doClose() { doClose() {
this.loading = false; const step = {
this.dialogShow = false; operation: OperationEvent.StationStand.tableMenu.cancelTableMenu.operation
this.$store.dispatch('training/emitTipFresh'); };
if (this.detainInterval) { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
clearInterval(this.detainInterval); if (valid) {
this.detainInterval = ''; this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
if (this.detainInterval) {
clearInterval(this.detainInterval);
this.detainInterval = '';
}
}
});
}, },
menuEvent(val) { menuEvent(val) {
if (val) { if (val) {

View File

@ -176,7 +176,7 @@ export default {
'$store.state.menuOperation.menuCount': function (val) { '$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) { if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition); this.doShow(this.$store.state.menuOperation.menuPosition);
} else if (this.selected._type === 'Switch' && this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Enabled) && !this.buttonOperation) { } else if (this.selected && this.selected._type === 'Switch' && this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Enabled) && !this.buttonOperation) {
this.doEnabledShow(this.$store.state.menuOperation.menuPosition); this.doEnabledShow(this.$store.state.menuOperation.menuPosition);
} else { } else {
this.doClose(); this.doClose();

View File

@ -302,9 +302,8 @@ export default {
// //
setJumpStop() { setJumpStop() {
const step = { const step = {
start: true, // code: `${this.selected.code}`,
code: `${this.selected.code}`, operation: OperationEvent.StationStand.setJumpStop.tableMenu.operation,
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
param: { param: {
standCode: `${this.selected.code}` standCode: `${this.selected.code}`
} }
@ -314,7 +313,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', { this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected, device: this.selected,
operation: { code: OperationEvent.StationStand.setJumpStop.menu.operation, name: '跳停本站请求成功'}, operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '跳停本站请求成功'},
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP, cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP,
param: step.param param: step.param
}); });
@ -324,9 +323,8 @@ export default {
// //
cancelJumpStop() { cancelJumpStop() {
const step = { const step = {
start: true, // code: `${this.selected.code}`,
code: `${this.selected.code}`, operation: OperationEvent.StationStand.cancelJumpStop.tableMenu.operation,
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
param: { param: {
standCode: `${this.selected.code}` standCode: `${this.selected.code}`
} }
@ -336,7 +334,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', { this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected, device: this.selected,
operation: { code: OperationEvent.StationStand.cancelJumpStop.menu.operation, name: '取消跳停请求成功'}, operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '取消跳停请求成功'},
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP, cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP,
param: step.param param: step.param
}); });
@ -382,9 +380,8 @@ export default {
}, },
setStandDetain() { setStandDetain() {
const step = { const step = {
start: true, // code: `${this.selected.code}`,
code: `${this.selected.code}`, operation: OperationEvent.StationStand.setDetainTrain.tableMenu.operation,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
param: { param: {
standCode: `${this.selected.code}` standCode: `${this.selected.code}`
} }
@ -394,7 +391,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', { this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected, device: this.selected,
operation: { code: OperationEvent.StationStand.setDetainTrain.menu.operation, name: '设置扣车'}, operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '设置扣车'},
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN, cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
param: step.param param: step.param
}); });
@ -405,9 +402,8 @@ export default {
}, },
cancelStandDetain() { cancelStandDetain() {
const step = { const step = {
start: true, // code: this.selected.code,
code: this.selected.code, operation: OperationEvent.StationStand.cancelDetainTrain.tableMenu.operation,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
param: { param: {
standCode: `${this.selected.code}` standCode: `${this.selected.code}`
} }
@ -417,7 +413,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', { this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected, device: this.selected,
operation: {code: OperationEvent.StationStand.cancelDetainTrain.menu.operation, name: '取消扣车'}, operation: {code: OperationEvent.Command.commandXian.confirm.operation, name: '取消扣车'},
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN, cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
param: step.param param: step.param
}); });

View File

@ -10,8 +10,10 @@ export default {
trainingType: 'Stand', trainingType: 'Stand',
productTypes: ['01', '02'], // 产品类型 01 现地 02 行调 productTypes: ['01', '02'], // 产品类型 01 现地 02 行调
stepVOList: [ stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【扣车】' }, { deviceType: '06', orderNum: 1, operateCode: '00a', tip: '鼠标右键点击打开站台概要表' },
{ deviceType: '06', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' } { deviceType: '06', orderNum: 2, operateCode: '5042', tip: '鼠标右键菜单选择【扣车】' },
{ deviceType: '06', orderNum: 3, operateCode: '5001', tip: '关闭站台概要表' },
{ deviceType: '06', orderNum: 4, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
] ]
}, },
{ {
@ -24,8 +26,10 @@ export default {
trainingType: 'Stand', trainingType: 'Stand',
productTypes: ['01', '02'], // 产品类型 01 现地 02 行调 productTypes: ['01', '02'], // 产品类型 01 现地 02 行调
stepVOList: [ stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' }, { deviceType: '06', orderNum: 1, operateCode: '00a', tip: '鼠标右键点击打开站台概要表' },
{ deviceType: '06', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' } { deviceType: '06', orderNum: 2, operateCode: '5053', tip: '鼠标右键菜单选择【发车】' },
{ deviceType: '06', orderNum: 3, operateCode: '5001', tip: '关闭站台概要表'},
{ deviceType: '06', orderNum: 4, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
] ]
}, },
// { // {
@ -52,8 +56,10 @@ export default {
trainingType: 'Stand', trainingType: 'Stand',
productTypes: ['02'], productTypes: ['02'],
stepVOList: [ stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【设置跳停】' }, { deviceType: '06', orderNum: 1, operateCode: '00a', tip: '鼠标右键点击打开站台概要表' },
{ deviceType: '06', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' } { deviceType: '06', orderNum: 2, operateCode: '5027', tip: '鼠标右键菜单选择【列车跳停本站】' },
{ deviceType: '06', orderNum: 3, operateCode: '5001', tip: '关闭站台概要表' },
{ deviceType: '06', orderNum: 4, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
] ]
}, },
{ {
@ -66,8 +72,10 @@ export default {
trainingType: 'Stand', trainingType: 'Stand',
productTypes: ['02'], productTypes: ['02'],
stepVOList: [ stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' }, { deviceType: '06', orderNum: 1, operateCode: '00a', tip: '鼠标右键点击打开站台概要表' },
{ deviceType: '06', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' } { deviceType: '06', orderNum: 2, operateCode: '5037', tip: '鼠标右键菜单选择【取消列车跳停本站】' },
{ deviceType: '06', orderNum: 3, operateCode: '5001', tip: '关闭站台概要表' },
{ deviceType: '06', orderNum: 4, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
] ]
}, },
// { // {
@ -316,7 +324,7 @@ export default {
productTypes: ['01', '02'], productTypes: ['01', '02'],
stepVOList: [ stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【始端/终端选择】', codeType:'START_SIGNAL' }, { deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【始端/终端选择】', codeType:'START_SIGNAL' },
{ deviceType: '04', orderNum: 2, operateCode: '301', tip: '鼠标左键选择进路名称【{3}】', val: '{4}', codeType:'END_SIGNAL' }, { deviceType: '04', orderNum: 2, operateCode: '301', tip: '鼠标左键选择进路【{3}】的终端信号机', val: '{4}', codeType:'END_BUTTON_SIGNAL' },
{ deviceType: '04', orderNum: 3, operateCode: '009', tip: '鼠标左键点击【确定】按钮' } { deviceType: '04', orderNum: 3, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
@ -331,7 +339,8 @@ export default {
productTypes: ['01', '02'], productTypes: ['01', '02'],
stepVOList: [ stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【取消进路】' }, { deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【取消进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' } // { deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
] ]
}, },
{ {

View File

@ -10,6 +10,9 @@
<el-dropdown-item> <el-dropdown-item>
<span style="display:block;" @click="handleDetail">{{ $t('global.personalDetails') }}</span> <span style="display:block;" @click="handleDetail">{{ $t('global.personalDetails') }}</span>
</el-dropdown-item> </el-dropdown-item>
<!--<el-dropdown-item>-->
<!--<span style="display:block;" @click="handleOrganization">{{ $t('global.organization') }}</span>-->
<!--</el-dropdown-item>-->
<el-dropdown-item> <el-dropdown-item>
<span style="display:block;" @click="logout">{{ $t('global.exit') }}</span> <span style="display:block;" @click="logout">{{ $t('global.exit') }}</span>
</el-dropdown-item> </el-dropdown-item>
@ -49,6 +52,9 @@ export default {
}, },
handleDetail() { handleDetail() {
this.$refs.userInfo.doShow(); this.$refs.userInfo.doShow();
},
handleOrganization() {
this.$router.push({ path: `/trainingPlatform/organization` });
} }
} }
}; };

View File

@ -139,6 +139,7 @@ const PreTheoryImport = () => import('@/views/competitionManage/bankList/preImpo
const PlanScheduleWicket = () => import('@/views/newMap/displayNew/demon/planSchedule'); const PlanScheduleWicket = () => import('@/views/newMap/displayNew/demon/planSchedule');
const MessageBoard = () => import('@/views/messageBoard/index'); const MessageBoard = () => import('@/views/messageBoard/index');
const BoardManage = () => import('@/views/messageBoard/manage'); const BoardManage = () => import('@/views/messageBoard/manage');
const OrganizationManage = () => import('@/views/organization/index');
// import { GenerateRouteProjectList } from '@/scripts/ProjectConfig'; // import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
// import { getSessionStorage } from '@/utils/auth'; // import { getSessionStorage } from '@/utils/auth';
@ -603,6 +604,11 @@ export const asyncRouter = [
hidden: true hidden: true
} }
] ]
},
{ // 单位组织管理
path: 'organization',
component: OrganizationManage,
hidden: true
} }
] ]
}, },

View File

@ -79,25 +79,13 @@ class MenuContextHandler {
} }
if (menu.constructor === Array) { if (menu.constructor === Array) {
menu.forEach(elem => { menu.forEach(elem => {
if (elem.type === 'separator') { if (elem.children && elem.children.length > 0) {
elem.show = true; elem.children.forEach(each=>{
return; this.covertEachCommand(each, type, selected, status);
} });
const data = CommandHandler.getDefinition(elem.cmdType);
if (data) {
// 判断指令是否显示
if (data.simulationRole.toUpperCase() == type.toUpperCase() && data.controlMode.indexOf(status) > -1) {
elem.show = true;
elem.disabled = this.checkDisabled(data, selected);
} else {
elem.show = true;
elem.disabled = true;
}
} else { } else {
elem.show = false; this.covertEachCommand(elem, type, selected, status);
} }
}); });
} }
} }
@ -105,6 +93,27 @@ class MenuContextHandler {
return menu; return menu;
} }
covertEachCommand(elem, type, selected, status) {
if (elem.type === 'separator') {
elem.show = true;
return;
}
const data = CommandHandler.getDefinition(elem.cmdType);
if (data) {
// 判断指令是否显示
if (data.simulationRole.toUpperCase() == type.toUpperCase() && data.controlMode.indexOf(status) > -1) {
elem.show = true;
elem.disabled = this.checkDisabled(data, selected);
} else {
elem.show = true;
elem.disabled = true;
}
} else {
elem.show = false;
}
}
menuBarConvert(menu, mode) { menuBarConvert(menu, mode) {
if (menu) { if (menu) {
if (mode === OperateMode.NORMAL) { if (mode === OperateMode.NORMAL) {
@ -117,7 +126,7 @@ class MenuContextHandler {
item.show = false; item.show = false;
if (!item.click) { if (!item.click) {
item.click = () => { }; item.click = () => { };
} }
if (!item.force) { if (!item.force) {
item.show = true; item.show = true;
@ -131,7 +140,7 @@ class MenuContextHandler {
item.show = true; item.show = true;
if (!item.click) { if (!item.click) {
item.click = () => { }; item.click = () => { };
} }
if (item.children && item.children.length > 0) { if (item.children && item.children.length > 0) {
this.menuBarConvert(item.children, mode); this.menuBarConvert(item.children, mode);

View File

@ -246,7 +246,13 @@ export const OperationEvent = {
} }
} }
}, },
// 站台概要表
StandTable: {
menu: {
operation: '00a',
domId: '_Tips-standTable-menu'
}
},
// 道岔操作 // 道岔操作
Switch: { Switch: {
// 取消故障 // 取消故障
@ -1560,6 +1566,13 @@ export const OperationEvent = {
operation: '500' operation: '500'
} }
}, },
// 站台概要表
tableMenu: {
cancelTableMenu: {
operation: '5001',
domId: '_Tips-Stand-TableMenu-CancelTableMenu'
}
},
// 提前发车 // 提前发车
earlyDeparture: { earlyDeparture: {
menu: { menu: {
@ -1603,7 +1616,11 @@ export const OperationEvent = {
}, },
confirm: { confirm: {
operation: '5036', operation: '5036',
domId: '_Tip-Stand-SetJumpStop-Confirm' domId: '_Tips-Stand-SetJumpStop-Confirm'
},
tableMenu: {
operation: '5027',
domId: '_Tips-Stand-SetOrCancelJumpStop-TableMenu'
} }
}, },
// 取消跳停 // 取消跳停
@ -1634,7 +1651,11 @@ export const OperationEvent = {
}, },
confirm: { confirm: {
operation: '5036', operation: '5036',
domId: '_Tip-Stand-CancelJumpStop-Confirm' domId: '_Tips-Stand-CancelJumpStop-Confirm'
},
tableMenu: {
operation: '5037',
domId: '_Tips-Stand-SetOrCancelJumpStop-TableMenu'
} }
}, },
// 设置扣车 // 设置扣车
@ -1646,6 +1667,10 @@ export const OperationEvent = {
menuButton: { menuButton: {
operation: '5041', operation: '5041',
domId: '_Tips-Stand-SetDetainTrain-Menu{BOTTOM}' domId: '_Tips-Stand-SetDetainTrain-Menu{BOTTOM}'
},
tableMenu: {
operation: '5042',
domId: '_Tips-Stand-SetOrCancelDetain-TableMenu'
} }
}, },
// 取消扣车 // 取消扣车
@ -1661,6 +1686,10 @@ export const OperationEvent = {
menuButton: { menuButton: {
operation: '5052', operation: '5052',
domId: '_Tips-Stand-CancelDetainTrain-Menu{BOTTOM}' domId: '_Tips-Stand-CancelDetainTrain-Menu{BOTTOM}'
},
tableMenu: {
operation: '5053',
domId: '_Tips-Stand-SetOrCancelDetain-TableMenu'
} }
}, },
// 强制取消扣车 // 强制取消扣车

View File

@ -1,8 +1,12 @@
<template> <template>
<div> <div>
<div :id="ibpId" v-loading="loading" :style="{ width: canvasWidth+'px', height: canvasHeight +'px',background:'#000' }" class="ibp-canvas" /> <div :id="ibpId" v-loading="loading" :style="{ width: canvasWidth+'px', height: canvasHeight +'px',background:'#000' }" class="ibp-canvas" />
<el-button v-if="showBackButton" class="ibp-button" type="primary" @click="back">{{ $t('global.back') }}</el-button> <el-button-group class="ibp-button">
<el-button v-if="$route.query.noPreLogout" class="ibp-button" type="primary" @click="quit">退出</el-button> <el-button v-if="moreScreen" type="primary" @click="switchOffset">切换</el-button>
<el-button v-if="showBackButton" type="primary" @click="back">{{ $t('global.back') }}</el-button>
<el-button v-if="$route.query.noPreLogout" type="primary" @click="quit">退出</el-button>
</el-button-group>
<audio id="buzzer" controls loop="loop"> <audio id="buzzer" controls loop="loop">
<source :src="buzzerAudio" type="audio/mpeg"> <source :src="buzzerAudio" type="audio/mpeg">
</audio> </audio>
@ -38,6 +42,7 @@ export default {
return { return {
width: this.$store.state.config.width, width: this.$store.state.config.width,
height: this.$store.state.config.height, height: this.$store.state.config.height,
moreScreen: false,
offsetX: 0, offsetX: 0,
dataZoom: { dataZoom: {
offsetX: '0', offsetX: '0',
@ -101,8 +106,8 @@ export default {
} }
this.initIbp(); this.initIbp();
if (this.$route.query.loadAll && this.$route.query.stationCode) { if (this.$route.query.loadAll && this.$route.query.stationCode) {
await this.show(this.$route.query.stationCode); await this.show(this.$route.query.stationCode, 'left');
await this.setMoveInit(true); await this.setMoveInit(false);
this.showBackButton = false; this.showBackButton = false;
} }
}, },
@ -182,7 +187,7 @@ export default {
} }
const data = parser(ibpDatas, {width: this.canvasWidth, height: this.canvasHeight}); // ibp const data = parser(ibpDatas, {width: this.canvasWidth, height: this.canvasHeight}); // ibp
this.initIbp(this.offsetX); this.initIbp(this.offsetX);
this.moreScreen = ibpDatas.background && ibpDatas.background.width > 1920;
this.setIbp(data, ibpDatas); this.setIbp(data, ibpDatas);
this.$store.dispatch('ibp/setIbpData', ibpDatas); this.$store.dispatch('ibp/setIbpData', ibpDatas);
this.handleBanOpenScreenDoorStatus(); this.handleBanOpenScreenDoorStatus();
@ -195,7 +200,6 @@ export default {
}); });
} }
} catch (error) { } catch (error) {
console.log(error, '===');
this.loading = false; this.loading = false;
this.$alert('当前ibp盘数据有问题请检查', '信息', { this.$alert('当前ibp盘数据有问题请检查', '信息', {
confirmButtonText: '确定', confirmButtonText: '确定',
@ -313,6 +317,19 @@ export default {
audio.pause(); audio.pause();
} }
} }
},
switchOffset() {
if (this.offsetX === 0) {
this.offsetX = 1920;
} else if (this.offsetX === 1920) {
this.offsetX = 0;
}
const options = {
scaleRate: this.canvasWidth / 1920,
offsetX: this.offsetX,
offsetY: 0
};
this.$ibp && this.$ibp.setOptions(options);
} }
} }
}; };

View File

@ -7,12 +7,12 @@
<!--<el-cascader v-model="mapStationList" style="width: 100%;" :props="props" placeholder="请选择车站" @change="handleChange" />--> <!--<el-cascader v-model="mapStationList" style="width: 100%;" :props="props" placeholder="请选择车站" @change="handleChange" />-->
<!--<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />--> <!--<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />-->
<div style="border-bottom: 1px solid #EBEEF5; padding: 10px 10px;"> <div style="border-bottom: 1px solid #EBEEF5; padding: 10px 10px;">
<el-select v-model="lineCode" size="mini" placeholder="请选择线路"> <el-select v-model="mapId" size="mini" placeholder="请选择线路">
<el-option <el-option
v-for="item in lineList" v-for="item in mapPublishList"
:key="item.code" :key="item.id"
:label="item.name" :label="item.name"
:value="item.code" :value="item.id"
/> />
</el-select> </el-select>
</div> </div>
@ -34,7 +34,6 @@
import { DeviceMenu } from '@/scripts/ConstDic'; import { DeviceMenu } from '@/scripts/ConstDic';
import { removeSessionStorage } from '@/utils/auth'; import { removeSessionStorage } from '@/utils/auth';
import { getPublishMapListOnline, getStationListNeedAttendant } from '@/api/jmap/map'; import { getPublishMapListOnline, getStationListNeedAttendant } from '@/api/jmap/map';
import { getLineCodeList } from '@/api/management/mapline';
export default { export default {
name: 'UserMapList', name: 'UserMapList',
@ -53,13 +52,13 @@ export default {
y: 0 y: 0
}, },
editModel: {}, editModel: {},
lineCode: '', mapId: '',
mapList: [], mapList: [],
mapStationList: [], mapStationList: [],
lineList: [], mapPublishList: [],
pageTreeMap: { pageTreeMap: {
'01': [], '01': [],
'02': [ '114': [
{ {
// 线 线 线 线 // 线 线 线 线
name: '电力监控系统', name: '电力监控系统',
@ -885,8 +884,8 @@ export default {
}; };
}, },
treeList() { treeList() {
if (this.lineCode) { if (this.mapId) {
return this.pageTreeMap[this.lineCode]; return this.pageTreeMap[this.mapId];
} else { } else {
return []; return [];
} }
@ -904,11 +903,12 @@ export default {
removeSessionStorage('demonList'); removeSessionStorage('demonList');
}, },
mounted() { mounted() {
if (this.$route.query.lineCode) { if (this.$route.query.mapId) {
this.lineCode = this.$route.query.lineCode; this.mapId = this.$route.query.mapId;
} }
getLineCodeList().then(resp => {
this.lineList = resp.data || []; getPublishMapListOnline().then(resp => {
this.mapPublishList = resp.data || [];
}).catch(() => { }).catch(() => {
this.$message.error('获取线路列表异常!'); this.$message.error('获取线路列表异常!');
}); });
@ -928,7 +928,7 @@ export default {
case 'system' : case 'system' :
break; break;
case 'interface': case 'interface':
this.$router.push({ path: `/iscs/design/edit`, query: {mode: obj.mode, system: data.parent.data.id, part: obj.id, lineCode: this.lineCode} }); this.$router.push({ path: `/iscs/design/edit`, query: {mode: obj.mode, system: data.parent.data.id, part: obj.id, mapId: this.mapId} });
break; break;
} }
}, },

View File

@ -3,7 +3,7 @@
<el-form ref="form" :rules="rules" :model="form" label-width="120px" style="width: 100%;padding: 10px 50px;"> <el-form ref="form" :rules="rules" :model="form" label-width="120px" style="width: 100%;padding: 10px 50px;">
<el-form-item label="code:" prop="code"> <el-form-item label="code:" prop="code">
<el-select v-model="form.code"> <el-select v-model="form.code">
<el-option v-for="(item, index) in iscs.iscsTextList" :key="index" :label="item.code" :value="item.code" disabled /> <el-option v-for="(item, index) in iscsTextList" :key="index" :label="item.code" :value="item.code" disabled />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="文字内容:" prop="context"> <el-form-item label="文字内容:" prop="context">
@ -106,7 +106,10 @@ export default {
computed:{ computed:{
...mapGetters('iscs', [ ...mapGetters('iscs', [
'iscs' 'iscs'
]) ]),
iscsTextList() {
return this.iscs ? this.iscs.iscsTextList || [] : [];
}
}, },
watch:{ watch:{
'$store.state.iscs.rightClickCount': function (val) { '$store.state.iscs.rightClickCount': function (val) {
@ -141,7 +144,7 @@ export default {
x: this.form.x, x: this.form.x,
y: this.form.y y: this.form.y
}, },
code: this.isUpdate ? this.form.code : getUID('IscsText', this.iscs.iscsTextList), code: this.isUpdate ? this.form.code : getUID('IscsText', this.iscsTextList),
_type: 'IscsText', _type: 'IscsText',
context: this.form.context, context: this.form.context,
unit: this.form.unit, unit: this.form.unit,

View File

@ -112,8 +112,7 @@ export default {
handleSave(data) { handleSave(data) {
const param = { const param = {
graphData: data, graphData: data,
lineCode: this.$route.query.lineCode, mapId: this.$route.query.mapId,
stationCode: '',
system: this.$route.query.system, system: this.$route.query.system,
totalSystem: this.$route.query.mode, totalSystem: this.$route.query.mode,
userInterface: this.$route.query.part userInterface: this.$route.query.part

View File

@ -126,7 +126,7 @@ export default {
} }
}, },
setIscs(data, oldData) { setIscs(data, oldData) {
this.$iscs.setIscs(oldData, data, this.$route.query.lineCode); this.$iscs.setIscs(oldData, data, this.$route.query.mapId);
}, },
// //
handleModel(model) { handleModel(model) {

View File

@ -60,9 +60,11 @@ export default {
this.bacground = 'rgba(0,0,0,0)'; this.bacground = 'rgba(0,0,0,0)';
this.scaleRate = window.innerWidth / 2200; this.scaleRate = window.innerWidth / 2200;
if (this.stationId == 'mainHouseOne') { if (this.stationId == 'mainHouseOne') {
this.title = '黄山主变电所接线图'; //
this.title = '主所1主变电所接线图';
} else { } else {
this.title = '茶亭主变电所接线图'; //
this.title = '主所2主变电所接线图';
} }
params.userInterface = 'substation'; params.userInterface = 'substation';
// parkingLotName // parkingLotName

View File

@ -35,8 +35,8 @@
<div class="mainHouseTwo"> <div class="mainHouseTwo">
<div class="station-list-button" :class="{'active': selectStation == 'mainHouseTwo'}" @click="changeStation('mainHouseTwo')" /> <div class="station-list-button" :class="{'active': selectStation == 'mainHouseTwo'}" @click="changeStation('mainHouseTwo')" />
</div> </div>
<div class="mainHouseOneName">黄山主所</div> <div class="mainHouseOneName">主所1</div>
<div class="mainHouseTwoName">茶亭主所</div> <div class="mainHouseTwoName">主所2</div>
</div> </div>
</div> </div>
</div> </div>
@ -102,9 +102,8 @@ export default {
alarmInfo: true, alarmInfo: true,
selectStation: 'mainHouseOne', selectStation: 'mainHouseOne',
stationList:[], stationList:[],
tractionList:['象峰站', '罗汉山站', '树兜站', '东街口站', '达道站', '三叉街站', '葫芦阵站', '城门站', '胪雷站', '安平站', '梁厝站', '三江口站'], tractionList:[],
group:'', group:'',
lineCode:'',
buttonId:'substation', buttonId:'substation',
buttonList:{ buttonList:{
stationDescription:{name:'车站概要', type:'totalSystem', id: 'stationDescription', active:false, icon:iscs_icon1 }, stationDescription:{name:'车站概要', type:'totalSystem', id: 'stationDescription', active:false, icon:iscs_icon1 },
@ -328,18 +327,15 @@ export default {
this.stationList = []; this.stationList = [];
res.data.forEach(station => { res.data.forEach(station => {
if (!station.depot && station.visible) { if (!station.depot && station.visible) {
let param = {}; const param = {
if (station.runPlanName.includes('站')) { name: station.runPlanName.includes('站') ? station.runPlanName : `${station.runPlanName}`,
param = { id: station.code
name: station.runPlanName, };
id: station.code
}; if (station.centralized) {
} else { this.tractionList.push(param.name);
param = {
name: station.runPlanName + '站',
id: station.code
};
} }
this.stationList.push(param); this.stationList.push(param);
} }
}); });
@ -350,7 +346,6 @@ export default {
}, },
mounted() { mounted() {
this.group = this.$route.query.group; this.group = this.$route.query.group;
this.lineCode = this.$route.query.lineCode;
this.subscribe(); this.subscribe();
const data = Object.values(this.buttonList); const data = Object.values(this.buttonList);
this.initButtonGroup(data); this.initButtonGroup(data);
@ -437,7 +432,7 @@ export default {
if (station) { if (station) {
stationName = station.name; stationName = station.name;
} }
const query = {stationName: stationName, stationId: this.selectStation, group: this.group, lineCode:this.lineCode, mapId: this.$route.query.mapId, noPreLogout:this.$route.query.noPreLogout }; const query = {stationName: stationName, stationId: this.selectStation, group: this.group, mapId: this.$route.query.mapId, noPreLogout:this.$route.query.noPreLogout };
if (isReplace) { if (isReplace) {
this.$router.replace({ path: `/displayIscs/system/stationConfig/${type}`, query: query }); this.$router.replace({ path: `/displayIscs/system/stationConfig/${type}`, query: query });

View File

@ -50,14 +50,14 @@ export default {
}, },
mounted() { mounted() {
this.lessonList = []; this.lessonList = [];
getPublishLessonListByMapId({mapId:this.$route.params.mapId}).then(response => {
this.lessonList = response.data.map(elem => { return { code: elem.id, name: elem.name }; });
}).catch(error => {
this.$messageBox(`${this.$t('error.refreshFailed')}, ${error.message}`);
});
}, },
methods: { methods: {
doShow(node) { doShow(node) {
getPublishLessonListByMapId({mapId:this.$route.params.mapId}).then(response => {
this.lessonList = response.data.map(elem => { return { code: elem.id, name: elem.name }; });
}).catch(error => {
this.$messageBox(`${this.$t('error.refreshFailed')}, ${error.message}`);
});
this.dialogShow = true; this.dialogShow = true;
}, },
doClose() { doClose() {

View File

@ -398,3 +398,14 @@ export default {
line-height: 80px; line-height: 80px;
} }
</style> </style>
<style>
.ql-size-small {
font-size: 0.75em;
}
.ql-size-large{
font-size: 1.5em;
}
.ql-size-huge{
font-size: 2.5em;
}
</style>

View File

@ -1,9 +1,10 @@
<template> <template>
<div> <div>
<el-dialog v-dialogDrag title="场景列表" :visible.sync="dialogVisible" width="920px" center> <el-dialog v-dialogDrag title="场景列表" :visible.sync="dialogVisible" width="920px" center>
<el-tabs v-model="activeName" type="card" style="height:650px"> <el-tabs v-model="activeName" type="card" style="height:550px">
<el-tab-pane label="主场景列表" name="first"> <el-tab-pane label="主场景列表" name="first">
<el-table :data="mainSceneData" border :span-method="objectSpanMethod" height="600" stripe :cell-style="{padding: '8px 0'}"> <div v-if="!hasPermission" style="margin-bottom: 10px;color: #f00;width: 100%;text-align: center;">尊敬的用户,您好由于您暂无场景权限现仅提供场景1试用如需使用其他场景请通过左上角菜单=联系方式联系我们开放权限</div>
<el-table :data="mainSceneData" border :span-method="objectSpanMethod" height="465" stripe :cell-style="{padding: '8px 0'}">
<el-table-column type="index" width="50" label="序号" /> <el-table-column type="index" width="50" label="序号" />
<el-table-column prop="type" width="200" label="类别" /> <el-table-column prop="type" width="200" label="类别" />
<el-table-column prop="scene" width="350" label="场景" /> <el-table-column prop="scene" width="350" label="场景" />
@ -11,7 +12,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.result"> <div v-if="scope.row.result">
<template v-for="(each, index) in scope.row.result"> <template v-for="(each, index) in scope.row.result">
<el-button :key="index" type="primary" size="small" style="margin-right: 8px;margin-left: 0;margin-bottom: 5px" @click="handleLoad(each)">{{ each.name }}</el-button> <el-button :key="index" type="primary" size="small" :disabled="!hasPermission && each.name !=='场景1'" style="margin-right: 8px;margin-left: 0;margin-bottom: 5px" @click="handleLoad(each)">{{ each.name }}</el-button>
</template> </template>
</div> </div>
</template> </template>
@ -24,7 +25,7 @@
</template> </template>
<script> <script>
import { getDraftScriptByGroupNew } from '@/api/script'; import { getDraftScriptByGroupNew } from '@/api/script';
import {loadCompetitionPracticalScene, getCompetitionPracticalScene} from '@/api/competition'; import {loadCompetitionPracticalScene, getCompetitionPracticalScene, queryCompetitionPracticalPermissions} from '@/api/competition';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
import ConstConfig from '@/scripts/ConstConfig'; import ConstConfig from '@/scripts/ConstConfig';
@ -35,6 +36,7 @@ export default {
projectMapList:[], projectMapList:[],
dialogVisible: false, dialogVisible: false,
selectMapId:'', selectMapId:'',
hasPermission: false,
form: { form: {
type: '' type: ''
}, },
@ -59,6 +61,11 @@ export default {
}; };
}, },
mounted() { mounted() {
queryCompetitionPracticalPermissions({mapId:this.$route.query.mapId}).then(res => {
this.hasPermission = !!res.data;
}).catch(() => {
this.$message.error('获取场景权限异常!');
});
getCompetitionPracticalScene({pageSize:100, pageNum:1}).then(res=>{ getCompetitionPracticalScene({pageSize:100, pageNum:1}).then(res=>{
if (res.data.list && res.data.list.length > 0) { if (res.data.list && res.data.list.length > 0) {
const list = res.data.list.sort((a, b) => { const list = res.data.list.sort((a, b) => {

View File

@ -0,0 +1,45 @@
<template>
<div>
<div>
<el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick" />
</div>
<div>
<div />
</div>
</div>
</template>
<script>
import { updateDeptInfo, getAllDeptTree } from '@/api/company';
export default {
name: 'DeptManage',
data() {
return {
defaultProps: {
children: 'children',
label: 'label'
},
data: []
};
},
computed:{
companyId() {
return '';
}
},
mounted() {
getAllDeptTree(this.companyId).then((resp) => {
this.data = resp.data;
});
},
methods: {
handleNodeClick(data) {
console.log(data);
}
}
};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,36 @@
<template>
<div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="部门管理" name="first">部门管理</el-tab-pane>
<!--<el-tab-pane label="职位管理" name="second">职位管理</el-tab-pane>-->
<el-tab-pane label="成员管理" name="second">成员管理</el-tab-pane>
</el-tabs>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false"> </el-button>
</span>
</div>
</template>
<script>
export default {
name: 'Organization',
data() {
return {
dialogVisible: false
};
},
methods: {
doShow() {
this.dialogVisible = true;
},
handleClose() {
this.dialogVisible = false;
}
}
};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,28 @@
<template>
<div>
<el-table :data="tableData" style="width: 100%">
<el-table-column prop="name" label="姓名" />
<el-table-column prop="class" label="班级" />
<el-table-column prop="role" label="角色" />
<el-table-column label="操作" />
</el-table>
</div>
</template>
<script>
export default {
name: 'MemberManage',
data() {
return {
tableData: []
};
},
methods: {
}
};
</script>
<style scoped>
</style>

View File

@ -204,6 +204,7 @@ export default {
}, },
refreshRunPlanName(name) { refreshRunPlanName(name) {
this.$refs.schedule.refreshRunPlanName(name); this.$refs.schedule.refreshRunPlanName(name);
this.$router.replace({ path: this.$route.path, query: { ...this.$route.query, planName: name }});
} }
} }
}; };

View File

@ -10,12 +10,11 @@
:modal="false" :modal="false"
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<el-row> <el-form ref="form" :rules="rules" :model="formModel" label-width="100px" size="medium" @submit.native.prevent>
<el-col :span="6" :offset="2" style="height: 30px; line-height: 30px;">{{ $t('planMonitor.serviceNumber2')+$t('global.colon') }}</el-col> <el-form-item prop="serviceNumber" :label="$t('planMonitor.serviceNumber2')+$t('global.colon')" :required="true">
<el-col :span="10" :offset="1"> <el-input v-model="formModel.serviceNumber" type="text" size="mini" maxlength="3" minlength="2" />
<el-input v-model="serviceNumber" size="mini" maxlength="3" minlength="2" /> </el-form-item>
</el-col> </el-form>
</el-row>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="medium" @click="doClose">{{ $t('global.cancel') }}</el-button> <el-button size="medium" @click="doClose">{{ $t('global.cancel') }}</el-button>
<el-button type="primary" size="medium" @click="handleCommit">{{ $t('global.confirm') }}</el-button> <el-button type="primary" size="medium" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
@ -40,7 +39,15 @@ export default {
return { return {
dialogShow: false, dialogShow: false,
loading: false, loading: false,
serviceNumber: '' formModel:{
serviceNumber: ''
},
rules:{
serviceNumber:[
{required: true, validator: this.validateServiceNumber, trigger: 'blur'},
{required: true, validator: this.validateServiceNumber, trigger: 'change'}
]
}
}; };
}, },
computed: { computed: {
@ -58,9 +65,30 @@ export default {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
}, },
validateServiceNumber(rule, value, callback) {
if (typeof value == 'string' && value.trim().length == 0) {
return callback(new Error('请填写服务号'));
} else {
const newValue = parseInt(value);
if (newValue) {
if (newValue.toString() != value) {
this.formModel.serviceNumber = newValue;
}
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
if (serviceNumberList.includes(value)) {
return callback(new Error('该服务号已存在,请重新填写'));
} else {
return callback();
}
} else {
this.formModel.serviceNumber = '';
}
}
},
handleCommit() { handleCommit() {
if (this.$route.query.planId || this.loadRunPlanId) { this.$refs.dataform.validateForm(() => {
if (this.serviceNumber.length >= 2 && this.serviceNumber.length <= 3) { if (this.$route.query.planId || this.loadRunPlanId) {
checkServiceNumberExist({ planId: this.$route.query.planId || this.loadRunPlanId, serviceNumber: this.serviceNumber }).then(resp => { checkServiceNumberExist({ planId: this.$route.query.planId || this.loadRunPlanId, serviceNumber: this.serviceNumber }).then(resp => {
if (resp.data) { if (resp.data) {
this.$emit('dispatchDialog', { this.$emit('dispatchDialog', {
@ -79,11 +107,13 @@ export default {
} }
}); });
} else { } else {
this.$messageBox('长度在二到三位'); this.$messageBox(this.$t('tip.chooseToOpenTheRunGraph'));
} }
} else { });
this.$messageBox(this.$t('tip.chooseToOpenTheRunGraph')); // if (this.serviceNumber.length >= 2 && this.serviceNumber.length <= 3) {
} // } else {
// this.$messageBox('');
// }
}, },
handleConfirm(isNew = false) { handleConfirm(isNew = false) {
this.doClose(); this.doClose();

View File

@ -58,7 +58,8 @@ export default {
rules: { rules: {
serviceNumber:[ serviceNumber:[
{required: true, validator: this.validateServiceNumber, trigger: 'blur'} {required: true, validator: this.validateServiceNumber, trigger: 'blur'},
{required: true, validator: this.validateServiceNumber, trigger: 'change'}
], ],
beginTime: [ beginTime: [
{ required: true, message: '请填写开始时间', trigger: 'blur' } { required: true, message: '请填写开始时间', trigger: 'blur' }
@ -134,15 +135,24 @@ export default {
this.dialogShow = true; this.dialogShow = true;
}, },
validateServiceNumber(rule, value, callback) { validateServiceNumber(rule, value, callback) {
if (value.trim().length == 0) { if (typeof value == 'string' && value.trim().length == 0) {
return callback(new Error('请填写服务号')); return callback(new Error('请填写服务号'));
} else { } else {
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData); const newValue = parseInt(value);
if (serviceNumberList.includes(value.trim())) { if (newValue) {
return callback(new Error('该服务号已存在,请重新填写')); if (newValue.toString() != value) {
this.formModel.serviceNumber = newValue;
}
const serviceNumberList = Object.keys(this.$store.state.runPlan.editData);
if (serviceNumberList.includes(value)) {
return callback(new Error('该服务号已存在,请重新填写'));
} else {
return callback();
}
} else { } else {
return callback(); this.formModel.serviceNumber = '';
} }
} }
}, },
validateRunningRouting(rule, value, callback) { validateRunningRouting(rule, value, callback) {

View File

@ -32,7 +32,7 @@
<span>{{ $t('global.startTime')+$t('global.colon') }}</span> <span>{{ $t('global.startTime')+$t('global.colon') }}</span>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-time-picker v-model="addModel.startTime" size="mini" value-format="HH:mm:ss" :clearable="false" /> <el-time-picker v-model="addModel.startTime" size="mini" value-format="HH:mm:ss" :clearable="false" :picker-options="{selectableRange:'02:00:00-23:59:59'}" />
</el-col> </el-col>
</el-row> </el-row>
<el-row style="margin-top: 5px;height: 28px;line-height: 28px;"> <el-row style="margin-top: 5px;height: 28px;line-height: 28px;">

View File

@ -146,6 +146,7 @@
value-format="HH:mm:ss" value-format="HH:mm:ss"
size="mini" size="mini"
:clearable="false" :clearable="false"
:picker-options="{selectableRange:'02:00:00-23:59:59'}"
/> />
</el-col> </el-col>
</el-row> </el-row>

View File

@ -80,8 +80,8 @@ export default {
return { return {
labelWidth: '100px', labelWidth: '100px',
items: [ items: [
{ prop: 'beginTime', label: '开始时间', type: 'timePicker'}, { prop: 'beginTime', label: '开始时间', type: 'timePicker', selectableRange:'02:00:00-23:59:59'},
{ prop: 'overTime', label: '结束时间', type: 'timePicker'}, { prop: 'overTime', label: '结束时间', type: 'timePicker', selectableRange:'02:00:00-23:59:59'},
{ prop: 'departureTimeInterval', label: '发车间隔', type: 'number'}, { prop: 'departureTimeInterval', label: '发车间隔', type: 'number'},
{ prop: 'parkedTime', label: '停站时间', type: 'number'}, { prop: 'parkedTime', label: '停站时间', type: 'number'},
{ prop: 'reentryTime', label: '折返时间', type: 'number'}, { prop: 'reentryTime', label: '折返时间', type: 'number'},

View File

@ -45,10 +45,6 @@ export default {
type: String, type: String,
required: true required: true
}, },
editCourse: {
type: Object,
required: true
},
lineCode: { lineCode: {
type: String, type: String,
default: '' default: ''
@ -111,20 +107,6 @@ export default {
trainingOperateTypeMap: {} trainingOperateTypeMap: {}
}; };
}, },
watch: {
editCourse: function (val) {
this.title = this.$t('publish.modifyRules');
this.editOk = true;
this.form = {
course: val.trainingType,
operateType: val.operateType,
number: val.num,
mark: val.point
};
this.changeCourse(val.trainingType);
this.changeOperation(val.operateType);
}
},
async mounted() { async mounted() {
await this.getList(); await this.getList();
await this.refresh(); await this.refresh();
@ -164,7 +146,19 @@ export default {
} }
}, },
methods: { methods: {
show() { show(detail) {
if (detail) {
this.title = this.$t('publish.modifyRules');
this.editOk = true;
this.changeCourse(detail.trainingType);
this.form = {
course: detail.trainingType,
operateType: detail.operateType,
number: detail.num,
mark: detail.point
};
this.changeOperation(detail.operateType);
}
this.dialogShow = true; this.dialogShow = true;
}, },
checkIncludes(list, obj) { checkIncludes(list, obj) {
@ -187,7 +181,7 @@ export default {
}); });
if (this.editOk) { if (this.editOk) {
// //
this.$emit('editRuleList', this.form); this.$emit('editRuleList', this.form, this.options);
this.editOk = false; this.editOk = false;
setTimeout(() => { setTimeout(() => {
this.handleCancel(); this.handleCancel();
@ -235,7 +229,6 @@ export default {
}); });
this.options = list; this.options = list;
this.changeCourseDisable(); this.changeCourseDisable();
this.$store.dispatch('exam/setCourse', this.options);
}).catch(() => { }).catch(() => {
this.$messageBox(this.$t('publish.refreshFailed')); this.$messageBox(this.$t('publish.refreshFailed'));
}); });
@ -265,7 +258,6 @@ export default {
this.topicNum = resp.data; this.topicNum = resp.data;
return this.topicNum; return this.topicNum;
} }
this.$store.dispatch('exam/setCourse', this.options);
}, },
async changeOperation(val) { async changeOperation(val) {
const param = { const param = {
@ -278,7 +270,6 @@ export default {
this.topicNum = resp.data; this.topicNum = resp.data;
return this.topicNum; return this.topicNum;
} }
this.$store.dispatch('exam/setCourse', this.options);
}, },
// //
changeCourseDisable() { changeCourseDisable() {
@ -309,7 +300,6 @@ export default {
res.disabled = false; res.disabled = false;
} }
}); });
this.$store.dispatch('exam/setCourse', this.options);
} }
} }
}; };

View File

@ -22,8 +22,10 @@
:placeholder="$t('publish.startTestTime')" :placeholder="$t('publish.startTestTime')"
style="width: 100%;" style="width: 100%;"
value-format="timestamp" value-format="timestamp"
:default-value="new Date()"
:disabled="isEdit" :disabled="isEdit"
:picker-options="pickerOptions" :picker-options="pickerOptions"
@change="handle"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -37,8 +39,8 @@
style="width: 100%;" style="width: 100%;"
value-format="timestamp" value-format="timestamp"
:disabled="true" :disabled="true"
:picker-options="pickerOptions"
/> />
<!-- :picker-options="pickerOptions" -->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form-item> </el-form-item>
@ -123,6 +125,7 @@ export default {
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
return time.getTime() < new Date(new Date().toLocaleDateString()).getTime(); return time.getTime() < new Date(new Date().toLocaleDateString()).getTime();
// return time.getTime() < Date.now() - 1 * 24 * 3600 * 1000;
} }
}, },
formDetail: { formDetail: {
@ -217,6 +220,12 @@ export default {
passMark: data.passMark passMark: data.passMark
}; };
}, },
handle() {
var startAt = new Date(this.form.startDate) * 1000 / 1000;
if (startAt < Date.now()) {
this.form.startDate = new Date().getTime();
}
},
getClassList() { getClassList() {
if (this.isClassShow) { if (this.isClassShow) {
this.classList = []; this.classList = [];
@ -255,34 +264,26 @@ export default {
}); });
}, },
submitForm() { submitForm() {
this.submit('definition');
},
submit(type) {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
if (this.form.startDate) { const form = Object.assign({}, this.form);
this.form.startDate = this.getDate(this.form.startDate); if (form.startDate) {
form.startDate = this.getDate(form.startDate);
} }
if (this.form.endDate) { if (form.endDate) {
this.form.endDate = this.getDate(this.form.endDate); form.endDate = this.getDate(form.endDate);
} }
this.form['trial'] = this.trial; form['trial'] = this.trial;
this.$store.dispatch('exam/setCourseDetail', this.form); this.$store.dispatch('exam/setCourseDetail', form);
this.$emit('definition', this.form); this.$emit(type, form);
} }
}); });
}, },
createQuickly() { createQuickly() {
this.$refs['form'].validate((valid) => { this.submit('createQuickly');
if (valid) {
if (this.form.startDate) {
this.form.startDate = this.getDate(this.form.startDate);
}
if (this.form.endDate) {
this.form.endDate = this.getDate(this.form.endDate);
}
this.form['trial'] = this.trial;
this.$store.dispatch('exam/setCourseDetail', this.form);
this.$emit('createQuickly', this.form);
}
});
}, },
getDate(date) { getDate(date) {
const now = new Date(date); const now = new Date(date);

View File

@ -149,6 +149,7 @@ export default {
this.$store.dispatch('exam/setRuleList', []); // this.$store.dispatch('exam/setRuleList', []); //
const path = `${this.$route.path.match(/(\/.*)\/examRule/)[1]}${UrlConfig.examRuleManage}`; const path = `${this.$route.path.match(/(\/.*)\/examRule/)[1]}${UrlConfig.examRuleManage}`;
const lessonId = this.$route.params.lessonId; const lessonId = this.$route.params.lessonId;
this.$store.dispatch('exam/setCourseDetail', {});
if (parseInt(lessonId)) { if (parseInt(lessonId)) {
this.$router.replace({ path: `${path}`, query: { mapId: this.$route.query.mapId, lessonId: lessonId, noPreLogout: this.$route.query.noPreLogout } }); this.$router.replace({ path: `${path}`, query: { mapId: this.$route.query.mapId, lessonId: lessonId, noPreLogout: this.$route.query.noPreLogout } });
} else { } else {

View File

@ -18,7 +18,6 @@
ref="addRule" ref="addRule"
:course-id="courseId" :course-id="courseId"
:line-code="lineCode" :line-code="lineCode"
:edit-course="editCourse"
@addRuleList="addRuleList" @addRuleList="addRuleList"
@editRuleList="editRuleList" @editRuleList="editRuleList"
/> />
@ -52,7 +51,6 @@ export default {
return { return {
ruleList: this.$store.state.exam.ruleList, ruleList: this.$store.state.exam.ruleList,
courseId: this.course.region, courseId: this.course.region,
editCourse: {},
formDetail: { formDetail: {
name: '', name: '',
region: '', region: '',
@ -141,8 +139,8 @@ export default {
name: this.course.name, // name: this.course.name, //
passingPoint: Number(this.course.passMark), // passingPoint: Number(this.course.passMark), //
remarks: this.course.desc, // remarks: this.course.desc, //
endTime: this.course.endTime, endTime: this.course.endDate,
startTime: this.course.startTime, startTime: this.course.startDate,
type: this.course.type, // type: this.course.type, //
trial: this.course.trial == 2 // trial: this.course.trial == 2 //
}; };
@ -215,8 +213,7 @@ export default {
}); });
}); });
}, },
editRuleList(data) { editRuleList(data, arr) {
var arr = this.$store.state.exam.courseList;
let value; let value;
arr.forEach(res => { arr.forEach(res => {
if (res.code == data.course) { if (res.code == data.course) {
@ -239,7 +236,6 @@ export default {
this.ruleList.splice(this.indexCourse, 1, element); this.ruleList.splice(this.indexCourse, 1, element);
}, },
handleForm(data) { handleForm(data) {
// editCourse
this.indexCourse = data.$index; this.indexCourse = data.$index;
const list = JSON.stringify(data.row); const list = JSON.stringify(data.row);
const detail = JSON.parse(list); const detail = JSON.parse(list);
@ -250,8 +246,7 @@ export default {
return detail.name; return detail.name;
} }
}); });
this.editCourse = detail; this.$refs.addRule.show(detail);
this.handleAdd();
}, },
deleteForm(data) { deleteForm(data) {
const index = data.$index; const index = data.$index;

View File

@ -76,7 +76,8 @@ export default {
title: this.$t('publish.examTime'), title: this.$t('publish.examTime'),
prop: 'startTime', prop: 'startTime',
type: 'formatter', type: 'formatter',
format: 'yyyy-MM-dd hh:ss' format: 'yyyy-MM-dd hh:ss',
width:'200px'
}, },
{ {
title: this.$t('publish.fullMark'), title: this.$t('publish.fullMark'),

View File

@ -4,7 +4,7 @@
<el-dialog title="复制iscs数据" :visible.sync="dialogVisible" width="400px" center> <el-dialog title="复制iscs数据" :visible.sync="dialogVisible" width="400px" center>
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" /> <data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button> <el-button :loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
<el-button @click="close">{{ $t('global.cancel') }}</el-button> <el-button @click="close">{{ $t('global.cancel') }}</el-button>
</span> </span>
</el-dialog> </el-dialog>
@ -158,11 +158,14 @@ export default {
}, },
doSave() { doSave() {
this.$refs.dataform.validateForm(() => { this.$refs.dataform.validateForm(() => {
this.loading = true;
copyIscsData(this.formModel).then(res=>{ copyIscsData(this.formModel).then(res=>{
this.loading = false;
this.$message.success('复制ISCS数据成功'); this.$message.success('复制ISCS数据成功');
this.close(); this.close();
this.reloadTable(); this.reloadTable();
}).catch(() => { }).catch(() => {
this.loading = false;
this.reloadTable(); this.reloadTable();
this.$messageBox('复制ISCS数据失败'); this.$messageBox('复制ISCS数据失败');
}); });

View File

@ -26,6 +26,7 @@ export default {
{ label: '运行图数据', value: 'RUN_PLAN' }, { label: '运行图数据', value: 'RUN_PLAN' },
{ label: '3d数据', value: 'MAP_3D_DATA' }, { label: '3d数据', value: 'MAP_3D_DATA' },
{ label: 'ibp数据', value: 'ibp' }, { label: 'ibp数据', value: 'ibp' },
{ label: 'iscs数据', value: 'iscs' },
{ label: '指令定义', value: 'COMMAND_DEFINITION' }, { label: '指令定义', value: 'COMMAND_DEFINITION' },
{ label: '剧本数据', value: 'script' }, { label: '剧本数据', value: 'script' },
{ label: '线路配置', value: 'REAL_LINE_CONFIG', selected: true } { label: '线路配置', value: 'REAL_LINE_CONFIG', selected: true }
@ -57,6 +58,7 @@ export default {
runPlan: this.checkList.includes('RUN_PLAN'), runPlan: this.checkList.includes('RUN_PLAN'),
map3dData: this.checkList.includes('MAP_3D_DATA'), map3dData: this.checkList.includes('MAP_3D_DATA'),
ibp: this.checkList.includes('ibp'), ibp: this.checkList.includes('ibp'),
iscs: this.checkList.includes('iscs'),
script:this.checkList.includes('script'), script:this.checkList.includes('script'),
commandDefinition: this.checkList.includes('COMMAND_DEFINITION'), commandDefinition: this.checkList.includes('COMMAND_DEFINITION'),
realLineConfig: this.checkList.includes('REAL_LINE_CONFIG') realLineConfig: this.checkList.includes('REAL_LINE_CONFIG')

View File

@ -54,7 +54,6 @@ import { getSessionStorage, setSessionStorage } from '@/utils/auth';
import { trainingNotifyNew } from '@/api/simulation'; import { trainingNotifyNew } from '@/api/simulation';
import { getPublishMapInfo } from '@/api/jmap/map'; import { getPublishMapInfo } from '@/api/jmap/map';
import { launchFullscreen } from '@/utils/screen'; import { launchFullscreen } from '@/utils/screen';
import localStore from 'storejs';
export default { export default {
name: 'LessonDetail', name: 'LessonDetail',
@ -230,7 +229,6 @@ export default {
backLessonList() { backLessonList() {
this.disabled = true; this.disabled = true;
setTimeout(() => { setTimeout(() => {
localStore.remove('teachDetail' + this.$route.params.subSystem);
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachHome}/${this.$route.params.subSystem}`}); this.$router.push({ path: `${UrlConfig.trainingPlatform.teachHome}/${this.$route.params.subSystem}`});
}, 100); }, 100);
}, },

View File

@ -86,7 +86,6 @@ export default {
} }
}, },
goLesson(row) { goLesson(row) {
localStore.set('teachDetail' + this.$route.params.subSystem, `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.params.subSystem}?lessonId=${row.id}&mapId=${row.mapId}&prdType=${row.prdType}`);
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.params.subSystem}`, query: {lessonId: row.id, mapId: row.mapId, prdType: row.prdType}}); this.$router.push({ path: `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.params.subSystem}`, query: {lessonId: row.id, mapId: row.mapId, prdType: row.prdType}});
}, },
handleDelete(row) { handleDelete(row) {

View File

@ -113,8 +113,7 @@ export default {
break; break;
case 'Lesson': case 'Lesson':
this.setLocalRoute(`${UrlConfig.trainingPlatform.teachHome}/${obj.id}`); this.setLocalRoute(`${UrlConfig.trainingPlatform.teachHome}/${obj.id}`);
router = localStore.get('teachDetail' + obj.id); router = { path: `${UrlConfig.trainingPlatform.teachHome}/${obj.id}`};
if (!router) { router = { path: `${UrlConfig.trainingPlatform.teachHome}/${obj.id}`}; }
this.toNextPage(isReplace, router); this.toNextPage(isReplace, router);
break; break;
case 'Simulation': case 'Simulation':

View File

@ -1,98 +1,98 @@
import { mount, createLocalVue } from '@vue/test-utils' import { mount, createLocalVue } from '@vue/test-utils';
import VueRouter from 'vue-router' import VueRouter from 'vue-router';
import ElementUI from 'element-ui' import ElementUI from 'element-ui';
import Breadcrumb from '@/components/Breadcrumb/index.vue' import Breadcrumb from '@/components/Breadcrumb/index.vue';
const localVue = createLocalVue() const localVue = createLocalVue();
localVue.use(VueRouter) localVue.use(VueRouter);
localVue.use(ElementUI) localVue.use(ElementUI);
const routes = [ const routes = [
{ {
path: '/', path: '/',
name: 'home', name: 'home',
children: [{
path: 'dashboard',
name: 'dashboard'
}]
},
{
path: '/menu',
name: 'menu',
children: [{
path: 'menu1',
name: 'menu1',
meta: { title: 'menu1' },
children: [{
path: 'menu1-1',
name: 'menu1-1',
meta: { title: 'menu1-1' }
},
{
path: 'menu1-2',
name: 'menu1-2',
redirect: 'noredirect',
meta: { title: 'menu1-2' },
children: [{ children: [{
path: 'menu1-2-1', path: 'dashboard',
name: 'menu1-2-1', name: 'dashboard'
meta: { title: 'menu1-2-1' }
},
{
path: 'menu1-2-2',
name: 'menu1-2-2'
}] }]
}] },
}] {
}] path: '/menu',
name: 'menu',
children: [{
path: 'menu1',
name: 'menu1',
meta: { title: 'menu1' },
children: [{
path: 'menu1-1',
name: 'menu1-1',
meta: { title: 'menu1-1' }
},
{
path: 'menu1-2',
name: 'menu1-2',
redirect: 'noredirect',
meta: { title: 'menu1-2' },
children: [{
path: 'menu1-2-1',
name: 'menu1-2-1',
meta: { title: 'menu1-2-1' }
},
{
path: 'menu1-2-2',
name: 'menu1-2-2'
}]
}]
}]
}];
const router = new VueRouter({ const router = new VueRouter({
routes routes
}) });
describe('Breadcrumb.vue', () => { describe('Breadcrumb.vue', () => {
const wrapper = mount(Breadcrumb, { const wrapper = mount(Breadcrumb, {
localVue, localVue,
router router
}) });
it('dashboard', () => { it('dashboard', () => {
router.push('/dashboard') router.push('/dashboard');
const len = wrapper.findAll('.el-breadcrumb__inner').length const len = wrapper.findAll('.el-breadcrumb__inner').length;
expect(len).toBe(1) expect(len).toBe(1);
}) });
it('normal route', () => { it('normal route', () => {
router.push('/menu/menu1') router.push('/menu/menu1');
const len = wrapper.findAll('.el-breadcrumb__inner').length const len = wrapper.findAll('.el-breadcrumb__inner').length;
expect(len).toBe(2) expect(len).toBe(2);
}) });
it('nested route', () => { it('nested route', () => {
router.push('/menu/menu1/menu1-2/menu1-2-1') router.push('/menu/menu1/menu1-2/menu1-2-1');
const len = wrapper.findAll('.el-breadcrumb__inner').length const len = wrapper.findAll('.el-breadcrumb__inner').length;
expect(len).toBe(4) expect(len).toBe(4);
}) });
it('no meta.title', () => { it('no meta.title', () => {
router.push('/menu/menu1/menu1-2/menu1-2-2') router.push('/menu/menu1/menu1-2/menu1-2-2');
const len = wrapper.findAll('.el-breadcrumb__inner').length const len = wrapper.findAll('.el-breadcrumb__inner').length;
expect(len).toBe(3) expect(len).toBe(3);
}) });
// it('click link', () => { // it('click link', () => {
// router.push('/menu/menu1/menu1-2/menu1-2-2') // router.push('/menu/menu1/menu1-2/menu1-2-2')
// const breadcrumbArray = wrapper.findAll('.el-breadcrumb__inner') // const breadcrumbArray = wrapper.findAll('.el-breadcrumb__inner')
// const second = breadcrumbArray.at(1) // const second = breadcrumbArray.at(1)
// console.log(breadcrumbArray) // console.log(breadcrumbArray)
// const href = second.find('a').attributes().href // const href = second.find('a').attributes().href
// expect(href).toBe('#/menu/menu1') // expect(href).toBe('#/menu/menu1')
// }) // })
// it('noRedirect', () => { // it('noRedirect', () => {
// router.push('/menu/menu1/menu1-2/menu1-2-1') // router.push('/menu/menu1/menu1-2/menu1-2-1')
// const breadcrumbArray = wrapper.findAll('.el-breadcrumb__inner') // const breadcrumbArray = wrapper.findAll('.el-breadcrumb__inner')
// const redirectBreadcrumb = breadcrumbArray.at(2) // const redirectBreadcrumb = breadcrumbArray.at(2)
// expect(redirectBreadcrumb.contains('a')).toBe(false) // expect(redirectBreadcrumb.contains('a')).toBe(false)
// }) // })
it('last breadcrumb', () => { it('last breadcrumb', () => {
router.push('/menu/menu1/menu1-2/menu1-2-1') router.push('/menu/menu1/menu1-2/menu1-2-1');
const breadcrumbArray = wrapper.findAll('.el-breadcrumb__inner') const breadcrumbArray = wrapper.findAll('.el-breadcrumb__inner');
const redirectBreadcrumb = breadcrumbArray.at(3) const redirectBreadcrumb = breadcrumbArray.at(3);
expect(redirectBreadcrumb.contains('a')).toBe(false) expect(redirectBreadcrumb.contains('a')).toBe(false);
}) });
}) });

View File

@ -1,18 +1,19 @@
import { shallowMount } from '@vue/test-utils' import { shallowMount } from '@vue/test-utils';
import Hamburger from '@/components/Hamburger/index.vue' import Hamburger from '@/components/Hamburger/index.vue';
describe('Hamburger.vue', () => { describe('Hamburger.vue', () => {
it('toggle click', () => { it('toggle click', () => {
const wrapper = shallowMount(Hamburger) const wrapper = shallowMount(Hamburger);
const mockFn = jest.fn() const mockFn = jest.fn();
wrapper.vm.$on('toggleClick', mockFn) wrapper.vm.$on('toggleClick', mockFn);
wrapper.find('.hamburger').trigger('click') wrapper.find('.hamburger').trigger('click');
expect(mockFn).toBeCalled() expect(mockFn).toBeCalled();
}) });
it('prop isActive', () => { it('prop isActive', () => {
const wrapper = shallowMount(Hamburger) const wrapper = shallowMount(Hamburger);
wrapper.setProps({ isActive: true }) wrapper.setProps({ isActive: true });
expect(wrapper.contains('.is-active')).toBe(true) expect(wrapper.contains('.is-active')).toBe(true);
wrapper.setProps({ isActive: false }) wrapper.setProps({ isActive: false });
expect(wrapper.contains('.is-active')).toBe(false) expect(wrapper.contains('.is-active')).toBe(false);
}) });
}) });

View File

@ -1,22 +1,22 @@
import { shallowMount } from '@vue/test-utils' import { shallowMount } from '@vue/test-utils';
import SvgIcon from '@/components/SvgIcon/index.vue' import SvgIcon from '@/components/SvgIcon/index.vue';
describe('SvgIcon.vue', () => { describe('SvgIcon.vue', () => {
it('iconClass', () => { it('iconClass', () => {
const wrapper = shallowMount(SvgIcon, { const wrapper = shallowMount(SvgIcon, {
propsData: { propsData: {
iconClass: 'test' iconClass: 'test'
} }
}) });
expect(wrapper.find('use').attributes().href).toBe('#icon-test') expect(wrapper.find('use').attributes().href).toBe('#icon-test');
}) });
it('className', () => { it('className', () => {
const wrapper = shallowMount(SvgIcon, { const wrapper = shallowMount(SvgIcon, {
propsData: { propsData: {
iconClass: 'test' iconClass: 'test'
} }
}) });
expect(wrapper.classes().length).toBe(1) expect(wrapper.classes().length).toBe(1);
wrapper.setProps({ className: 'test' }) wrapper.setProps({ className: 'test' });
expect(wrapper.classes().includes('test')).toBe(true) expect(wrapper.classes().includes('test')).toBe(true);
}) });
}) });