Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
5751a6bbad
@ -47,3 +47,128 @@ export function setCompanyManager(companyId, 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'
|
||||
});
|
||||
}
|
||||
|
@ -147,3 +147,11 @@ export function getSceneExport(id) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询国赛剧本权限 */
|
||||
export function queryCompetitionPracticalPermissions(params) {
|
||||
return request({
|
||||
url: `/api/v1/competitionPractical/query/permissions`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
@ -183,6 +183,7 @@ export default {
|
||||
examSystem: 'Examination System',
|
||||
runPlanSystem: 'The run plan system',
|
||||
personalDetails: 'information',
|
||||
organization: 'organization',
|
||||
trainingPlatformEntrance: 'Training platform entrance',
|
||||
designPlatformEntrance: 'Design platform entrance',
|
||||
connect: 'connect',
|
||||
|
@ -183,6 +183,7 @@ export default {
|
||||
examSystem: '考试系统',
|
||||
runPlanSystem: '运行图系统',
|
||||
personalDetails: '个人信息',
|
||||
organization: '单位组织',
|
||||
trainingPlatformEntrance: '实训平台入口',
|
||||
designPlatformEntrance: '设计平台入口',
|
||||
connect: '连接',
|
||||
|
@ -8,7 +8,7 @@ import KeyboardController from './keyboardController';
|
||||
import {calculateDCenter, createBoundingRect, deviceFactory} from './utils/parser';
|
||||
import { updateIscsData } from './utils/parser';
|
||||
import store from '@/store/index';
|
||||
import { selectLineCode } from './constant/deviceStyle';
|
||||
import fuzhouStyle from './constant/skinCode/fuzhou_01.js';
|
||||
|
||||
const renderer = 'canvas';
|
||||
const devicePixelRatio = 1;
|
||||
@ -60,7 +60,7 @@ class Iscs {
|
||||
// 保存原始数据
|
||||
this.data = config;
|
||||
this.lineCode = lineCode;
|
||||
this.style = this.loadStyle(lineCode);
|
||||
this.style = fuzhouStyle;
|
||||
// 保存需展现的画布大小
|
||||
this.canvasSize = {
|
||||
x: 0,
|
||||
@ -112,9 +112,11 @@ class Iscs {
|
||||
|
||||
if (this.methods.optionsUpdate instanceof Function) { this.methods.optionsUpdate(this.$options); }
|
||||
}
|
||||
loadStyle(lineCode) {
|
||||
return selectLineCode(lineCode);
|
||||
}
|
||||
|
||||
// loadStyle(lineCode) {
|
||||
// return selectLineCode(lineCode);
|
||||
// }
|
||||
|
||||
setCenter(deviceCode) {
|
||||
const device = this.iscsDevice[deviceCode];
|
||||
if (device && device.instance) {
|
||||
|
@ -374,13 +374,13 @@ class SkinCode extends defaultStyle {
|
||||
// 屏蔽门
|
||||
this[deviceType.Psd] = {
|
||||
// 宁波一号线 屏蔽门
|
||||
elemnetType:['safetyDoorNormal'],
|
||||
safetyDoorNormal: { // 屏蔽门
|
||||
elemnetType:['rectDoor'],
|
||||
rectDoor: { // 屏蔽门
|
||||
z:0,
|
||||
height: 3, // 站台屏蔽门高度
|
||||
distance: 4, // 站台和屏蔽门之间的距离
|
||||
defaultColor: 'green', // 屏蔽门默认颜色
|
||||
splitDoorColor: 'green' // 屏蔽门切除颜色
|
||||
defaultColor: '#000000', // 屏蔽门默认颜色
|
||||
splitDoorColor: '#00FF00' // 屏蔽门切除颜色
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -411,55 +411,58 @@ class SkinCode extends defaultStyle {
|
||||
lampSpace: 60 // 灯间距
|
||||
},
|
||||
StationControl:{
|
||||
special:true, // 文字 cc 或者 lc
|
||||
text: {
|
||||
distance: 2, // 灯和文字之间的距离
|
||||
fontSize: 12, // 字体大小
|
||||
fontFormat: 'consolas', // 字体格式
|
||||
fontColor: '#ffffff', // 字体颜色
|
||||
centerControlColor: '#ffffff', // 中控字体颜色
|
||||
stationControlColor: '#ff0', // 站控字体颜色
|
||||
emergencyControlColor:'#f00', // 紧急站控字体颜色
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
textAlign: 'middle', // 字体水平对齐
|
||||
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', // 人工进路模式
|
||||
artificialRouteColor: '#FF0000' // 人工进路模式
|
||||
},
|
||||
stationControlMode: {
|
||||
defaultText: 'CC', // 中央控制车站
|
||||
defaultColor: '#FFFFFF', // 中央控制车站
|
||||
localControlText: 'LC', // 本地控制车站
|
||||
localControlColor: '#FFFF00', // 本地控制车站
|
||||
emergencyControlText: 'EL', // 本地紧急越权控制
|
||||
emergencyControlColor: '#FF0000' // 本地紧急越权控制
|
||||
},
|
||||
// stationControlMode: {
|
||||
// defaultText: 'CC', // 中央控制车站
|
||||
// defaultColor: '#FFFFFF', // 中央控制车站
|
||||
// localControlText: 'LC', // 本地控制车站
|
||||
// localControlColor: '#FFFF00', // 本地控制车站
|
||||
// emergencyControlText: 'EL', // 本地紧急越权控制
|
||||
// emergencyControlColor: '#FF0000' // 本地紧急越权控制
|
||||
// },
|
||||
stationCommunication: {
|
||||
defaultText: 'CL', // 现场建立通信
|
||||
defaultColor: '#00FF00', // 现场建立通信
|
||||
|
@ -49,7 +49,7 @@ export default class Line2 extends Group {
|
||||
switch (type) {
|
||||
case '01': break;
|
||||
case '02':
|
||||
this.segment.setStyle('lineDash', this.style.lineDash || [4]);
|
||||
this.segment && this.segment.setStyle('lineDash', this.style.lineDash || [4]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
59
src/jmapNew/shape/Psd/ERectDoor.js
Normal file
59
src/jmapNew/shape/Psd/ERectDoor.js
Normal 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;
|
@ -4,6 +4,7 @@ import EVertical2Door from './EVertical2Door';
|
||||
import EHorizontal2Door from './EHorizontal2Door';
|
||||
import EHighlight from '../element/EHighlight';
|
||||
import {traverseLineElements} from '../utils/ShapeStatusCovert';
|
||||
import ERectDoor from './ERectDoor';
|
||||
|
||||
export default class Line2 extends Group {
|
||||
constructor(model, style) {
|
||||
@ -28,7 +29,8 @@ export default class Line2 extends Group {
|
||||
const elementTypeList = {
|
||||
'safetyDoorNormal':ESafeDoor, // 正常屏蔽门
|
||||
'vertical2Door':EVertical2Door, // 西安二号线屏蔽门 上下两条虚线型
|
||||
'horizontal2Door':EHorizontal2Door // 哈尔滨线路屏蔽门 左右两个
|
||||
'horizontal2Door':EHorizontal2Door, // 哈尔滨线路屏蔽门 左右两个
|
||||
'rectDoor': ERectDoor // 泰雷兹 宁波三号线 站台边框
|
||||
};
|
||||
// 遍历当前线路下的绘图元素 组合模式
|
||||
traverseLineElements(style.Psd, elementTypeList, model, style, this);
|
||||
|
@ -27,21 +27,21 @@ export default class EDeviceStatus extends Group {
|
||||
textVerticalAlign: style.textStyle.textVerticalAlign
|
||||
}
|
||||
});
|
||||
this.stationControlMode = new Text({
|
||||
zlevle: this.zlevle,
|
||||
z: this.z,
|
||||
style: {
|
||||
x: model.x + style.ModeStatusGroup.distance,
|
||||
y: model.y,
|
||||
fontWeight: style.textStyle.fontWeight,
|
||||
fontSize: style.ModeStatusGroup.fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: style.ModeStatusGroup.stationControlMode.defaultText,
|
||||
textFill: style.ModeStatusGroup.stationControlMode.defaultColor,
|
||||
textAlign: style.textStyle.textAlign,
|
||||
textVerticalAlign: style.textStyle.textVerticalAlign
|
||||
}
|
||||
});
|
||||
// this.stationControlMode = new Text({
|
||||
// zlevle: this.zlevle,
|
||||
// z: this.z,
|
||||
// style: {
|
||||
// x: model.x + style.ModeStatusGroup.distance,
|
||||
// y: model.y,
|
||||
// fontWeight: style.textStyle.fontWeight,
|
||||
// fontSize: style.ModeStatusGroup.fontSize,
|
||||
// fontFamily: style.fontFamily,
|
||||
// text: style.ModeStatusGroup.stationControlMode.defaultText,
|
||||
// textFill: style.ModeStatusGroup.stationControlMode.defaultColor,
|
||||
// textAlign: style.textStyle.textAlign,
|
||||
// textVerticalAlign: style.textStyle.textVerticalAlign
|
||||
// }
|
||||
// });
|
||||
this.stationCommunication = new Text({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
@ -73,7 +73,7 @@ export default class EDeviceStatus extends Group {
|
||||
}
|
||||
});
|
||||
this.add(this.routeMode);
|
||||
this.add(this.stationControlMode);
|
||||
// this.add(this.stationControlMode);
|
||||
this.add(this.stationCommunication);
|
||||
this.add(this.verifyBypass);
|
||||
}
|
||||
|
@ -151,6 +151,11 @@ export default class Station extends Group {
|
||||
createControlMode() {
|
||||
const model = this.model;
|
||||
if (!this.style.Station.StationControl.disPlayNone) {
|
||||
if (this.style.Station.StationControl.special) {
|
||||
if (model.visible && model.createControlMode) { // model.createControlMode 控制模式
|
||||
this.createSpecialControlMode();
|
||||
}
|
||||
} else {
|
||||
if (model.visible && model.createControlMode) { // model.createControlMode 控制模式
|
||||
this.createEmergencyControl(); // 紧急站控
|
||||
this.createCenterControl(); // 中控按钮
|
||||
@ -158,9 +163,31 @@ export default class Station extends Group {
|
||||
this.createInterconnectedControl(); // 联锁控
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
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() { // 紧急站控
|
||||
const model = this.model;
|
||||
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.setTextColor(this.style.Station.StationControl.lamp.greenColor); // 文字颜色
|
||||
this.stationText.setColor('#1fdc1f');
|
||||
this.stationControlText && this.stationControlText.setStyle({text:'CC', textFill:this.style.Station.StationControl.text.centerControlColor});
|
||||
//
|
||||
//
|
||||
// if (this.style.Station.StationControl.disPlayNone) {
|
||||
// this.stationText && this.stationText.setStyle('textFill', '#1fdc1f');
|
||||
// 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.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
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) {
|
||||
// this.stationText && this.stationText.setStyle('textFill', '#fff');
|
||||
// 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.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
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) {
|
||||
// this.stationText && this.stationText.setStyle('textFill', '#fff');
|
||||
// if (this.model.subheadDisplay) { // 副标题
|
||||
|
@ -107,8 +107,8 @@ class StationStand extends Group {
|
||||
if (path.includes('/map/draw')) {
|
||||
this.highlight = new EHighlight(this);
|
||||
this.add(this.highlight);
|
||||
this.on('mouseout', () => { this.highlight.mouseout(); });
|
||||
this.on('mouseover', () => { this.highlight.mouseover(); });
|
||||
this.on('mouseout', () => { console.log('====='); this.highlight.mouseout(); });
|
||||
this.on('mouseover', () => { console.log('111111'); this.highlight.mouseover(); });
|
||||
} else {
|
||||
if (this.style.StationStand.mouseOverStyle) {
|
||||
this.mouseEvent = new EMouse(this);
|
||||
|
@ -17,7 +17,7 @@ class ESolidStand extends Group {
|
||||
|
||||
this.stand = new Rect({
|
||||
zlevel: this.model.zlevel,
|
||||
z: this.model.z,
|
||||
z: this.model.z + 2,
|
||||
shape: {
|
||||
x: standX,
|
||||
y: standY,
|
||||
@ -26,8 +26,7 @@ class ESolidStand extends Group {
|
||||
},
|
||||
style: {
|
||||
fill:style.StationStand.solidStand.spareColor,
|
||||
lineWidth: style.StationStand.solidStand.lineWidth || 0,
|
||||
stroke: style.StationStand.solidStand.spareStrokeColor
|
||||
lineWidth: 0
|
||||
}
|
||||
});
|
||||
this.add(this.stand);
|
||||
@ -69,7 +68,6 @@ class ESolidStand extends Group {
|
||||
recover() {
|
||||
const style = this.model.style;
|
||||
this.setColor(style.StationStand.solidStand.spareColor);
|
||||
this.setStroke(style.StationStand.solidStand.spareStrokeColor);
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
@ -82,7 +80,6 @@ class ESolidStand extends Group {
|
||||
model.allSkip && this.setColor(style.StationStand.solidStand.jumpStopColor);
|
||||
// 停车
|
||||
model.trainParking && this.setColor(style.StationStand.solidStand.stopColor);
|
||||
model.trainParking && this.setStroke(style.StationStand.solidStand.doorOpenColor);
|
||||
// 紧急停车
|
||||
model.emergencyClosed && this.setColor(style.StationStand.solidStand.spareColor);
|
||||
} else {
|
||||
|
@ -17,7 +17,7 @@ class EHighlight extends Group {
|
||||
const rect = this.device.getBoundingRect();
|
||||
this.lineBorder = new Rect({
|
||||
zlevel: this.device.zlevel,
|
||||
z: this.device.z + 1,
|
||||
z: this.device._type === 'StationStand' ? this.device.z + 3 : this.device.z + 1,
|
||||
shape: rect,
|
||||
style: {
|
||||
fill: fill
|
||||
|
@ -231,7 +231,28 @@ export default {
|
||||
const type = State2SimulationMap[this.$store.state.training.prdType];
|
||||
if (control.controlMode != type) {
|
||||
this.clearAllMenuShow();
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -98,15 +98,27 @@ export default {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Section.unlock.confirm.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', {
|
||||
device: this.selected,
|
||||
operation: { code: OperationEvent.Section.unlock.menu.operation, name: '区段解锁'},
|
||||
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();
|
||||
});
|
||||
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
@ -1,8 +1,9 @@
|
||||
<template>
|
||||
<div class="xian-02__menus" :style="{width: width + 'px'}">
|
||||
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
||||
<menu-cancel ref="menuCancel" />
|
||||
<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-signal ref="menuSignal" :selected="selected" />
|
||||
<menu-section ref="menuSection" :selected="selected" />
|
||||
@ -21,12 +22,13 @@ import { mapGetters } from 'vuex';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuAxleReset from './menuAxleReset';
|
||||
import MenuAutoTrunRoute from './menuAutoTrunRoute';
|
||||
import MenuStationControl from './menuStationControl';
|
||||
// import MenuStationControl from './menuStationControl';
|
||||
import MenuSwitch from './menuSwitch';
|
||||
import MenuSection from './menuSection';
|
||||
import MenuTrain from './menuTrain';
|
||||
import MenuStation from './menuStation';
|
||||
import MenuLimit from './menuLimit';
|
||||
import MenuCancel from './menuCancel';
|
||||
// import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from './passiveDialog/control';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
@ -42,11 +44,12 @@ export default {
|
||||
MenuSignal,
|
||||
MenuSwitch,
|
||||
MenuSection,
|
||||
MenuStationControl,
|
||||
// MenuStationControl,
|
||||
MenuStation,
|
||||
MenuTrain,
|
||||
MenuLimit,
|
||||
MenuStationStand,
|
||||
MenuCancel,
|
||||
// PassiveAlarm,
|
||||
PassiveContorl,
|
||||
PopStationStand,
|
||||
|
259
src/jmapNew/theme/xian_02/menus/menuCancel.vue
Normal file
259
src/jmapNew/theme/xian_02/menus/menuCancel.vue
Normal 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>
|
@ -154,7 +154,7 @@ export default {
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
}).catch((e) => {
|
||||
this.loading = false;
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
|
@ -276,7 +276,7 @@ export default {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/pushRequestList', {
|
||||
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,
|
||||
param: operate.param
|
||||
});
|
||||
|
@ -221,7 +221,7 @@ export default {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) {
|
||||
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);
|
||||
} else {
|
||||
this.doClose();
|
||||
|
@ -18,6 +18,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
export default {
|
||||
name: 'StationMenu',
|
||||
@ -41,14 +42,42 @@ export default {
|
||||
tipSubhead: '',
|
||||
menu: [],
|
||||
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: [
|
||||
{
|
||||
label: '本地控制许可',
|
||||
children: [
|
||||
{
|
||||
label: '请求',
|
||||
handler: this.undeveloped
|
||||
handler: this.setStationControl,
|
||||
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
|
||||
},
|
||||
{
|
||||
label: '授权',
|
||||
@ -69,11 +98,13 @@ export default {
|
||||
children: [
|
||||
{
|
||||
label: '自动',
|
||||
handler: this.atsAutoControlALL
|
||||
handler: this.atsAutoControlALL,
|
||||
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '人工',
|
||||
handler: this.humanControlALL
|
||||
handler: this.humanControlALL,
|
||||
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -190,7 +221,9 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
this.menu = [];
|
||||
this.menu = [...this.menuNormal.Center];
|
||||
// this.menu = [...this.menuNormal.Center];
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
if (this.selected.reentry) {
|
||||
const menuAdd = {
|
||||
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() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
|
@ -12,6 +12,7 @@
|
||||
custom-class="station-stand"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div :id="domCancelTableMenu" style="position: relative; top: -40px;left: 440px;" />
|
||||
<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-row>
|
||||
@ -49,7 +50,7 @@
|
||||
<div class="left-table-cell"><span>跳停</span></div>
|
||||
</el-col>
|
||||
<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 :span="8">
|
||||
<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>
|
||||
</el-col>
|
||||
<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 :span="8">
|
||||
<div class="right-table-cell"><span :style="{color: detainStatusColor}">所有列车本站扣车</span></div>
|
||||
@ -172,6 +173,15 @@ export default {
|
||||
},
|
||||
domIdConfirm() {
|
||||
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: {
|
||||
@ -207,7 +217,17 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
doShow(position) {
|
||||
// this.operate = operate || {};
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StandTable.menu.operation,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
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;
|
||||
@ -215,6 +235,10 @@ export default {
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
initStatus(requestList) {
|
||||
this.standDetainColor = '#FFF';
|
||||
@ -233,6 +257,12 @@ export default {
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
const step = {
|
||||
operation: OperationEvent.StationStand.tableMenu.cancelTableMenu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
@ -240,6 +270,8 @@ export default {
|
||||
clearInterval(this.detainInterval);
|
||||
this.detainInterval = '';
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
menuEvent(val) {
|
||||
if (val) {
|
||||
|
@ -176,7 +176,7 @@ export default {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
|
||||
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);
|
||||
} else {
|
||||
this.doClose();
|
||||
|
@ -302,9 +302,8 @@ export default {
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||
// code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.setJumpStop.tableMenu.operation,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
@ -314,7 +313,7 @@ export default {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', {
|
||||
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,
|
||||
param: step.param
|
||||
});
|
||||
@ -324,9 +323,8 @@ export default {
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||
// code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.cancelJumpStop.tableMenu.operation,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
@ -336,7 +334,7 @@ export default {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', {
|
||||
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,
|
||||
param: step.param
|
||||
});
|
||||
@ -382,9 +380,8 @@ export default {
|
||||
},
|
||||
setStandDetain() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||
// code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.setDetainTrain.tableMenu.operation,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
@ -394,7 +391,7 @@ export default {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', {
|
||||
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,
|
||||
param: step.param
|
||||
});
|
||||
@ -405,9 +402,8 @@ export default {
|
||||
},
|
||||
cancelStandDetain() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
||||
// code: this.selected.code,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.tableMenu.operation,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
@ -417,7 +413,7 @@ export default {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', {
|
||||
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,
|
||||
param: step.param
|
||||
});
|
||||
|
@ -10,8 +10,10 @@ export default {
|
||||
trainingType: 'Stand',
|
||||
productTypes: ['01', '02'], // 产品类型 01 现地 02 行调
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【扣车】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '00a', 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',
|
||||
productTypes: ['01', '02'], // 产品类型 01 现地 02 行调
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '00a', 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',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【设置跳停】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '00a', 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',
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '00a', 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'],
|
||||
stepVOList: [
|
||||
{ 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: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
@ -331,7 +339,8 @@ export default {
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ 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: '鼠标左键点击【发送请求】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -10,6 +10,9 @@
|
||||
<el-dropdown-item>
|
||||
<span style="display:block;" @click="handleDetail">{{ $t('global.personalDetails') }}</span>
|
||||
</el-dropdown-item>
|
||||
<!--<el-dropdown-item>-->
|
||||
<!--<span style="display:block;" @click="handleOrganization">{{ $t('global.organization') }}</span>-->
|
||||
<!--</el-dropdown-item>-->
|
||||
<el-dropdown-item>
|
||||
<span style="display:block;" @click="logout">{{ $t('global.exit') }}</span>
|
||||
</el-dropdown-item>
|
||||
@ -49,6 +52,9 @@ export default {
|
||||
},
|
||||
handleDetail() {
|
||||
this.$refs.userInfo.doShow();
|
||||
},
|
||||
handleOrganization() {
|
||||
this.$router.push({ path: `/trainingPlatform/organization` });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -139,6 +139,7 @@ const PreTheoryImport = () => import('@/views/competitionManage/bankList/preImpo
|
||||
const PlanScheduleWicket = () => import('@/views/newMap/displayNew/demon/planSchedule');
|
||||
const MessageBoard = () => import('@/views/messageBoard/index');
|
||||
const BoardManage = () => import('@/views/messageBoard/manage');
|
||||
const OrganizationManage = () => import('@/views/organization/index');
|
||||
|
||||
// import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
|
||||
// import { getSessionStorage } from '@/utils/auth';
|
||||
@ -603,6 +604,11 @@ export const asyncRouter = [
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // 单位组织管理
|
||||
path: 'organization',
|
||||
component: OrganizationManage,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -79,6 +79,21 @@ class MenuContextHandler {
|
||||
}
|
||||
if (menu.constructor === Array) {
|
||||
menu.forEach(elem => {
|
||||
if (elem.children && elem.children.length > 0) {
|
||||
elem.children.forEach(each=>{
|
||||
this.covertEachCommand(each, type, selected, status);
|
||||
});
|
||||
} else {
|
||||
this.covertEachCommand(elem, type, selected, status);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
return menu;
|
||||
}
|
||||
|
||||
covertEachCommand(elem, type, selected, status) {
|
||||
if (elem.type === 'separator') {
|
||||
elem.show = true;
|
||||
return;
|
||||
@ -97,12 +112,6 @@ class MenuContextHandler {
|
||||
} else {
|
||||
elem.show = false;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
return menu;
|
||||
}
|
||||
|
||||
menuBarConvert(menu, mode) {
|
||||
|
@ -246,7 +246,13 @@ export const OperationEvent = {
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 站台概要表
|
||||
StandTable: {
|
||||
menu: {
|
||||
operation: '00a',
|
||||
domId: '_Tips-standTable-menu'
|
||||
}
|
||||
},
|
||||
// 道岔操作
|
||||
Switch: {
|
||||
// 取消故障
|
||||
@ -1560,6 +1566,13 @@ export const OperationEvent = {
|
||||
operation: '500'
|
||||
}
|
||||
},
|
||||
// 站台概要表
|
||||
tableMenu: {
|
||||
cancelTableMenu: {
|
||||
operation: '5001',
|
||||
domId: '_Tips-Stand-TableMenu-CancelTableMenu'
|
||||
}
|
||||
},
|
||||
// 提前发车
|
||||
earlyDeparture: {
|
||||
menu: {
|
||||
@ -1603,7 +1616,11 @@ export const OperationEvent = {
|
||||
},
|
||||
confirm: {
|
||||
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: {
|
||||
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: {
|
||||
operation: '5041',
|
||||
domId: '_Tips-Stand-SetDetainTrain-Menu{BOTTOM}'
|
||||
},
|
||||
tableMenu: {
|
||||
operation: '5042',
|
||||
domId: '_Tips-Stand-SetOrCancelDetain-TableMenu'
|
||||
}
|
||||
},
|
||||
// 取消扣车
|
||||
@ -1661,6 +1686,10 @@ export const OperationEvent = {
|
||||
menuButton: {
|
||||
operation: '5052',
|
||||
domId: '_Tips-Stand-CancelDetainTrain-Menu{BOTTOM}'
|
||||
},
|
||||
tableMenu: {
|
||||
operation: '5053',
|
||||
domId: '_Tips-Stand-SetOrCancelDetain-TableMenu'
|
||||
}
|
||||
},
|
||||
// 强制取消扣车
|
||||
|
@ -1,8 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
<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 v-if="$route.query.noPreLogout" class="ibp-button" type="primary" @click="quit">退出</el-button>
|
||||
<el-button-group class="ibp-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">
|
||||
<source :src="buzzerAudio" type="audio/mpeg">
|
||||
</audio>
|
||||
@ -38,6 +42,7 @@ export default {
|
||||
return {
|
||||
width: this.$store.state.config.width,
|
||||
height: this.$store.state.config.height,
|
||||
moreScreen: false,
|
||||
offsetX: 0,
|
||||
dataZoom: {
|
||||
offsetX: '0',
|
||||
@ -101,8 +106,8 @@ export default {
|
||||
}
|
||||
this.initIbp();
|
||||
if (this.$route.query.loadAll && this.$route.query.stationCode) {
|
||||
await this.show(this.$route.query.stationCode);
|
||||
await this.setMoveInit(true);
|
||||
await this.show(this.$route.query.stationCode, 'left');
|
||||
await this.setMoveInit(false);
|
||||
this.showBackButton = false;
|
||||
}
|
||||
},
|
||||
@ -182,7 +187,7 @@ export default {
|
||||
}
|
||||
const data = parser(ibpDatas, {width: this.canvasWidth, height: this.canvasHeight}); // ibp 绘图编译数据
|
||||
this.initIbp(this.offsetX);
|
||||
|
||||
this.moreScreen = ibpDatas.background && ibpDatas.background.width > 1920;
|
||||
this.setIbp(data, ibpDatas);
|
||||
this.$store.dispatch('ibp/setIbpData', ibpDatas);
|
||||
this.handleBanOpenScreenDoorStatus();
|
||||
@ -195,7 +200,6 @@ export default {
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error, '===');
|
||||
this.loading = false;
|
||||
this.$alert('当前ibp盘数据有问题请检查', '信息', {
|
||||
confirmButtonText: '确定',
|
||||
@ -313,6 +317,19 @@ export default {
|
||||
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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -7,12 +7,12 @@
|
||||
<!--<el-cascader v-model="mapStationList" style="width: 100%;" :props="props" placeholder="请选择车站" @change="handleChange" />-->
|
||||
<!--<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />-->
|
||||
<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
|
||||
v-for="item in lineList"
|
||||
:key="item.code"
|
||||
v-for="item in mapPublishList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
@ -34,7 +34,6 @@
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { removeSessionStorage } from '@/utils/auth';
|
||||
import { getPublishMapListOnline, getStationListNeedAttendant } from '@/api/jmap/map';
|
||||
import { getLineCodeList } from '@/api/management/mapline';
|
||||
|
||||
export default {
|
||||
name: 'UserMapList',
|
||||
@ -53,13 +52,13 @@ export default {
|
||||
y: 0
|
||||
},
|
||||
editModel: {},
|
||||
lineCode: '',
|
||||
mapId: '',
|
||||
mapList: [],
|
||||
mapStationList: [],
|
||||
lineList: [],
|
||||
mapPublishList: [],
|
||||
pageTreeMap: {
|
||||
'01': [],
|
||||
'02': [
|
||||
'114': [
|
||||
{
|
||||
// 牵引降压混合变电所主接线图 变电所接线图 降压变电所主接线图 解除网图 混合变电所主接线图
|
||||
name: '电力监控系统',
|
||||
@ -885,8 +884,8 @@ export default {
|
||||
};
|
||||
},
|
||||
treeList() {
|
||||
if (this.lineCode) {
|
||||
return this.pageTreeMap[this.lineCode];
|
||||
if (this.mapId) {
|
||||
return this.pageTreeMap[this.mapId];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
@ -904,11 +903,12 @@ export default {
|
||||
removeSessionStorage('demonList');
|
||||
},
|
||||
mounted() {
|
||||
if (this.$route.query.lineCode) {
|
||||
this.lineCode = this.$route.query.lineCode;
|
||||
if (this.$route.query.mapId) {
|
||||
this.mapId = this.$route.query.mapId;
|
||||
}
|
||||
getLineCodeList().then(resp => {
|
||||
this.lineList = resp.data || [];
|
||||
|
||||
getPublishMapListOnline().then(resp => {
|
||||
this.mapPublishList = resp.data || [];
|
||||
}).catch(() => {
|
||||
this.$message.error('获取线路列表异常!');
|
||||
});
|
||||
@ -928,7 +928,7 @@ export default {
|
||||
case 'system' :
|
||||
break;
|
||||
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;
|
||||
}
|
||||
},
|
||||
|
@ -3,7 +3,7 @@
|
||||
<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-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-form-item>
|
||||
<el-form-item label="文字内容:" prop="context">
|
||||
@ -106,7 +106,10 @@ export default {
|
||||
computed:{
|
||||
...mapGetters('iscs', [
|
||||
'iscs'
|
||||
])
|
||||
]),
|
||||
iscsTextList() {
|
||||
return this.iscs ? this.iscs.iscsTextList || [] : [];
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'$store.state.iscs.rightClickCount': function (val) {
|
||||
@ -141,7 +144,7 @@ export default {
|
||||
x: this.form.x,
|
||||
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',
|
||||
context: this.form.context,
|
||||
unit: this.form.unit,
|
||||
|
@ -112,8 +112,7 @@ export default {
|
||||
handleSave(data) {
|
||||
const param = {
|
||||
graphData: data,
|
||||
lineCode: this.$route.query.lineCode,
|
||||
stationCode: '',
|
||||
mapId: this.$route.query.mapId,
|
||||
system: this.$route.query.system,
|
||||
totalSystem: this.$route.query.mode,
|
||||
userInterface: this.$route.query.part
|
||||
|
@ -126,7 +126,7 @@ export default {
|
||||
}
|
||||
},
|
||||
setIscs(data, oldData) {
|
||||
this.$iscs.setIscs(oldData, data, this.$route.query.lineCode);
|
||||
this.$iscs.setIscs(oldData, data, this.$route.query.mapId);
|
||||
},
|
||||
// 执行操作
|
||||
handleModel(model) {
|
||||
|
@ -60,9 +60,11 @@ export default {
|
||||
this.bacground = 'rgba(0,0,0,0)';
|
||||
this.scaleRate = window.innerWidth / 2200;
|
||||
if (this.stationId == 'mainHouseOne') {
|
||||
this.title = '黄山主变电所接线图';
|
||||
// 黄山
|
||||
this.title = '主所1主变电所接线图';
|
||||
} else {
|
||||
this.title = '茶亭主变电所接线图';
|
||||
// 茶亭
|
||||
this.title = '主所2主变电所接线图';
|
||||
}
|
||||
params.userInterface = 'substation';
|
||||
// parkingLotName
|
||||
|
@ -35,8 +35,8 @@
|
||||
<div class="mainHouseTwo">
|
||||
<div class="station-list-button" :class="{'active': selectStation == 'mainHouseTwo'}" @click="changeStation('mainHouseTwo')" />
|
||||
</div>
|
||||
<div class="mainHouseOneName">黄山主所</div>
|
||||
<div class="mainHouseTwoName">茶亭主所</div>
|
||||
<div class="mainHouseOneName">主所1</div>
|
||||
<div class="mainHouseTwoName">主所2</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -102,9 +102,8 @@ export default {
|
||||
alarmInfo: true,
|
||||
selectStation: 'mainHouseOne',
|
||||
stationList:[],
|
||||
tractionList:['象峰站', '罗汉山站', '树兜站', '东街口站', '达道站', '三叉街站', '葫芦阵站', '城门站', '胪雷站', '安平站', '梁厝站', '三江口站'],
|
||||
tractionList:[],
|
||||
group:'',
|
||||
lineCode:'',
|
||||
buttonId:'substation',
|
||||
buttonList:{
|
||||
stationDescription:{name:'车站概要', type:'totalSystem', id: 'stationDescription', active:false, icon:iscs_icon1 },
|
||||
@ -328,18 +327,15 @@ export default {
|
||||
this.stationList = [];
|
||||
res.data.forEach(station => {
|
||||
if (!station.depot && station.visible) {
|
||||
let param = {};
|
||||
if (station.runPlanName.includes('站')) {
|
||||
param = {
|
||||
name: station.runPlanName,
|
||||
id: station.code
|
||||
};
|
||||
} else {
|
||||
param = {
|
||||
name: station.runPlanName + '站',
|
||||
const param = {
|
||||
name: station.runPlanName.includes('站') ? station.runPlanName : `${station.runPlanName}站`,
|
||||
id: station.code
|
||||
};
|
||||
|
||||
if (station.centralized) {
|
||||
this.tractionList.push(param.name);
|
||||
}
|
||||
|
||||
this.stationList.push(param);
|
||||
}
|
||||
});
|
||||
@ -350,7 +346,6 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.group = this.$route.query.group;
|
||||
this.lineCode = this.$route.query.lineCode;
|
||||
this.subscribe();
|
||||
const data = Object.values(this.buttonList);
|
||||
this.initButtonGroup(data);
|
||||
@ -437,7 +432,7 @@ export default {
|
||||
if (station) {
|
||||
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) {
|
||||
this.$router.replace({ path: `/displayIscs/system/stationConfig/${type}`, query: query });
|
||||
|
@ -50,14 +50,14 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.lessonList = [];
|
||||
},
|
||||
methods: {
|
||||
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}`);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(node) {
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
|
@ -398,3 +398,14 @@ export default {
|
||||
line-height: 80px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.ql-size-small {
|
||||
font-size: 0.75em;
|
||||
}
|
||||
.ql-size-large{
|
||||
font-size: 1.5em;
|
||||
}
|
||||
.ql-size-huge{
|
||||
font-size: 2.5em;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,9 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<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-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 prop="type" width="200" label="类别" />
|
||||
<el-table-column prop="scene" width="350" label="场景" />
|
||||
@ -11,7 +12,7 @@
|
||||
<template slot-scope="scope">
|
||||
<div v-if="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>
|
||||
</div>
|
||||
</template>
|
||||
@ -24,7 +25,7 @@
|
||||
</template>
|
||||
<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 ConstConfig from '@/scripts/ConstConfig';
|
||||
|
||||
@ -35,6 +36,7 @@ export default {
|
||||
projectMapList:[],
|
||||
dialogVisible: false,
|
||||
selectMapId:'',
|
||||
hasPermission: false,
|
||||
form: {
|
||||
type: ''
|
||||
},
|
||||
@ -59,6 +61,11 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
queryCompetitionPracticalPermissions({mapId:this.$route.query.mapId}).then(res => {
|
||||
this.hasPermission = !!res.data;
|
||||
}).catch(() => {
|
||||
this.$message.error('获取场景权限异常!');
|
||||
});
|
||||
getCompetitionPracticalScene({pageSize:100, pageNum:1}).then(res=>{
|
||||
if (res.data.list && res.data.list.length > 0) {
|
||||
const list = res.data.list.sort((a, b) => {
|
||||
|
45
src/views/organization/deptManage.vue
Normal file
45
src/views/organization/deptManage.vue
Normal 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>
|
36
src/views/organization/index.vue
Normal file
36
src/views/organization/index.vue
Normal 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>
|
28
src/views/organization/memberManage.vue
Normal file
28
src/views/organization/memberManage.vue
Normal 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>
|
@ -204,6 +204,7 @@ export default {
|
||||
},
|
||||
refreshRunPlanName(name) {
|
||||
this.$refs.schedule.refreshRunPlanName(name);
|
||||
this.$router.replace({ path: this.$route.path, query: { ...this.$route.query, planName: name }});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -10,12 +10,11 @@
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6" :offset="2" style="height: 30px; line-height: 30px;">{{ $t('planMonitor.serviceNumber2')+$t('global.colon') }}</el-col>
|
||||
<el-col :span="10" :offset="1">
|
||||
<el-input v-model="serviceNumber" size="mini" maxlength="3" minlength="2" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form ref="form" :rules="rules" :model="formModel" label-width="100px" size="medium" @submit.native.prevent>
|
||||
<el-form-item prop="serviceNumber" :label="$t('planMonitor.serviceNumber2')+$t('global.colon')" :required="true">
|
||||
<el-input v-model="formModel.serviceNumber" type="text" size="mini" maxlength="3" minlength="2" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="medium" @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button type="primary" size="medium" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
|
||||
@ -40,7 +39,15 @@ export default {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
formModel:{
|
||||
serviceNumber: ''
|
||||
},
|
||||
rules:{
|
||||
serviceNumber:[
|
||||
{required: true, validator: this.validateServiceNumber, trigger: 'blur'},
|
||||
{required: true, validator: this.validateServiceNumber, trigger: 'change'}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -58,9 +65,30 @@ export default {
|
||||
this.loading = 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() {
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
if (this.$route.query.planId || this.loadRunPlanId) {
|
||||
if (this.serviceNumber.length >= 2 && this.serviceNumber.length <= 3) {
|
||||
checkServiceNumberExist({ planId: this.$route.query.planId || this.loadRunPlanId, serviceNumber: this.serviceNumber }).then(resp => {
|
||||
if (resp.data) {
|
||||
this.$emit('dispatchDialog', {
|
||||
@ -78,12 +106,14 @@ export default {
|
||||
this.handleConfirm(true);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$messageBox('长度在二到三位');
|
||||
}
|
||||
} else {
|
||||
this.$messageBox(this.$t('tip.chooseToOpenTheRunGraph'));
|
||||
}
|
||||
});
|
||||
// if (this.serviceNumber.length >= 2 && this.serviceNumber.length <= 3) {
|
||||
// } else {
|
||||
// this.$messageBox('长度在二到三位');
|
||||
// }
|
||||
},
|
||||
handleConfirm(isNew = false) {
|
||||
this.doClose();
|
||||
|
@ -58,7 +58,8 @@ export default {
|
||||
|
||||
rules: {
|
||||
serviceNumber:[
|
||||
{required: true, validator: this.validateServiceNumber, trigger: 'blur'}
|
||||
{required: true, validator: this.validateServiceNumber, trigger: 'blur'},
|
||||
{required: true, validator: this.validateServiceNumber, trigger: 'change'}
|
||||
],
|
||||
beginTime: [
|
||||
{ required: true, message: '请填写开始时间', trigger: 'blur' }
|
||||
@ -134,15 +135,24 @@ export default {
|
||||
this.dialogShow = true;
|
||||
},
|
||||
validateServiceNumber(rule, value, callback) {
|
||||
if (value.trim().length == 0) {
|
||||
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.trim())) {
|
||||
if (serviceNumberList.includes(value)) {
|
||||
return callback(new Error('该服务号已存在,请重新填写'));
|
||||
} else {
|
||||
return callback();
|
||||
}
|
||||
} else {
|
||||
this.formModel.serviceNumber = '';
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
validateRunningRouting(rule, value, callback) {
|
||||
|
@ -32,7 +32,7 @@
|
||||
<span>{{ $t('global.startTime')+$t('global.colon') }}</span>
|
||||
</el-col>
|
||||
<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-row>
|
||||
<el-row style="margin-top: 5px;height: 28px;line-height: 28px;">
|
||||
|
@ -146,6 +146,7 @@
|
||||
value-format="HH:mm:ss"
|
||||
size="mini"
|
||||
:clearable="false"
|
||||
:picker-options="{selectableRange:'02:00:00-23:59:59'}"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -80,8 +80,8 @@ export default {
|
||||
return {
|
||||
labelWidth: '100px',
|
||||
items: [
|
||||
{ prop: 'beginTime', label: '开始时间', type: 'timePicker'},
|
||||
{ prop: 'overTime', label: '结束时间', type: 'timePicker'},
|
||||
{ prop: 'beginTime', label: '开始时间', type: 'timePicker', selectableRange:'02:00:00-23:59:59'},
|
||||
{ prop: 'overTime', label: '结束时间', type: 'timePicker', selectableRange:'02:00:00-23:59:59'},
|
||||
{ prop: 'departureTimeInterval', label: '发车间隔', type: 'number'},
|
||||
{ prop: 'parkedTime', label: '停站时间', type: 'number'},
|
||||
{ prop: 'reentryTime', label: '折返时间', type: 'number'},
|
||||
|
@ -45,10 +45,6 @@ export default {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
editCourse: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
lineCode: {
|
||||
type: String,
|
||||
default: ''
|
||||
@ -111,20 +107,6 @@ export default {
|
||||
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() {
|
||||
await this.getList();
|
||||
await this.refresh();
|
||||
@ -164,7 +146,19 @@ export default {
|
||||
}
|
||||
},
|
||||
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;
|
||||
},
|
||||
checkIncludes(list, obj) {
|
||||
@ -187,7 +181,7 @@ export default {
|
||||
});
|
||||
if (this.editOk) {
|
||||
// 修改
|
||||
this.$emit('editRuleList', this.form);
|
||||
this.$emit('editRuleList', this.form, this.options);
|
||||
this.editOk = false;
|
||||
setTimeout(() => {
|
||||
this.handleCancel();
|
||||
@ -235,7 +229,6 @@ export default {
|
||||
});
|
||||
this.options = list;
|
||||
this.changeCourseDisable();
|
||||
this.$store.dispatch('exam/setCourse', this.options);
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('publish.refreshFailed'));
|
||||
});
|
||||
@ -265,7 +258,6 @@ export default {
|
||||
this.topicNum = resp.data;
|
||||
return this.topicNum;
|
||||
}
|
||||
this.$store.dispatch('exam/setCourse', this.options);
|
||||
},
|
||||
async changeOperation(val) {
|
||||
const param = {
|
||||
@ -278,7 +270,6 @@ export default {
|
||||
this.topicNum = resp.data;
|
||||
return this.topicNum;
|
||||
}
|
||||
this.$store.dispatch('exam/setCourse', this.options);
|
||||
},
|
||||
// 判断类型是否选择过
|
||||
changeCourseDisable() {
|
||||
@ -309,7 +300,6 @@ export default {
|
||||
res.disabled = false;
|
||||
}
|
||||
});
|
||||
this.$store.dispatch('exam/setCourse', this.options);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -22,8 +22,10 @@
|
||||
:placeholder="$t('publish.startTestTime')"
|
||||
style="width: 100%;"
|
||||
value-format="timestamp"
|
||||
:default-value="new Date()"
|
||||
:disabled="isEdit"
|
||||
:picker-options="pickerOptions"
|
||||
@change="handle"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -37,8 +39,8 @@
|
||||
style="width: 100%;"
|
||||
value-format="timestamp"
|
||||
:disabled="true"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<!-- :picker-options="pickerOptions" -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
@ -123,6 +125,7 @@ export default {
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return time.getTime() < new Date(new Date().toLocaleDateString()).getTime();
|
||||
// return time.getTime() < Date.now() - 1 * 24 * 3600 * 1000;
|
||||
}
|
||||
},
|
||||
formDetail: {
|
||||
@ -217,6 +220,12 @@ export default {
|
||||
passMark: data.passMark
|
||||
};
|
||||
},
|
||||
handle() {
|
||||
var startAt = new Date(this.form.startDate) * 1000 / 1000;
|
||||
if (startAt < Date.now()) {
|
||||
this.form.startDate = new Date().getTime();
|
||||
}
|
||||
},
|
||||
getClassList() {
|
||||
if (this.isClassShow) {
|
||||
this.classList = [];
|
||||
@ -255,34 +264,26 @@ export default {
|
||||
});
|
||||
},
|
||||
submitForm() {
|
||||
this.submit('definition');
|
||||
},
|
||||
submit(type) {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.startDate) {
|
||||
this.form.startDate = this.getDate(this.form.startDate);
|
||||
const form = Object.assign({}, this.form);
|
||||
if (form.startDate) {
|
||||
form.startDate = this.getDate(form.startDate);
|
||||
}
|
||||
if (this.form.endDate) {
|
||||
this.form.endDate = this.getDate(this.form.endDate);
|
||||
if (form.endDate) {
|
||||
form.endDate = this.getDate(form.endDate);
|
||||
}
|
||||
this.form['trial'] = this.trial;
|
||||
this.$store.dispatch('exam/setCourseDetail', this.form);
|
||||
this.$emit('definition', this.form);
|
||||
form['trial'] = this.trial;
|
||||
this.$store.dispatch('exam/setCourseDetail', form);
|
||||
this.$emit(type, form);
|
||||
}
|
||||
});
|
||||
},
|
||||
createQuickly() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
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);
|
||||
}
|
||||
});
|
||||
this.submit('createQuickly');
|
||||
},
|
||||
getDate(date) {
|
||||
const now = new Date(date);
|
||||
|
@ -149,6 +149,7 @@ export default {
|
||||
this.$store.dispatch('exam/setRuleList', []); // 清空规则列表数据
|
||||
const path = `${this.$route.path.match(/(\/.*)\/examRule/)[1]}${UrlConfig.examRuleManage}`;
|
||||
const lessonId = this.$route.params.lessonId;
|
||||
this.$store.dispatch('exam/setCourseDetail', {});
|
||||
if (parseInt(lessonId)) {
|
||||
this.$router.replace({ path: `${path}`, query: { mapId: this.$route.query.mapId, lessonId: lessonId, noPreLogout: this.$route.query.noPreLogout } });
|
||||
} else {
|
||||
|
@ -18,7 +18,6 @@
|
||||
ref="addRule"
|
||||
:course-id="courseId"
|
||||
:line-code="lineCode"
|
||||
:edit-course="editCourse"
|
||||
@addRuleList="addRuleList"
|
||||
@editRuleList="editRuleList"
|
||||
/>
|
||||
@ -52,7 +51,6 @@ export default {
|
||||
return {
|
||||
ruleList: this.$store.state.exam.ruleList,
|
||||
courseId: this.course.region,
|
||||
editCourse: {},
|
||||
formDetail: {
|
||||
name: '',
|
||||
region: '',
|
||||
@ -141,8 +139,8 @@ export default {
|
||||
name: this.course.name, // 名称
|
||||
passingPoint: Number(this.course.passMark), // 及格分
|
||||
remarks: this.course.desc, // 考试说明
|
||||
endTime: this.course.endTime,
|
||||
startTime: this.course.startTime,
|
||||
endTime: this.course.endDate,
|
||||
startTime: this.course.startDate,
|
||||
type: this.course.type, // 类型
|
||||
trial: this.course.trial == 2 // 权限判断
|
||||
};
|
||||
@ -215,8 +213,7 @@ export default {
|
||||
});
|
||||
});
|
||||
},
|
||||
editRuleList(data) {
|
||||
var arr = this.$store.state.exam.courseList;
|
||||
editRuleList(data, arr) {
|
||||
let value;
|
||||
arr.forEach(res => {
|
||||
if (res.code == data.course) {
|
||||
@ -239,7 +236,6 @@ export default {
|
||||
this.ruleList.splice(this.indexCourse, 1, element);
|
||||
},
|
||||
handleForm(data) {
|
||||
// 子元素监听 editCourse 每次改变值
|
||||
this.indexCourse = data.$index;
|
||||
const list = JSON.stringify(data.row);
|
||||
const detail = JSON.parse(list);
|
||||
@ -250,8 +246,7 @@ export default {
|
||||
return detail.name;
|
||||
}
|
||||
});
|
||||
this.editCourse = detail;
|
||||
this.handleAdd();
|
||||
this.$refs.addRule.show(detail);
|
||||
},
|
||||
deleteForm(data) {
|
||||
const index = data.$index;
|
||||
|
@ -76,7 +76,8 @@ export default {
|
||||
title: this.$t('publish.examTime'),
|
||||
prop: 'startTime',
|
||||
type: 'formatter',
|
||||
format: 'yyyy-MM-dd hh:ss'
|
||||
format: 'yyyy-MM-dd hh:ss',
|
||||
width:'200px'
|
||||
},
|
||||
{
|
||||
title: this.$t('publish.fullMark'),
|
||||
|
@ -4,7 +4,7 @@
|
||||
<el-dialog title="复制iscs数据" :visible.sync="dialogVisible" width="400px" center>
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<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>
|
||||
</span>
|
||||
</el-dialog>
|
||||
@ -158,11 +158,14 @@ export default {
|
||||
},
|
||||
doSave() {
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
this.loading = true;
|
||||
copyIscsData(this.formModel).then(res=>{
|
||||
this.loading = false;
|
||||
this.$message.success('复制ISCS数据成功');
|
||||
this.close();
|
||||
this.reloadTable();
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.reloadTable();
|
||||
this.$messageBox('复制ISCS数据失败');
|
||||
});
|
||||
|
@ -26,6 +26,7 @@ export default {
|
||||
{ label: '运行图数据', value: 'RUN_PLAN' },
|
||||
{ label: '3d数据', value: 'MAP_3D_DATA' },
|
||||
{ label: 'ibp数据', value: 'ibp' },
|
||||
{ label: 'iscs数据', value: 'iscs' },
|
||||
{ label: '指令定义', value: 'COMMAND_DEFINITION' },
|
||||
{ label: '剧本数据', value: 'script' },
|
||||
{ label: '线路配置', value: 'REAL_LINE_CONFIG', selected: true }
|
||||
@ -57,6 +58,7 @@ export default {
|
||||
runPlan: this.checkList.includes('RUN_PLAN'),
|
||||
map3dData: this.checkList.includes('MAP_3D_DATA'),
|
||||
ibp: this.checkList.includes('ibp'),
|
||||
iscs: this.checkList.includes('iscs'),
|
||||
script:this.checkList.includes('script'),
|
||||
commandDefinition: this.checkList.includes('COMMAND_DEFINITION'),
|
||||
realLineConfig: this.checkList.includes('REAL_LINE_CONFIG')
|
||||
|
@ -54,7 +54,6 @@ import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
||||
import { trainingNotifyNew } from '@/api/simulation';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import localStore from 'storejs';
|
||||
|
||||
export default {
|
||||
name: 'LessonDetail',
|
||||
@ -230,7 +229,6 @@ export default {
|
||||
backLessonList() {
|
||||
this.disabled = true;
|
||||
setTimeout(() => {
|
||||
localStore.remove('teachDetail' + this.$route.params.subSystem);
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachHome}/${this.$route.params.subSystem}`});
|
||||
}, 100);
|
||||
},
|
||||
|
@ -86,7 +86,6 @@ export default {
|
||||
}
|
||||
},
|
||||
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}});
|
||||
},
|
||||
handleDelete(row) {
|
||||
|
@ -113,8 +113,7 @@ export default {
|
||||
break;
|
||||
case 'Lesson':
|
||||
this.setLocalRoute(`${UrlConfig.trainingPlatform.teachHome}/${obj.id}`);
|
||||
router = localStore.get('teachDetail' + obj.id);
|
||||
if (!router) { router = { path: `${UrlConfig.trainingPlatform.teachHome}/${obj.id}`}; }
|
||||
router = { path: `${UrlConfig.trainingPlatform.teachHome}/${obj.id}`};
|
||||
this.toNextPage(isReplace, router);
|
||||
break;
|
||||
case 'Simulation':
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { mount, createLocalVue } from '@vue/test-utils'
|
||||
import VueRouter from 'vue-router'
|
||||
import ElementUI from 'element-ui'
|
||||
import Breadcrumb from '@/components/Breadcrumb/index.vue'
|
||||
import { mount, createLocalVue } from '@vue/test-utils';
|
||||
import VueRouter from 'vue-router';
|
||||
import ElementUI from 'element-ui';
|
||||
import Breadcrumb from '@/components/Breadcrumb/index.vue';
|
||||
|
||||
const localVue = createLocalVue()
|
||||
localVue.use(VueRouter)
|
||||
localVue.use(ElementUI)
|
||||
const localVue = createLocalVue();
|
||||
localVue.use(VueRouter);
|
||||
localVue.use(ElementUI);
|
||||
|
||||
const routes = [
|
||||
{
|
||||
@ -44,37 +44,37 @@ const routes = [
|
||||
}]
|
||||
}]
|
||||
}]
|
||||
}]
|
||||
}];
|
||||
|
||||
const router = new VueRouter({
|
||||
routes
|
||||
})
|
||||
});
|
||||
|
||||
describe('Breadcrumb.vue', () => {
|
||||
const wrapper = mount(Breadcrumb, {
|
||||
localVue,
|
||||
router
|
||||
})
|
||||
});
|
||||
it('dashboard', () => {
|
||||
router.push('/dashboard')
|
||||
const len = wrapper.findAll('.el-breadcrumb__inner').length
|
||||
expect(len).toBe(1)
|
||||
})
|
||||
router.push('/dashboard');
|
||||
const len = wrapper.findAll('.el-breadcrumb__inner').length;
|
||||
expect(len).toBe(1);
|
||||
});
|
||||
it('normal route', () => {
|
||||
router.push('/menu/menu1')
|
||||
const len = wrapper.findAll('.el-breadcrumb__inner').length
|
||||
expect(len).toBe(2)
|
||||
})
|
||||
router.push('/menu/menu1');
|
||||
const len = wrapper.findAll('.el-breadcrumb__inner').length;
|
||||
expect(len).toBe(2);
|
||||
});
|
||||
it('nested route', () => {
|
||||
router.push('/menu/menu1/menu1-2/menu1-2-1')
|
||||
const len = wrapper.findAll('.el-breadcrumb__inner').length
|
||||
expect(len).toBe(4)
|
||||
})
|
||||
router.push('/menu/menu1/menu1-2/menu1-2-1');
|
||||
const len = wrapper.findAll('.el-breadcrumb__inner').length;
|
||||
expect(len).toBe(4);
|
||||
});
|
||||
it('no meta.title', () => {
|
||||
router.push('/menu/menu1/menu1-2/menu1-2-2')
|
||||
const len = wrapper.findAll('.el-breadcrumb__inner').length
|
||||
expect(len).toBe(3)
|
||||
})
|
||||
router.push('/menu/menu1/menu1-2/menu1-2-2');
|
||||
const len = wrapper.findAll('.el-breadcrumb__inner').length;
|
||||
expect(len).toBe(3);
|
||||
});
|
||||
// it('click link', () => {
|
||||
// router.push('/menu/menu1/menu1-2/menu1-2-2')
|
||||
// const breadcrumbArray = wrapper.findAll('.el-breadcrumb__inner')
|
||||
@ -90,9 +90,9 @@ describe('Breadcrumb.vue', () => {
|
||||
// expect(redirectBreadcrumb.contains('a')).toBe(false)
|
||||
// })
|
||||
it('last breadcrumb', () => {
|
||||
router.push('/menu/menu1/menu1-2/menu1-2-1')
|
||||
const breadcrumbArray = wrapper.findAll('.el-breadcrumb__inner')
|
||||
const redirectBreadcrumb = breadcrumbArray.at(3)
|
||||
expect(redirectBreadcrumb.contains('a')).toBe(false)
|
||||
})
|
||||
})
|
||||
router.push('/menu/menu1/menu1-2/menu1-2-1');
|
||||
const breadcrumbArray = wrapper.findAll('.el-breadcrumb__inner');
|
||||
const redirectBreadcrumb = breadcrumbArray.at(3);
|
||||
expect(redirectBreadcrumb.contains('a')).toBe(false);
|
||||
});
|
||||
});
|
||||
|
@ -1,18 +1,19 @@
|
||||
import { shallowMount } from '@vue/test-utils'
|
||||
import Hamburger from '@/components/Hamburger/index.vue'
|
||||
import { shallowMount } from '@vue/test-utils';
|
||||
import Hamburger from '@/components/Hamburger/index.vue';
|
||||
|
||||
describe('Hamburger.vue', () => {
|
||||
it('toggle click', () => {
|
||||
const wrapper = shallowMount(Hamburger)
|
||||
const mockFn = jest.fn()
|
||||
wrapper.vm.$on('toggleClick', mockFn)
|
||||
wrapper.find('.hamburger').trigger('click')
|
||||
expect(mockFn).toBeCalled()
|
||||
})
|
||||
const wrapper = shallowMount(Hamburger);
|
||||
const mockFn = jest.fn();
|
||||
wrapper.vm.$on('toggleClick', mockFn);
|
||||
wrapper.find('.hamburger').trigger('click');
|
||||
expect(mockFn).toBeCalled();
|
||||
});
|
||||
it('prop isActive', () => {
|
||||
const wrapper = shallowMount(Hamburger)
|
||||
wrapper.setProps({ isActive: true })
|
||||
expect(wrapper.contains('.is-active')).toBe(true)
|
||||
wrapper.setProps({ isActive: false })
|
||||
expect(wrapper.contains('.is-active')).toBe(false)
|
||||
})
|
||||
})
|
||||
const wrapper = shallowMount(Hamburger);
|
||||
wrapper.setProps({ isActive: true });
|
||||
expect(wrapper.contains('.is-active')).toBe(true);
|
||||
wrapper.setProps({ isActive: false });
|
||||
expect(wrapper.contains('.is-active')).toBe(false);
|
||||
});
|
||||
});
|
||||
|
@ -1,22 +1,22 @@
|
||||
import { shallowMount } from '@vue/test-utils'
|
||||
import SvgIcon from '@/components/SvgIcon/index.vue'
|
||||
import { shallowMount } from '@vue/test-utils';
|
||||
import SvgIcon from '@/components/SvgIcon/index.vue';
|
||||
describe('SvgIcon.vue', () => {
|
||||
it('iconClass', () => {
|
||||
const wrapper = shallowMount(SvgIcon, {
|
||||
propsData: {
|
||||
iconClass: 'test'
|
||||
}
|
||||
})
|
||||
expect(wrapper.find('use').attributes().href).toBe('#icon-test')
|
||||
})
|
||||
});
|
||||
expect(wrapper.find('use').attributes().href).toBe('#icon-test');
|
||||
});
|
||||
it('className', () => {
|
||||
const wrapper = shallowMount(SvgIcon, {
|
||||
propsData: {
|
||||
iconClass: 'test'
|
||||
}
|
||||
})
|
||||
expect(wrapper.classes().length).toBe(1)
|
||||
wrapper.setProps({ className: 'test' })
|
||||
expect(wrapper.classes().includes('test')).toBe(true)
|
||||
})
|
||||
})
|
||||
});
|
||||
expect(wrapper.classes().length).toBe(1);
|
||||
wrapper.setProps({ className: 'test' });
|
||||
expect(wrapper.classes().includes('test')).toBe(true);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user