Merge remote-tracking branch 'remotes/origin/master' into test

This commit is contained in:
ival 2019-08-12 18:30:33 +08:00
commit a779d6ad29
132 changed files with 6961 additions and 6510 deletions

View File

@ -1,5 +1,5 @@
# just a flag
NODE_ENV = 'test'
NODE_ENV = 'production'
# base api
VUE_APP_BASE_API = 'https://test.joylink.club/jlcloud'

View File

@ -18,6 +18,7 @@
"axios": "0.18.0",
"echarts": "^4.2.1",
"element-ui": "2.7.2",
"file-saver": "^1.3.3",
"js-cookie": "2.2.0",
"js-md5": "^0.7.3",
"lodash": "^4.17.11",
@ -49,8 +50,8 @@
"babel-eslint": "10.0.1",
"babel-jest": "23.6.0",
"chalk": "2.4.2",
"copy-webpack-plugin": "^4.5.2",
"connect": "3.6.6",
"copy-webpack-plugin": "^4.5.2",
"eslint": "5.15.3",
"eslint-plugin-vue": "5.2.2",
"file-loader": "^3.0.1",
@ -60,7 +61,7 @@
"runjs": "^4.3.2",
"sass-loader": "^7.1.0",
"script-ext-html-webpack-plugin": "2.1.3",
"script-loader": "0.7.2",
"script-loader": "^0.7.2",
"serve-static": "^1.13.2",
"svg-sprite-loader": "4.1.3",
"svgo": "1.2.2",

View File

@ -1,17 +1,17 @@
import request from '@/utils/request';
/** 获取地图版本信息*/
/** 根据皮肤获取地图版本信息*/
export function getPublishMapVersion(skinStyle) {
return request({
url: `/api/map/${skinStyle}/version`,
url: `/api/map/skin/${skinStyle}/version`,
method: 'get'
});
}
/** 获取发布地图详细内容*/
/** 根据皮肤获取发布地图详细内容*/
export function getPublishMapDetail(skinStyle) {
const datad = request({
url: `/api/map/${skinStyle}/details`,
url: `/api/map/skin/${skinStyle}/details`,
method: 'get'
});
return datad.then();

View File

@ -17,18 +17,34 @@ export function getPublishMapListBySkinStyle(skinStyle) {
});
}
/** 获取地图版本信息*/
/** 根据皮肤获取地图版本信息*/
export function getPublishMapVersion(skinStyle) {
return request({
url: `/api/map/${skinStyle}/version`,
url: `/api/map/skin/${skinStyle}/version`,
method: 'get'
});
}
/** 获取发布地图详细内容*/
/** 根据皮肤获取发布地图详细内容*/
export function getPublishMapDetail(skinStyle) {
return request({
url: `/api/map/${skinStyle}/details`,
url: `/api/map/skin/${skinStyle}/details`,
method: 'get'
});
}
/** 根据地图id获取地图版本信息*/
export function getPublishMapVersionById(id) {
return request({
url: `/api/map/${id}/version`,
method: 'get'
});
}
/** 根据地图id获取发布地图详细内容*/
export function getPublishMapDetailById(id) {
return request({
url: `/api/map/${id}/details`,
method: 'get'
});
}

View File

@ -5,5 +5,6 @@ export default {
getMapStepsFailed: 'Failed to get map step data',
resetFailed: 'Reset failure',
startTrainingFailed: 'Failure to start training',
saveBackgroundFailed: 'Failed to save background'
saveBackgroundFailed: 'Failed to save background',
deleteFailed: 'Failed to delete'
};

View File

@ -6,5 +6,9 @@ export default {
cancel: 'Cancel',
reset: 'Reset',
coachingModel: 'Coaching model',
normalMode: 'Normal mode'
normalMode: 'Normal mode',
operate: 'Operate',
edit: 'Edit',
delete: 'Delete',
add: 'Add'
};

View File

@ -1,15 +1,23 @@
import enLocale from 'element-ui/lib/locale/lang/en';
import map from './map';
import global from './global';
import router from './router';
import lesson from './lesson';
import error from './error';
import rules from './rules';
import scriptRecord from './scriptRecord';
import tip from './tip';
import system from './system';
export default {
...enLocale,
map,
global,
router,
lesson,
error,
rules
rules,
scriptRecord,
tip,
system
};

306
src/i18n/langs/en/map.js Normal file
View File

@ -0,0 +1,306 @@
export default {
pleaseSelect: '请选择',
sketchMap: '草稿地图列表',
newConstruction: '新建',
importMap: '导入地图',
createNewMap: '新建地图',
normalCreate: '正常创建',
saveMapAs: '地图另存为',
create: '创建',
dataVerification: '数据校验',
logicalView: '逻辑视图',
physicalView: '物理视图',
mixedView: '混合视图',
normal: '正常',
save: '保存',
updata: '更新',
updateObj: '修改',
updateObjAxis: '更新坐标',
saveAs: '另存为',
publish: '发布',
deleteObj: '删除',
confirm: '确 定',
cancel: '取 消',
cancelledDelete: '已取消删除',
confirmDeletion: '是否确认删除?',
hint: '提示',
link: 'link',
section: '区段',
switch: '道岔',
signal: '信号机',
zcZoneControl: 'zc区域控制',
temporaryLimit: '全线临时限速',
lcControl: 'Lc控制',
image: '图片',
station: '车站',
controlMode: '控制模式',
platform: '站台',
counter: '计数器',
delayUnlock: '延迟解锁',
train: '列车',
trainWindow: '车次窗',
line: '线条',
text: '文字',
mapName: '地图名称:',
skinName: '皮肤风格:',
selectCity: '所属城市:',
offsetXColon: 'X偏移:',
offsetYColon: 'Y偏移:',
scalingColon: '缩放比例:',
operationUnusual: '操作异常:',
offsetX: 'X偏移',
offsetY: 'Y偏移',
scaling: '缩放比例',
statusSignalName: '状态信号名称:',
stateSignalsPlotCoordinates: '状态信号画图坐标:',
equipmentStation: '所属设备集中站:',
lineCoding: '线条编码:',
lineType: '线条类型:',
lineWidth: '线条宽度:',
segmentCoordinates: '区段显示坐标:',
publishMapCreation: '从发布地图创建',
pleaseEnterMapName: '请输入地图名称',
pleaseChooseSkinStyle: '请选择皮肤风格',
pleaseSelectMapSource: '请选择地图来源',
pleaseSelectAssociatedCity: '请选择关联城市',
pleaseSelectAssociatedSkin: '请选择关联皮肤',
pleaseEnteMapLinkWidth: '请输入地图Link宽度',
pleaseEnterMapSectionWidth: '请输入地图区段宽度',
failedLoadListPublishedMaps: '加载已发布地图列表失败',
creatingSuccessful: '创建成功!',
mapUpdateSuccessful: '更新地图成功!',
createFailure: '创建失败',
importSuccessful: '导入成功!',
importFailure: '导入失败',
updateSuccessfully: '更新成功',
updateFailed: '更新失败',
failedLoadCityList: '加载城市列表失败',
successfullyDelete: '删除成功',
failDelete: '删除失败',
dataValidationFailed: '发布失败,数据校验不通过',
releaseSuccess: '发布成功!',
abnormalOperation: '操作异常',
datQuestion: '有问题数据',
dataList: '数据列表',
saveFailed: '另存失败',
mapEditor: '地图编辑',
mapPublished: '地图发布为',
publishingAssociatedCity: '发布关联城市:',
publishMapName: '发布地图名称:',
editRoute: '编辑进路',
editRouting: '编辑交路',
editAutoRouting: '编辑自动信号',
setSwitch: '联动道岔',
pathUnit: '路径单元',
jlmap3d: '三维化编辑',
automaticSignalList: '自动信号列表',
automaticSignalCode: '自动信号编码',
signalCodeName: '信号机名称',
signalCode: '信号机code',
sectionData: '区段数据',
preview: '预览',
operation: '操作',
compile: '编辑',
delete: '删除',
empty: '清空',
sectionName: '区段名称',
sectionList: '区段列表',
automaticSignal: '自动信号',
signalID: '信号机ID:',
activate: '激活',
segmentData: '进路自动触发区段数据:',
pleaseSelectSignal: '请选择信号机',
triggerSegmentData: '请选择进路自动触发区段数据',
automaticSignalSuccessful: '创建自动信号成功!',
failedCreateSignal: '创建自动信号失败',
automaticSignalUpdateSucceeded: '更新自动信号成功!',
automaticSignalUpdateFailed: '更新自动信号失败',
stationName: '车站名称:',
property: '属性',
counterCoding: '计数器编码:',
counterName: '计数器名称:',
belongsStation: '所属车站:',
counterType: '计数器类型:',
countMax: '计数器最大值:',
pointX: '坐标 x:',
pointY: '坐标 y:',
code: '编码:',
imageName: '图片名称:',
imageWidth: '图片宽度:',
imageHeight: '图片高度:',
imagePoint: '图片坐标:',
imageZindex: '图片层级:',
imageSelect: '图片选择:',
rotateAngle: '旋转角度:',
areaSolution: '区故解',
alwaysSolution: '总人解',
pleaseSelectMap: '请选择地图',
selectCounterType: '请选择计数器类型',
selectStation: '请选择车站',
pleaseSelectDevice: '请重新选择设备',
pleaseSelectCountName: '请输入计数器名称',
pleaseCounterValue: '请输入计数器最大值',
pleaseEnterXCoordinate: '请输入x坐标',
pleaseEnterYCoordinate: '请输入y坐标',
pleaseEnterDelayTime: '请输入延时时间',
pleaseEnterFontColor: '请输入字体颜色',
pleaseEnterFontFormat: '请输入字体格式',
pleaseEnterImageWidth: '请输入图片宽度',
pleaseEnterImageHeight: '请输入图片高度',
delayUnlockingCode: '延时解锁编码:',
delayTime: '延时时间:',
font: '字体:',
color: '颜色:',
upside: '上段',
hypomere: '下段',
linkType: 'Link类型',
linkCode: 'Link编码:',
linkName: 'Link名称:',
linkDisplayLength: 'Link显示长度:',
linkActualLength: 'Link实际长度:',
linkColor: 'Link颜色:',
linkLeftFdCode: '左侧正向Link:',
linkLeftSdCode: '左侧侧向Link:',
linkRightFdCode: '右侧正向Link:',
linkRightSdCode: '右侧侧向Link:',
linkLp: 'Link 起点坐标:',
linkRp: 'Link 终点坐标:',
rulesChange: '规则修改',
sectionNameC: '区段名称:',
splitMerge: '拆分/合并',
linkSet: 'Link集合',
selectLink: '选择Link',
splitOffset: '拆分偏移量:',
split: '拆分',
merge: '合并',
logicBlock: '逻辑区段',
aux: '第',
sectionLine: '段折线',
sectionPolyline: '区段折线',
switchSection: '道岔区段',
trainDirection: '列车所在方向:',
deleteSwitchSection: '一键删除道岔区段',
createSwitchSection: '一键创建道岔区段',
sectionLogicalNumber: '逻辑区段数量',
sectionLsectioncode: '左侧区段名称:',
sectionRsectioncode: '右侧区段名称:',
associatedSection: '关联物理区段:',
blockCoding: '区段编码:',
sectionType: '区段类型:',
sectionNameColon: '区段名称:',
sectionNameOffset: '区段名称偏移量:',
leftKilometerMark: '左侧公里标(米):',
rightKilometerMark: '右侧公里标(米):',
sectionColon: '区间:',
displayExtentName: '是否显示区段名称:',
displayAxleCounter: '是否显示计轴:',
displayLogicalExtents: '是否显示逻辑区段:',
displayLogicalWxtentNames: '是否显示逻辑区段名称:',
isStandTrack: '是否站台轨:',
standTrackName: '站台轨名称:',
standTrackNamePosition: '站台轨名称偏移量:',
relStandCode: '站台编码:',
isReentryTrack: '是否折返轨:',
reentryTrackName: '折返轨名称:',
reentryTrackNamePosition: '折返轨名称偏移量:',
isTransferTrack: '是否转换轨:',
transferTrackName: '转换轨名称:',
transferTrackNamePosition: '转换轨名称偏移量:',
destinationCode: '目的地码:',
destinationCodePoint: '目的地码坐标:',
destinationCodeShow: '是否显示目的地码:',
leftStopPointOffset: '左向停车点偏移量:',
rightStopPointOffset: '右向停车点偏移量:',
isSwitchSection: '是否道岔区段:',
relSwitchCode: '关联道岔Code:',
logicSectionNameSort: '逻辑区段排序:',
fromSmallToLarge: '从小到大',
fromLargeToSmall: '从大到小',
relevanceLinkCode: '关联的Link:',
sepTypeLeft: '左侧分隔符类型:',
sectionOffsetLeft: '左侧Link偏移量:',
sepTypeRight: '右侧分隔符类型:',
sectionOffsetRight: '右侧Link偏移量:',
isSegmentation: '是否分割:',
segmentationPosition: '默认背景:',
isCurve: '是否曲线:',
sectionPoints: '区段显示坐标:',
trainPosType: '列车所在方向:',
physicalSegmentName: '物理区段名称:',
directionType: '形式方向:',
leftOrRight: '左右位置:',
positionType: '上下位置:',
signalFilamentAlarm: '灯丝报警',
signalCodeColon: '信号机编码:',
signalNameColon: '信号机名称:',
signalUniqueName: '信号机唯一名称:',
signalDisplayName: '是否显示信号机名称:',
lampPostType: '灯柱类型:',
lampPositionType: '灯位类型:',
signalUseType: '用途类型:',
potLampType: '点灯类型:',
signalDirectionType: '方向类型:',
signalPositionType: '信号机位置类型:',
signalOffset: '偏移量:',
signalPositionX: '信号机x:',
signalPositionY: '信号机y:',
signalRotate: '旋转角度:',
signalNamePositionX: '信号机名字偏移量 x:',
signalNamePositionY: '信号机名字偏移量 y:',
signalButtonShow: '是否显示按钮:',
signalButtonPositionX: '按钮x:',
signalButtonPositionY: '按钮y:',
signalGuideShow: '是否显示引导信号灯:',
signalGuidePositionX: '引导信号x:',
signalGuidePositionY: '引导信号y:',
concentrateStationCode: '所属联锁站编码:',
stationCode: '车站编码:',
zcCode: '所属zc区域编码:',
centralized: '是否集中站:',
stationNameColon: '车站名称:',
stationRunPlanName: '真实名称:',
stationVisible: '是否显示:',
stationNameFont: '车站字体:',
stationNameFontColor: '车站字体颜色:',
stationKmPostShow: '是否显示公里标名称:',
stationKmRange: '公里标距离:',
stationKmPost: '公里标名称:',
stationKmPostFont: '公里标字体:',
stationKmPostFontColor: '公里标字体颜色:',
stationPositionX: 'x坐标:',
stationPositionY: 'y坐标:',
stationControlCode: '控制模式编码:',
stationControlName: '控制模式名称:',
zokContent: '中控内容:',
zakContent: '站控内容:',
jjzkContent: '紧急站控/总报警内容:',
zzkContent: '站中控内容:',
stationControlPositionX: '坐标 x:',
stationControlPositionY: '坐标 y:',
stationControlZok: '中控'
};

View File

@ -23,7 +23,7 @@ export default {
dpSystem: 'Large screen',
planSystem: 'Lian classroom',
planSystem: 'Lian Plan',
replayManage: 'Playback',
@ -33,9 +33,9 @@ export default {
publishMapManage: 'Publishing map management',
productStateManage: 'Product state management',
publishLessonManage: 'Publishing lesson management',
runPlanTemplateManage: 'Template run plan management',
runPlanCommonManage: 'General run plan management',
runPlanEveryDayManage: 'Daily run plan Management',
runPlanTemplateManage: 'Template plan management',
runPlanCommonManage: 'General plan management',
runPlanEveryDayManage: 'Daily plan Management',
examRuleManage: 'Management of examination rules',
orderAuthorityManage: 'Order&Authority',

View File

@ -1,5 +1,85 @@
export default {
deviceTypeNotNull: 'Device type code cannot be empty',
operationTypeNotNull: 'Operator code cannot be empty',
tipsNotNull: 'Tips cannot be empty'
pleaseSelect: '请选择',
selectEquipment: '请选择设备',
deviceTypeNotNull: '设备类型码不能为空',
operationTypeNotNull: '操作码不能为空',
tipsNotNull: '提示信息不能为空',
pleaseSelectEncoding: '请选择唯一编码',
pleaseEnterStatusSignal: '请输入状态信号名称',
pleaseEnterXCoordinate: '请输入x坐标',
pleaseEnterYCoordinate: '请输入y坐标',
pleaseSelectLine: '请选择Line',
pleaseSelectLineType: '请选择Line类型',
pleaseSelectLineWidth: '请输入线条宽度',
linkXCoordinate: '请输入Link x坐标',
linkYCoordinate: '请输入Link y坐标',
linkEnterLength: '请输入显示长度',
linkEnterDisplayLength: '请输入真实长度',
linkSelectBase: '请选择基础Link',
linkEnterLeft: '请输入左侧正向Link',
linkEnterRight: '请输入右侧正向Link',
linkSelectName: '请输入Link名称',
linkSelectDisplayLength: '请输入Link实际长度',
lengthShow: '显示长度:',
lengthFact: '真实长度:',
color: '颜色:',
pointX: '坐标 x:',
pointY: '坐标 y:',
direct: '方向:',
basisLink: '基础Link:',
pleaseSelectSectionName: '请选择区段名称',
pleaseFillOffset: '请填写偏移量',
pleaseFillValue: '请填写数值',
pleaseSelectLeftSectionName: '请选择左侧区段名称',
pleaseSelectRightSectionName: '请选择右侧区段名称',
pleaseEnterYValue: '请输入坐标Y值',
pleaseEnterSectionType: '请输入区段类型',
pleaseEnterSectionName: '请输入区段名称',
pleaseSelectAssociatedPlatform: '请选择关联站台',
pleaseEnterLeftStopPointOffset: '请输入左向停车点偏移量',
rightStopPointOffset: '请输入右向停车点偏移量',
destinationCode: '请输入目的地码',
destinationCodePointX: '请输入目的地码坐标X',
destinationCodePointY: '请输入目的地码坐标Y',
sectionNamePointX: '请输入区段名称坐标X',
sectionNamePointY: '请输入区段名称坐标Y',
logicSectionNameSort: '请选择逻辑区段名称排序',
sectionOffsetLeft: '请输入左侧Link偏移量',
sectionSepTypeLeft: '请选择左侧分隔符',
sectionOffsetRight: '请输入右侧Link偏移量',
sectionSepTypeRight: '请选择右侧分隔符',
selectPhysicalExtentName: '请选择物理区段名称',
pleaseEnterSemaphoreName: '请输入信号灯名称',
pleaseEnterSignalName: '请输入信号机唯一名称',
pleaseEnterSignalOffset: '请输入偏移量',
pleaseEnterSignalStation: '请输入设备集中站',
pleaseEnterSignalPositionX: '请输入信号机x',
pleaseEnterSignalPositionY: '请输入信号机y',
signalButtonPositionX: '请输入按钮x',
signalButtonPositionY: '请输入按钮y',
signalGuidePositionX: '请输入引导信号x',
signalGuidePositionY: '请输入引导信号y',
stationName: '请输入车站名称',
stationKmRange: '请输入公里标距离',
stationKmPost: '请输入公里标名称',
stationPositionX: '请输入x坐标',
stationPositionY: '请输入y坐标',
stationControlStationName: '请选择车站名称',
stationControlStationCode: '请选择所属车站',
stationControlZokContent: '请输入中控内容',
stationControlZakContent: '请输入站控内容',
stationControlJjzkContent: '请输入紧急站控内容',
stationControlZzkContent: '请输入站中控内容',
stationControlPositionX: '请输入坐标x',
stationControlPositionY: '请输入坐标y'
};

View File

@ -0,0 +1,22 @@
export default {
scriptTitle: 'Task Recording',
saveMaplocation: 'Update Location',
saveBackground: 'Save Background',
saveData: 'Save Data',
roleManage: 'Role Manage',
targetCondition: 'Task Target',
taskScript: 'Task Script',
roleName: 'Role Name',
roleType: 'Role Type',
deviceCode: 'Device Code',
roleList: 'Role List',
operation: 'Operation',
roleAdd: 'Add',
delete: 'Delete',
behaviorOperate: 'Behavior Operate',
conditionTitle: 'Target condition',
deviceType: 'Device Type',
deviceCondition: 'Device Condition',
paramDeviceType: 'Param DeviceType',
paramDeviceCode: 'Param DeviceCode'
};

View File

@ -0,0 +1,8 @@
export default {
code: 'code',
name: 'name',
status: 'status',
remarks: 'remarks',
createDirectory: 'Create dictionary',
editDictionary: 'Edit dictionary'
};

26
src/i18n/langs/en/tip.js Normal file
View File

@ -0,0 +1,26 @@
export default {
confirm: '确 定',
cancel: '取 消',
creatingSuccessful: '创建成功!',
confirmDeletion: '是否确认删除?',
confirmBatchGeneration: '是否确认批量生成?',
hint: '提示',
cancelledDelete: '已取消删除',
cancelGeneration: '已取消批量生成',
updateSuccessfully: '更新成功',
updateFailed: '更新失败',
successfullyDelete: '删除成功',
failDelete: '删除失败',
cannotCoincide: '起始坐标和结束坐标不能重合',
cannotMerged: '存在非物理区段,不能合并',
linkCannotMerged: '不在同一Link上的物理区段不能合并',
selectedSectionEmpty: '选择的区段为空',
stationFont: '车站字体',
kilometerFont: '公里标字体',
meter: '米',
angle: '度'
};

View File

@ -5,5 +5,6 @@ export default {
getMapStepsFailed: '获取地图步骤数据',
resetFailed: '重置失败',
startTrainingFailed: '开始实训失败',
saveBackgroundFailed: '保存背景失败'
saveBackgroundFailed: '保存背景失败',
deleteFailed: '删除失败'
};

View File

@ -1,10 +1,14 @@
export default {
offset: '偏移',
zoom: '缩放',
tips: '提示',
confirm: '确定',
cancel: '取消',
reset: '重置',
offset: '偏 移',
zoom: '缩 放',
tips: '提 示',
reset: '重 置',
confirm: '确 定',
cancel: '取 消',
coachingModel: '教练模式',
normalMode: '正常模式'
normalMode: '正常模式',
operate: '操 作',
edit: '编 辑',
delete: '删 除',
add: '新 增'
};

View File

@ -1,15 +1,23 @@
import cnLocale from 'element-ui/lib/locale/lang/zh-CN';
import map from './map';
import global from './global';
import router from './router';
import lesson from './lesson';
import error from './error';
import rules from './rules';
import scriptRecord from './scriptRecord';
import tip from './tip';
import system from './system';
export default {
...cnLocale,
map,
global,
router,
lesson,
error,
rules
rules,
scriptRecord,
tip,
system
};

306
src/i18n/langs/zh/map.js Normal file
View File

@ -0,0 +1,306 @@
export default {
pleaseSelect: '请选择',
sketchMap: '草稿地图列表',
newConstruction: '新建',
importMap: '导入地图',
createNewMap: '新建地图',
normalCreate: '正常创建',
saveMapAs: '地图另存为',
create: '创建',
dataVerification: '数据校验',
logicalView: '逻辑视图',
physicalView: '物理视图',
mixedView: '混合视图',
normal: '正常',
save: '保存',
updata: '更新',
updateObj: '修改',
updateObjAxis: '更新坐标',
saveAs: '另存为',
publish: '发布',
deleteObj: '删除',
confirm: '确 定',
cancel: '取 消',
cancelledDelete: '已取消删除',
confirmDeletion: '是否确认删除?',
hint: '提示',
link: 'link',
section: '区段',
switch: '道岔',
signal: '信号机',
zcZoneControl: 'zc区域控制',
temporaryLimit: '全线临时限速',
lcControl: 'Lc控制',
image: '图片',
station: '车站',
controlMode: '控制模式',
platform: '站台',
counter: '计数器',
delayUnlock: '延迟解锁',
train: '列车',
trainWindow: '车次窗',
line: '线条',
text: '文字',
mapName: '地图名称:',
skinName: '皮肤风格:',
selectCity: '所属城市:',
offsetXColon: 'X偏移:',
offsetYColon: 'Y偏移:',
scalingColon: '缩放比例:',
operationUnusual: '操作异常:',
offsetX: 'X偏移',
offsetY: 'Y偏移',
scaling: '缩放比例',
statusSignalName: '状态信号名称:',
stateSignalsPlotCoordinates: '状态信号画图坐标:',
equipmentStation: '所属设备集中站:',
lineCoding: '线条编码:',
lineType: '线条类型:',
lineWidth: '线条宽度:',
segmentCoordinates: '区段显示坐标:',
publishMapCreation: '从发布地图创建',
pleaseEnterMapName: '请输入地图名称',
pleaseChooseSkinStyle: '请选择皮肤风格',
pleaseSelectMapSource: '请选择地图来源',
pleaseSelectAssociatedCity: '请选择关联城市',
pleaseSelectAssociatedSkin: '请选择关联皮肤',
pleaseEnteMapLinkWidth: '请输入地图Link宽度',
pleaseEnterMapSectionWidth: '请输入地图区段宽度',
failedLoadListPublishedMaps: '加载已发布地图列表失败',
creatingSuccessful: '创建成功!',
mapUpdateSuccessful: '更新地图成功!',
createFailure: '创建失败',
importSuccessful: '导入成功!',
importFailure: '导入失败',
updateSuccessfully: '更新成功',
updateFailed: '更新失败',
failedLoadCityList: '加载城市列表失败',
successfullyDelete: '删除成功',
failDelete: '删除失败',
dataValidationFailed: '发布失败,数据校验不通过',
releaseSuccess: '发布成功!',
abnormalOperation: '操作异常',
datQuestion: '有问题数据',
dataList: '数据列表',
saveFailed: '另存失败',
mapEditor: '地图编辑',
mapPublished: '地图发布为',
publishingAssociatedCity: '发布关联城市:',
publishMapName: '发布地图名称:',
editRoute: '编辑进路',
editRouting: '编辑交路',
editAutoRouting: '编辑自动信号',
setSwitch: '联动道岔',
pathUnit: '路径单元',
jlmap3d: '三维化编辑',
automaticSignalList: '自动信号列表',
automaticSignalCode: '自动信号编码',
signalCodeName: '信号机名称',
signalCode: '信号机code',
sectionData: '区段数据',
preview: '预览',
operation: '操作',
compile: '编辑',
delete: '删除',
empty: '清空',
sectionName: '区段名称',
sectionList: '区段列表',
automaticSignal: '自动信号',
signalID: '信号机ID:',
activate: '激活',
segmentData: '进路自动触发区段数据:',
pleaseSelectSignal: '请选择信号机',
triggerSegmentData: '请选择进路自动触发区段数据',
automaticSignalSuccessful: '创建自动信号成功!',
failedCreateSignal: '创建自动信号失败',
automaticSignalUpdateSucceeded: '更新自动信号成功!',
automaticSignalUpdateFailed: '更新自动信号失败',
stationName: '车站名称:',
property: '属性',
counterCoding: '计数器编码:',
counterName: '计数器名称:',
belongsStation: '所属车站:',
counterType: '计数器类型:',
countMax: '计数器最大值:',
pointX: '坐标 x:',
pointY: '坐标 y:',
code: '编码:',
imageName: '图片名称:',
imageWidth: '图片宽度:',
imageHeight: '图片高度:',
imagePoint: '图片坐标:',
imageZindex: '图片层级:',
imageSelect: '图片选择:',
rotateAngle: '旋转角度:',
areaSolution: '区故解',
alwaysSolution: '总人解',
pleaseSelectMap: '请选择地图',
selectCounterType: '请选择计数器类型',
selectStation: '请选择车站',
pleaseSelectDevice: '请重新选择设备',
pleaseSelectCountName: '请输入计数器名称',
pleaseCounterValue: '请输入计数器最大值',
pleaseEnterXCoordinate: '请输入x坐标',
pleaseEnterYCoordinate: '请输入y坐标',
pleaseEnterDelayTime: '请输入延时时间',
pleaseEnterFontColor: '请输入字体颜色',
pleaseEnterFontFormat: '请输入字体格式',
pleaseEnterImageWidth: '请输入图片宽度',
pleaseEnterImageHeight: '请输入图片高度',
delayUnlockingCode: '延时解锁编码:',
delayTime: '延时时间:',
font: '字体:',
color: '颜色:',
upside: '上段',
hypomere: '下段',
linkType: 'Link类型',
linkCode: 'Link编码:',
linkName: 'Link名称:',
linkDisplayLength: 'Link显示长度:',
linkActualLength: 'Link实际长度:',
linkColor: 'Link颜色:',
linkLeftFdCode: '左侧正向Link:',
linkLeftSdCode: '左侧侧向Link:',
linkRightFdCode: '右侧正向Link:',
linkRightSdCode: '右侧侧向Link:',
linkLp: 'Link 起点坐标:',
linkRp: 'Link 终点坐标:',
rulesChange: '规则修改',
sectionNameC: '区段名称:',
splitMerge: '拆分/合并',
linkSet: 'Link集合',
selectLink: '选择Link',
splitOffset: '拆分偏移量:',
split: '拆分',
merge: '合并',
logicBlock: '逻辑区段',
aux: '第',
sectionLine: '段折线',
sectionPolyline: '区段折线',
switchSection: '道岔区段',
trainDirection: '列车所在方向:',
deleteSwitchSection: '一键删除道岔区段',
createSwitchSection: '一键创建道岔区段',
sectionLogicalNumber: '逻辑区段数量',
sectionLsectioncode: '左侧区段名称:',
sectionRsectioncode: '右侧区段名称:',
associatedSection: '关联物理区段:',
blockCoding: '区段编码:',
sectionType: '区段类型:',
sectionNameColon: '区段名称:',
sectionNameOffset: '区段名称偏移量:',
leftKilometerMark: '左侧公里标(米):',
rightKilometerMark: '右侧公里标(米):',
sectionColon: '区间:',
displayExtentName: '是否显示区段名称:',
displayAxleCounter: '是否显示计轴:',
displayLogicalExtents: '是否显示逻辑区段:',
displayLogicalWxtentNames: '是否显示逻辑区段名称:',
isStandTrack: '是否站台轨:',
standTrackName: '站台轨名称:',
standTrackNamePosition: '站台轨名称偏移量:',
relStandCode: '站台编码:',
isReentryTrack: '是否折返轨:',
reentryTrackName: '折返轨名称:',
reentryTrackNamePosition: '折返轨名称偏移量:',
isTransferTrack: '是否转换轨:',
transferTrackName: '转换轨名称:',
transferTrackNamePosition: '转换轨名称偏移量:',
destinationCode: '目的地码:',
destinationCodePoint: '目的地码坐标:',
destinationCodeShow: '是否显示目的地码:',
leftStopPointOffset: '左向停车点偏移量:',
rightStopPointOffset: '右向停车点偏移量:',
isSwitchSection: '是否道岔区段:',
relSwitchCode: '关联道岔Code:',
logicSectionNameSort: '逻辑区段排序:',
fromSmallToLarge: '从小到大',
fromLargeToSmall: '从大到小',
relevanceLinkCode: '关联的Link:',
sepTypeLeft: '左侧分隔符类型:',
sectionOffsetLeft: '左侧Link偏移量:',
sepTypeRight: '右侧分隔符类型:',
sectionOffsetRight: '右侧Link偏移量:',
isSegmentation: '是否分割:',
segmentationPosition: '默认背景:',
isCurve: '是否曲线:',
sectionPoints: '区段显示坐标:',
trainPosType: '列车所在方向:',
physicalSegmentName: '物理区段名称:',
directionType: '形式方向:',
leftOrRight: '左右位置:',
positionType: '上下位置:',
signalFilamentAlarm: '灯丝报警',
signalCodeColon: '信号机编码:',
signalNameColon: '信号机名称:',
signalUniqueName: '信号机唯一名称:',
signalDisplayName: '是否显示信号机名称:',
lampPostType: '灯柱类型:',
lampPositionType: '灯位类型:',
signalUseType: '用途类型:',
potLampType: '点灯类型:',
signalDirectionType: '方向类型:',
signalPositionType: '信号机位置类型:',
signalOffset: '偏移量:',
signalPositionX: '信号机x:',
signalPositionY: '信号机y:',
signalRotate: '旋转角度:',
signalNamePositionX: '信号机名字偏移量 x:',
signalNamePositionY: '信号机名字偏移量 y:',
signalButtonShow: '是否显示按钮:',
signalButtonPositionX: '按钮x:',
signalButtonPositionY: '按钮y:',
signalGuideShow: '是否显示引导信号灯:',
signalGuidePositionX: '引导信号x:',
signalGuidePositionY: '引导信号y:',
concentrateStationCode: '所属联锁站编码:',
stationCode: '车站编码:',
zcCode: '所属zc区域编码:',
centralized: '是否集中站:',
stationNameColon: '车站名称:',
stationRunPlanName: '真实名称:',
stationVisible: '是否显示:',
stationNameFont: '车站字体:',
stationNameFontColor: '车站字体颜色:',
stationKmPostShow: '是否显示公里标名称:',
stationKmRange: '公里标距离:',
stationKmPost: '公里标名称:',
stationKmPostFont: '公里标字体:',
stationKmPostFontColor: '公里标字体颜色:',
stationPositionX: 'x坐标:',
stationPositionY: 'y坐标:',
stationControlCode: '控制模式编码:',
stationControlName: '控制模式名称:',
zokContent: '中控内容:',
zakContent: '站控内容:',
jjzkContent: '紧急站控/总报警内容:',
zzkContent: '站中控内容:',
stationControlPositionX: '坐标 x:',
stationControlPositionY: '坐标 y:',
stationControlZok: '中控'
};

View File

@ -23,7 +23,7 @@ export default {
dpSystem: '大屏系统',
planSystem: '涟课堂',
planSystem: '琏计划',
replayManage: '回放管理',
@ -32,6 +32,7 @@ export default {
pulishManage: '发布内容管理',
publishMapManage: '发布地图管理',
productStateManage: '产品状态管理',
publishLessonManage: '发布课程管理',
runPlanTemplateManage: '模板运行图管理',
runPlanCommonManage: '通用运行图管理',
runPlanEveryDayManage: '每日运行图管理',

View File

@ -1,5 +1,85 @@
export default {
pleaseSelect: '请选择',
selectEquipment: '请选择设备',
deviceTypeNotNull: '设备类型码不能为空',
operationTypeNotNull: '操作码不能为空',
tipsNotNull: '提示信息不能为空'
tipsNotNull: '提示信息不能为空',
pleaseSelectEncoding: '请选择唯一编码',
pleaseEnterStatusSignal: '请输入状态信号名称',
pleaseEnterXCoordinate: '请输入x坐标',
pleaseEnterYCoordinate: '请输入y坐标',
pleaseSelectLine: '请选择Line',
pleaseSelectLineType: '请选择Line类型',
pleaseSelectLineWidth: '请输入线条宽度',
linkXCoordinate: '请输入Link x坐标',
linkYCoordinate: '请输入Link y坐标',
linkEnterLength: '请输入显示长度',
linkEnterDisplayLength: '请输入真实长度',
linkSelectBase: '请选择基础Link',
linkEnterLeft: '请输入左侧正向Link',
linkEnterRight: '请输入右侧正向Link',
linkSelectName: '请输入Link名称',
linkSelectDisplayLength: '请输入Link实际长度',
lengthShow: '显示长度:',
lengthFact: '真实长度:',
color: '颜色:',
pointX: '坐标 x:',
pointY: '坐标 y:',
direct: '方向:',
basisLink: '基础Link:',
pleaseSelectSectionName: '请选择区段名称',
pleaseFillOffset: '请填写偏移量',
pleaseFillValue: '请填写数值',
pleaseSelectLeftSectionName: '请选择左侧区段名称',
pleaseSelectRightSectionName: '请选择右侧区段名称',
pleaseEnterYValue: '请输入坐标Y值',
pleaseEnterSectionType: '请输入区段类型',
pleaseEnterSectionName: '请输入区段名称',
pleaseSelectAssociatedPlatform: '请选择关联站台',
pleaseEnterLeftStopPointOffset: '请输入左向停车点偏移量',
rightStopPointOffset: '请输入右向停车点偏移量',
destinationCode: '请输入目的地码',
destinationCodePointX: '请输入目的地码坐标X',
destinationCodePointY: '请输入目的地码坐标Y',
sectionNamePointX: '请输入区段名称坐标X',
sectionNamePointY: '请输入区段名称坐标Y',
logicSectionNameSort: '请选择逻辑区段名称排序',
sectionOffsetLeft: '请输入左侧Link偏移量',
sectionSepTypeLeft: '请选择左侧分隔符',
sectionOffsetRight: '请输入右侧Link偏移量',
sectionSepTypeRight: '请选择右侧分隔符',
selectPhysicalExtentName: '请选择物理区段名称',
pleaseEnterSemaphoreName: '请输入信号灯名称',
pleaseEnterSignalName: '请输入信号机唯一名称',
pleaseEnterSignalOffset: '请输入偏移量',
pleaseEnterSignalStation: '请输入设备集中站',
pleaseEnterSignalPositionX: '请输入信号机x',
pleaseEnterSignalPositionY: '请输入信号机y',
signalButtonPositionX: '请输入按钮x',
signalButtonPositionY: '请输入按钮y',
signalGuidePositionX: '请输入引导信号x',
signalGuidePositionY: '请输入引导信号y',
stationName: '请输入车站名称',
stationKmRange: '请输入公里标距离',
stationKmPost: '请输入公里标名称',
stationPositionX: '请输入x坐标',
stationPositionY: '请输入y坐标',
stationControlStationName: '请选择车站名称',
stationControlStationCode: '请选择所属车站',
stationControlZokContent: '请输入中控内容',
stationControlZakContent: '请输入站控内容',
stationControlJjzkContent: '请输入紧急站控内容',
stationControlZzkContent: '请输入站中控内容',
stationControlPositionX: '请输入坐标x',
stationControlPositionY: '请输入坐标y'
};

View File

@ -0,0 +1,22 @@
export default {
scriptTitle: '任务录制',
saveMaplocation: '更新定位',
saveBackground: '保存背景',
saveData: '保存数据',
roleManage: '角色管理',
targetCondition: '任务目标',
taskScript: '任务剧本',
roleName: '角色名称',
roleType: '角色类型',
deviceCode: '设备编码',
roleList: '角色列表',
operation: '操作',
roleAdd: '添加',
delete: '删除',
behaviorOperate: '行为操作',
conditionTitle: '目标条件',
deviceType: '设备类型',
deviceCondition: '设备条件',
paramDeviceType: '参数设备类型',
paramDeviceCode: '参数设备编号'
};

View File

@ -0,0 +1,8 @@
export default {
code: '编码',
name: '名称',
status: '状态',
remarks: '备注',
createDirectory: '创建目录',
editDictionary: '编辑目录'
};

26
src/i18n/langs/zh/tip.js Normal file
View File

@ -0,0 +1,26 @@
export default {
confirm: '确 定',
cancel: '取 消',
creatingSuccessful: '创建成功!',
confirmDeletion: '是否确认删除?',
confirmBatchGeneration: '是否确认批量生成?',
hint: '提示',
cancelledDelete: '已取消删除',
cancelGeneration: '已取消批量生成',
updateSuccessfully: '更新成功',
updateFailed: '更新失败',
successfullyDelete: '删除成功',
failDelete: '删除失败',
cannotCoincide: '起始坐标和结束坐标不能重合',
cannotMerged: '存在非物理区段,不能合并',
linkCannotMerged: '不在同一Link上的物理区段不能合并',
selectedSectionEmpty: '选择的区段为空',
stationFont: '车站字体',
kilometerFont: '公里标字体',
meter: '米',
angle: '度'
};

View File

@ -456,7 +456,12 @@ class SkinStyle extends defaultStyle {
fontFamily: 'consolas', // 默认字体 族类
haveTextHSDA: true, // 是否需创建textHSDA对象
haveArrowText: true, // 是否需创建arrowText对象
haveTrainBorder: false// 是否需创建trainBorder对象
haveTrainBorder: false, // 是否需创建trainBorder对象
aspectRatio: 7/5, // 字体宽高比例用以拼接text是计算位置
textOffset: 4, // 字体偏移(用以控制字体据车头的距离)
trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸
useSelfFormat: true, // 使用配置项的nameFormat
useSelfText: true // 使用配置项的字体大小
},
trainStatusStyle: {
destinationStatus: [

View File

@ -422,7 +422,12 @@ class SkinStyle extends defaultStyle {
fontFamily: 'consolas', // 默认字体 族类
haveTextHSDA: true, // 是否需创建textHSDA对象
haveArrowText: true, // 是否需创建arrowText对象
haveTrainBorder: false // 是否需创建trainBorder对象
haveTrainBorder: false, // 是否需创建trainBorder对象
aspectRatio: 7/5, // 字体宽高比例用以拼接text是计算位置
textOffset: 4, // 字体偏移(用以控制字体据车头的距离)
trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸
useSelfFormat: true, // 使用配置项的nameFormat
useSelfText: true // 使用配置项的字体大小
},
trainStatusStyle: {
defaultDestinationColor: '#FFFFFF', // 默认目的地状态显示颜色

View File

@ -419,7 +419,12 @@ class SkinStyle extends defaultStyle {
fontFamily: 'consolas', // 默认字体 族类
haveTextHSDA: true, // 是否需创建textHSDA对象
haveArrowText: true, // 是否需创建arrowText对象
haveTrainBorder: false // 是否需创建trainBorder对象
haveTrainBorder: false, // 是否需创建trainBorder对象
aspectRatio: 7/5, // 字体宽高比例用以拼接text是计算位置
textOffset: 4, // 字体偏移(用以控制字体据车头的距离)
trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸
useSelfFormat: true, // 使用配置项的nameFormat
useSelfText: true // 使用配置项的字体大小
},
trainStatusStyle: {
defaultDestinationColor: '#FFFFFF', // 默认目的地状态显示颜色

View File

@ -370,7 +370,10 @@ class SkinStyle extends defaultStyle {
nameFontSize: 15, // 字体大小
haveTextHSDA: false, // 是否需创建textHSDA对象
haveArrowText: true, // 是否需创建arrowText对象
haveTrainBorder: false// 是否需创建trainBorder对象
haveTrainBorder: false, // 是否需创建trainBorder对象
aspectRatio: 8/15, // 字体宽高比例用以拼接text是计算位置
textOffset: 1, // 字体偏移(用以控制字体据车头的距离)
trainWidthMoreText: 2 // 计算列车长度时--列车长比text多出尺寸
},
trainStatusStyle: {
destinationStatus: [

View File

@ -7,7 +7,7 @@ import MouseController from './mouseController';
import deviceState from './constant/deviceState';
import deviceType from './constant/deviceType';
import { selectSkinStyle } from './config/deviceStyle';
import { parser, deviceFactory, createBoundingRect, calculateDCenter } from './utils/parser';
import { deviceFactory, createBoundingRect, calculateDCenter } from './utils/parser';
const renderer = 'canvas';
const devicePixelRatio = 1;
@ -76,7 +76,7 @@ class Jlmap {
return defaultStateDict;
}
setMap(map) {
setMap(map, mapDevice) {
// 保存皮肤类型
if (map.skinVO) {
this.skinStyle = map.skinVO.code;
@ -85,12 +85,12 @@ class Jlmap {
// 保存原始数据
this.data = map;
// 解析地图数据
this.mapDevice = mapDevice;
// 加载对应皮肤
this.style = this.loadStyle(this.skinStyle);
// 解析地图数据
this.mapDevice = parser(map, this);
// 数据加载完成 回调
if (this.methods.dataLoaded instanceof Function) { this.methods.dataLoaded(this.mapDevice); }

View File

@ -11,6 +11,7 @@ export default class TrainBody extends Group {
super();
this.model = model;
this.deviceModel = model.model;
this.nameFormat = model.nameFormat;
this.create();
this.createMouse(); // 鼠标事件
}
@ -158,7 +159,7 @@ export default class TrainBody extends Group {
style.Train.trainBody.specialTrainType.some((item) =>{
if (model.type === item.type) {
serviceNumber = item.serviceNumber;
style.Train.trainBody.nameFormat = item.nameFormat;
this.nameFormat = item.nameFormat;
return true;
}
});
@ -213,20 +214,25 @@ export default class TrainBody extends Group {
this.trainBodyBox && this.trainBodyBox.setColor(key, color);
}
formatChangePosition(model, style) {
if (style.Train.trainBody.trainNameFormat) {
const arr = style.Train.trainBody.trainNameFormat.split(':');
if (this.nameFormat) {
const arr = this.nameFormat.split(':');
let fontNumber = 0;
arr.forEach(ele => {
if (ele == 'targetCode') {
this.textTrainNumber.setStyle('x', parseInt(model.point.x + style.Train.trainNumber.trainNumberOffset.x));
this.textTrainNumber.setStyle('x', parseInt(model.point.x + fontNumber * model.fontSize * style.Train.common.aspectRatio + style.Train.common.textOffset) );
fontNumber += (style.Train.trainNumber.targetCodePrefix || '').length;
this.add(this.textTrainNumber);
} else if (ele == 'serviceNumber') {
this.textTrainServer.setStyle('x', parseInt(model.point.x + style.Train.trainServer.trainServerOffset.x));
this.textTrainServer.setStyle('x', parseInt(model.point.x + fontNumber * model.fontSize * style.Train.common.aspectRatio + style.Train.common.textOffset));
fontNumber += (style.Train.trainServer.serviceNumberPrefix || '').length;
this.add(this.textTrainServer);
} else if (ele == 'tripNumber') {
this.textTrainTarget.setStyle('x', parseInt(model.point.x + style.Train.trainTarget.trainTargetOffset.x));
this.textTrainTarget.setStyle('x', parseInt(model.point.x + fontNumber * model.fontSize * style.Train.common.aspectRatio + style.Train.common.textOffset));
fontNumber += (style.Train.trainTarget.tripNumberPrefix || '').length;
this.add(this.textTrainTarget);
} else if (ele == 'groupNumber') {
this.textTrainTargetNumber.setStyle('x', parseInt(model.point.x + style.Train.textTrainTargetNumber.trainTargetNumberOffset.x));
this.textTrainTargetNumber.setStyle('x', parseInt(model.point.x + fontNumber * model.fontSize * style.Train.common.aspectRatio + style.Train.common.textOffset));
fontNumber += (style.Train.trainTargetNumber.groupNumberPrefix || '').length;
this.add(this.textTrainTargetNumber);
}
});

View File

@ -28,6 +28,6 @@ export default class TrainBodyBox extends Group {
this.add(this.trainBodyBox);
}
setColor(key, color) {
this.train.setStyle(key, color);
this.trainBodyBox.setStyle(key, color);
}
}

View File

@ -16,8 +16,9 @@ export default class Train extends Group {
this.z = 40;
this.size = 0;
this.section = null;
this.fontSize = style.Train.common.nameFontSize || style.Train.common.trainTextFontSize;
this.fontSize = style.Train.common.useSelfText?style.Train.common.nameFontSize || style.Train.common.trainTextFontSize:model.nameFontSize || style.Train.common.nameFontSize || style.Train.common.trainTextFontSize;
this.newScale = this.fontSize / style.Train.common.trainTextFontSize;
this.nameFormat = style.Train.common.useSelfFormat?style.Train.trainBody.trainNameFormat:model.nameFormat || style.Train.trainBody.trainNameFormat;
this.create();
this.setState(model);
}
@ -68,6 +69,7 @@ export default class Train extends Group {
runControlStatus: model.runControlStatus,
runStatus: model.runStatus,
fontSize: this.fontSize,
nameFormat: this.nameFormat,
type: model.type,
speed: model.speed,
maLen: model.maLen,
@ -290,24 +292,24 @@ export default class Train extends Group {
// 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
isChangeTrainWidth(model, style) {
if (!style.Train.trainBody.changeTrainWidth) { return; }
if (style.Train.trainBody.trainNameFormat) {
const arr = style.Train.trainBody.trainNameFormat.split(':');
if (this.nameFormat) {
const arr = this.nameFormat.split(':');
arr.forEach(ele => {
switch (ele) {
case 'targetCode': {
this.size += style.Train.trainNumber.targetCodePrefix.length || 0;
this.size += (style.Train.trainNumber.targetCodePrefix || '').length;
break;
}
case 'serviceNumber': {
this.size += style.Train.trainServer.serviceNumberPrefix.length || 0;
this.size += (style.Train.trainServer.serviceNumberPrefix || '').length;
break;
}
case 'tripNumber': {
this.size += style.Train.trainTarget.tripNumberPrefix.length || 0;
this.size += (style.Train.trainTarget.tripNumberPrefix || '').length;
break;
}
case 'groupNumber': {
this.size += style.Train.trainTargetNumber.groupNumberPrefix.length || 0;
this.size += (style.Train.trainTargetNumber.groupNumberPrefix || '').length;
break;
}
}
@ -315,7 +317,7 @@ export default class Train extends Group {
} else {
this.size = 9;
}
this.style.Train.common.trainWidth = this.size * this.fontSize * (2 / 3) -16;
this.style.Train.common.trainWidth = this.size * this.fontSize * this.style.Train.common.aspectRatio + this.style.Train.common.trainWidthMoreText;
}
removeTrainDetail() {
this.trainB && this.trainB.removeTrainDetail();

View File

@ -750,7 +750,9 @@ export default {
},
initMenu(menu) {
this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.training.prdType]], this.$store.state.training.operatemode);
if (this.menu[2]){
this.menu[2].children = this.initStationList();
}
this.clickEvent();
this.closeMenu(true);
},

View File

@ -74,21 +74,21 @@ export default {
};
},
initMenu() {
// this.menuNormal = [];
this.menuNormal = [];
// this.stationList.forEach(station => {
// if (station.code === station.concentrateStationCode) {
// let node = {
// label: station.name,
// children: []
// }
//
// this.stationList.forEach(elem => {
// if (elem.visible) {
// let next = elem;
// while (next.code != next.concentrateStationCode || !next.concentrateStationCode) {
// next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode);
// }
//
// if (station.code == next.code) {
// node.children.push({
// code: elem.code,
@ -98,11 +98,10 @@ export default {
// }
// }
// })
//
// this.menuNormal.push(node);
// }
// });
if (this.isScreen) {
this.menu = [...this.menuScreen];
}

View File

@ -2,27 +2,32 @@
<div v-if="show">
<template v-if="maxmini">
<div class="nav">
<div class="cls-status" @click="touch('Close')" v-show="config.showClose"><span></span></div>
<div class="min-status" @click="touch('Minim')"><span></span></div>
<div v-show="config.showClose" class="cls-status" @click="touch('Close')"><span /></div>
<div class="min-status" @click="touch('Minim')"><span /></div>
</div>
<el-table ref="table" :data="config.data" :highlight-current-row="config.highlightCurrentRow"
@current-change="handleChange" :height="height" border>
<template v-for="item in config.columns">
<el-table-column :prop="item.prop" :label="item.label" :width="item.width">
</el-table-column>
<el-table
ref="table"
:data="config.data"
:highlight-current-row="config.highlightCurrentRow"
:height="height"
border
@current-change="handleChange"
>
<template v-for="(item,index) in config.columns">
<el-table-column :key="index" :prop="item.prop" :label="item.label" :width="item.width" />
</template>
</el-table>
</template>
<template v-else>
<div class="nav">
<div class=" max-status" @click="touch('Maxim')"><span></span></div>
<div class=" max-status" @click="touch('Maxim')"><span /></div>
</div>
</template>
</div>
</template>
<script>
export default {
export default {
name: 'DataTable',
props: {
height: {
@ -31,7 +36,7 @@
},
config: {
type: Object,
required: true,
required: true
}
},
data() {
@ -43,7 +48,7 @@
'Minim': [true, false],
'Maxim': [true, true]
}
}
};
},
methods: {
handleChange(row) {
@ -58,13 +63,13 @@
this.$nextTick(() => {
[this.show, this.maxmini] = this.touchStrategy[operate];
this.$emit('touch', this.maxmini);
})
}
});
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss" scoped>
<style scoped rel="stylesheet/scss" lang="scss" >
@import "src/styles/mixin.scss";
$height: 20px;
$width: 20px;
@ -85,7 +90,6 @@
line-height: $height;
}
/deep/ {
.el-table--border th.gutter {
background: #EBEADB !important;
@ -119,7 +123,6 @@
font-size: smaller !important;
}
}
.current-row>td {
@ -143,7 +146,7 @@
width: 2px;
height: 12px;
vertical-align: middle;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
span::after {
@ -152,7 +155,7 @@
background: black;
width: 2px;
height: 12px;
-webkit-transform: rotate(-90deg);
transform: rotate(-90deg);
}
}
@ -170,7 +173,7 @@
width: 2px;
height: 12px;
vertical-align: middle;
-webkit-transform: rotate(-90deg);
transform: rotate(-90deg);
}
}
@ -187,7 +190,7 @@
background: black;
width: 2px;
height: 12px;
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
span::after {
@ -196,7 +199,7 @@
background: black;
width: 2px;
height: 12px;
-webkit-transform: rotate(90deg);
transform: rotate(90deg);
}
}
}

View File

@ -1,20 +1,25 @@
<template>
<el-dialog class="beijing-01__schedule edit-planning-train" :title="title" :visible.sync="dialogShow" width="800px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
v-dialogDrag
class="beijing-01__schedule edit-planning-train"
:title="title"
:visible.sync="dialogShow"
width="800px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :offset="10">列车线路</el-col>
</el-row>
<el-row>
<el-col :span="17">
<el-table :data="serviceData" border style="width: 100%" height="160">
<el-table-column prop="startStationCode" label="起点站">
</el-table-column>
<el-table-column prop="startStationStandCode" label="起点站台">
</el-table-column>
<el-table-column prop="endStationCode" label="终点站">
</el-table-column>
<el-table-column prop="endStationStandCode" label="终点站台">
</el-table-column>
<el-table-column prop="startStationCode" label="起点站" />
<el-table-column prop="startStationStandCode" label="起点站台" />
<el-table-column prop="endStationCode" label="终点站" />
<el-table-column prop="endStationStandCode" label="终点站台" />
</el-table>
</el-col>
<el-col :span="6" :offset="1">
@ -39,23 +44,23 @@
</el-row>
<el-row class="view-box">
<el-col :span="9" style="padding-left: 10px">
<el-input v-model="oldServiceNumber" size="small" :disabled="true"></el-input>
<el-input v-model="oldServiceNumber" size="small" :disabled="true" />
</el-col>
<el-col :span="9" style="padding-left: 20px">
<el-input v-model="newServiceNumber" size="small"></el-input>
<el-input v-model="newServiceNumber" size="small" />
</el-col>
<el-col :span="5" style="padding-left: 20px">
<el-button @click="handleModifyingTripNumber" style="width: 150px;">改车次号</el-button>
<el-button style="width: 150px;" @click="handleModifyingTripNumber">改车次号</el-button>
</el-col>
</el-row>
<el-row style="margin-top: 10px">
<el-col :span="4"><span class="view-label">线路开始时间</span></el-col>
<el-col :span="8">
<el-time-select v-model="serviceStartTime" size="small"></el-time-select>
<el-time-select v-model="serviceStartTime" size="small" />
</el-col>
<el-col :span="4"><span class="view-label">线路结束时间</span></el-col>
<el-col :span="8">
<el-time-select v-model="serviceEndTime" size="small"></el-time-select>
<el-time-select v-model="serviceEndTime" size="small" />
</el-col>
</el-row>
<el-row style="margin-top: 20px">
@ -63,16 +68,11 @@
</el-row>
<el-row>
<el-table :data="tripData" border style="width: 100%" height="200">
<el-table-column prop="arriveTime" label="到站时间">
</el-table-column>
<el-table-column prop="stationCode" label="车站">
</el-table-column>
<el-table-column prop="stationStandCode" label="站台">
</el-table-column>
<el-table-column prop="stopTime" label="停站时间">
</el-table-column>
<el-table-column prop="level" label="运行等级">
</el-table-column>
<el-table-column prop="arriveTime" label="到站时间" />
<el-table-column prop="stationCode" label="车站" />
<el-table-column prop="stationStandCode" label="站台" />
<el-table-column prop="stopTime" label="停站时间" />
<el-table-column prop="level" label="运行等级" />
</el-table>
</el-row>
<el-row style="margin-top: 20px">
@ -86,10 +86,10 @@
</template>
<script>
import { formatTime, formatName } from '@/utils/runPlan';
import { formatTime, formatName } from '@/utils/runPlan';
export default {
name: 'modifyingPlan',
export default {
name: 'ModifyingPlan',
data() {
return {
dialogShow: false,
@ -101,12 +101,12 @@
serviceStartTime: '',
serviceEndTime: '',
serviceData: [],
tripData: [],
}
tripData: []
};
},
computed: {
title() {
return '修改'
return '修改';
}
},
mounted() {
@ -127,26 +127,26 @@
},
//
handleAddTask() {
this.$emit('dispatchDialog', { name: 'addTask', params: {} })
this.$emit('dispatchDialog', { name: 'addTask', params: {} });
},
//
handleReplace() {
this.$emit('dispatchDialog', { name: 'modifyingTask', params: {} })
this.$emit('dispatchDialog', { name: 'modifyingTask', params: {} });
},
//
handleDeleteTask() {
this.$emit('dispatchDialog', { name: 'deleteTask', params: {} })
this.$emit('dispatchDialog', { name: 'deleteTask', params: {} });
},
//
handleModifyingTripNumber() {
this.$emit('dispatchDialog', { name: 'modifyingTripNumber', params: {} })
this.$emit('dispatchDialog', { name: 'modifyingTripNumber', params: {} });
},
//
handleCommit() {
this.doClose();
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
@ -157,13 +157,11 @@
margin-left: 0px;
}
.view-label {
height: 32px;
line-height: 32px;
}
.view-box {
padding: 10px 0px;
border: 1px inset gray;

View File

@ -223,14 +223,14 @@ export default {
'$store.state.runPlan.planSizeCount': function () {
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
},
'$store.state.runPlan.select.serviceNumber': function (val) {
'$store.state.runPlan.selected.serviceNumber': function (val) {
const index = this.serviceNumberConfig.data.findIndex(elem => {
return elem.serviceNumber == val;
});
this.$refs.serviceTable.setCurrentRow(this.serviceNumberConfig.data[index]);
},
'$store.state.runPlan.select.tripNumber': function (val) {
'$store.state.runPlan.selected.tripNumber': function (val) {
const index = this.tripNumberConfig.data.findIndex(elem => {
return elem.tripNumber == val;
});

View File

@ -1,23 +1,30 @@
<template>
<data-table id="PlanStatusBar" ref="dataTable" :height="height-11" :config="stationListConfig" :close="false"
:style="{top: maxmini? maxTop-110+'px':maxTop-21+'px'}" @touch="touch"></data-table>
<data-table
id="PlanStatusBar"
ref="dataTable"
:height="height-11"
:config="stationListConfig"
:close="false"
:style="{top: maxmini? maxTop-110+'px':maxTop-21+'px'}"
@touch="touch"
/>
</template>
<script>
import DataTable from '../menusPlan/components/dataTable';
import { formatTime, formatName } from '@/utils/runPlan';
import DataTable from '../menusPlan/components/dataTable';
import { formatTime, formatName } from '@/utils/runPlan';
export default {
export default {
name: 'PlanStatusBar',
components: {
DataTable
},
props: {
maxTop: {
type: Number,
required: true
}
},
components: {
DataTable
},
data() {
return {
maxmini: true,
@ -34,15 +41,15 @@
},
{
prop: 'startTime',
label: '到点',
label: '到点'
},
{
prop: 'stopTime',
label: '停站时间',
label: '停站时间'
},
{
prop: 'endTime',
label: '发点',
label: '发点'
},
{
prop: 'level',
@ -51,27 +58,27 @@
}
]
}
}
};
},
watch: {
'$store.state.runPlan.select': function (select) {
'$store.state.runPlan.selected': function (select) {
this.stationListConfig.data = [];
let serviceObj = this.$store.state.runPlan.editData[select.serviceNumber];
const serviceObj = this.$store.state.runPlan.editData[select.serviceNumber];
if (serviceObj) {
let trainMap = serviceObj.trainMap;
const trainMap = serviceObj.trainMap;
if (trainMap) {
let trainObj = trainMap[select.tripNumber];
const trainObj = trainMap[select.tripNumber];
if (trainObj) {
let stationTimeList = trainObj.stationTimeList;
const stationTimeList = trainObj.stationTimeList;
if (stationTimeList && stationTimeList.length) {
stationTimeList.forEach((elem, index) => {
let stationObj = {
const stationObj = {
stationName: formatName(elem.stationCode),
startTime: formatTime(index == 0 ? null : stationTimeList[index - 1].secondTime),
stopTime: formatTime(index == 0 ? null : elem.secondTime - stationTimeList[index - 1].secondTime),
endTime: formatTime(elem.secondTime),
level: ''
}
};
this.stationListConfig.data.push(stationObj);
});
}
@ -86,10 +93,10 @@
this.$emit('setPosition');
}
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss" scoped>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
#PlanStatusBar {

View File

@ -76,21 +76,21 @@ export default {
};
},
initMenu() {
// this.menuNormal = [];
this.menuNormal = [];
// this.stationList.forEach(station => {
// if (station.code === station.concentrateStationCode) {
// let node = {
// label: station.name,
// children: []
// }
//
// this.stationList.forEach(elem => {
// if (elem.visible) {
// let next = elem;
// while (next.code != next.concentrateStationCode || !next.concentrateStationCode) {
// next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode);
// }
//
// if (station.code == next.code) {
// node.children.push({
// code: elem.code,
@ -100,7 +100,7 @@ export default {
// }
// }
// })
//
// this.menuNormal.push(node);
// }
// });

View File

@ -2,27 +2,32 @@
<div v-if="show">
<template v-if="maxmini">
<div class="nav">
<div class="cls-status" @click="touch('Close')" v-show="config.showClose"><span></span></div>
<div class="min-status" @click="touch('Minim')"><span></span></div>
<div v-show="config.showClose" class="cls-status" @click="touch('Close')"><span /></div>
<div class="min-status" @click="touch('Minim')"><span /></div>
</div>
<el-table ref="table" :data="config.data" :highlight-current-row="config.highlightCurrentRow"
@current-change="handleChange" :height="height" border>
<template v-for="item in config.columns">
<el-table-column :prop="item.prop" :label="item.label" :width="item.width">
</el-table-column>
<el-table
ref="table"
:data="config.data"
:highlight-current-row="config.highlightCurrentRow"
:height="height"
border
@current-change="handleChange"
>
<template v-for="(item,index) in config.columns">
<el-table-column :key="index" :prop="item.prop" :label="item.label" :width="item.width" />
</template>
</el-table>
</template>
<template v-else>
<div class="nav">
<div class=" max-status" @click="touch('Maxim')"><span></span></div>
<div class=" max-status" @click="touch('Maxim')"><span /></div>
</div>
</template>
</div>
</template>
<script>
export default {
export default {
name: 'DataTable',
props: {
height: {
@ -31,7 +36,7 @@
},
config: {
type: Object,
required: true,
required: true
}
},
data() {
@ -43,7 +48,7 @@
'Minim': [true, false],
'Maxim': [true, true]
}
}
};
},
methods: {
handleChange(row) {
@ -58,13 +63,13 @@
this.$nextTick(() => {
[this.show, this.maxmini] = this.touchStrategy[operate];
this.$emit('touch', this.maxmini);
})
}
});
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss" scoped>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
$height: 20px;
$width: 20px;
@ -85,7 +90,6 @@
line-height: $height;
}
/deep/ {
.el-table--border th.gutter {
background: #EBEADB !important;
@ -119,7 +123,6 @@
font-size: smaller !important;
}
}
.current-row>td {
@ -143,7 +146,7 @@
width: 2px;
height: 12px;
vertical-align: middle;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
span::after {
@ -152,7 +155,7 @@
background: black;
width: 2px;
height: 12px;
-webkit-transform: rotate(-90deg);
transform: rotate(-90deg);
}
}
@ -170,7 +173,7 @@
width: 2px;
height: 12px;
vertical-align: middle;
-webkit-transform: rotate(-90deg);
transform: rotate(-90deg);
}
}
@ -187,7 +190,7 @@
background: black;
width: 2px;
height: 12px;
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
span::after {
@ -196,7 +199,7 @@
background: black;
width: 2px;
height: 12px;
-webkit-transform: rotate(90deg);
transform: rotate(90deg);
}
}
}

View File

@ -208,14 +208,14 @@
'$store.state.runPlan.planSizeCount': function () {
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
},
'$store.state.runPlan.select.serviceNumber': function (val) {
'$store.state.runPlan.selected.serviceNumber': function (val) {
let index = this.serviceNumberConfig.data.findIndex(elem => {
return elem.serviceNumber == val;
})
this.$refs.serviceTable.setCurrentRow(this.serviceNumberConfig.data[index]);
},
'$store.state.runPlan.select.tripNumber': function (val) {
'$store.state.runPlan.selected.tripNumber': function (val) {
let index = this.tripNumberConfig.data.findIndex(elem => {
return elem.tripNumber == val;
})

View File

@ -54,7 +54,7 @@
}
},
watch: {
'$store.state.runPlan.select': function (select) {
'$store.state.runPlan.selected': function (select) {
this.stationListConfig.data = [];
let serviceObj = this.$store.state.runPlan.editData[select.serviceNumber];
if (serviceObj) {

View File

@ -2,27 +2,32 @@
<div v-if="show">
<template v-if="maxmini">
<div class="nav">
<div class="cls-status" @click="touch('Close')" v-show="config.showClose"><span></span></div>
<div class="min-status" @click="touch('Minim')"><span></span></div>
<div v-show="config.showClose" class="cls-status" @click="touch('Close')"><span /></div>
<div class="min-status" @click="touch('Minim')"><span /></div>
</div>
<el-table ref="table" :data="config.data" :highlight-current-row="config.highlightCurrentRow"
@current-change="handleChange" :height="height" border>
<template v-for="item in config.columns">
<el-table-column :prop="item.prop" :label="item.label" :width="item.width">
</el-table-column>
<el-table
ref="table"
:data="config.data"
:highlight-current-row="config.highlightCurrentRow"
:height="height"
border
@current-change="handleChange"
>
<template v-for="(item,index) in config.columns">
<el-table-column :key="index" :prop="item.prop" :label="item.label" :width="item.width" />
</template>
</el-table>
</template>
<template v-else>
<div class="nav">
<div class=" max-status" @click="touch('Maxim')"><span></span></div>
<div class=" max-status" @click="touch('Maxim')"><span /></div>
</div>
</template>
</div>
</template>
<script>
export default {
export default {
name: 'DataTable',
props: {
height: {
@ -31,7 +36,7 @@
},
config: {
type: Object,
required: true,
required: true
}
},
data() {
@ -43,7 +48,7 @@
'Minim': [true, false],
'Maxim': [true, true]
}
}
};
},
methods: {
handleChange(row) {
@ -58,13 +63,13 @@
this.$nextTick(() => {
[this.show, this.maxmini] = this.touchStrategy[operate];
this.$emit('touch', this.maxmini);
})
}
});
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss" scoped>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
$height: 20px;
$width: 20px;
@ -85,7 +90,6 @@
line-height: $height;
}
/deep/ {
.el-table--border th.gutter {
background: #EBEADB !important;
@ -119,7 +123,6 @@
font-size: smaller !important;
}
}
.current-row>td {
@ -143,7 +146,7 @@
width: 2px;
height: 12px;
vertical-align: middle;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
span::after {
@ -152,7 +155,7 @@
background: black;
width: 2px;
height: 12px;
-webkit-transform: rotate(-90deg);
transform: rotate(-90deg);
}
}
@ -170,7 +173,7 @@
width: 2px;
height: 12px;
vertical-align: middle;
-webkit-transform: rotate(-90deg);
transform: rotate(-90deg);
}
}
@ -187,7 +190,7 @@
background: black;
width: 2px;
height: 12px;
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
span::after {
@ -196,7 +199,7 @@
background: black;
width: 2px;
height: 12px;
-webkit-transform: rotate(90deg);
transform: rotate(90deg);
}
}
}

View File

@ -223,14 +223,14 @@ export default {
'$store.state.runPlan.planSizeCount': function () {
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
},
'$store.state.runPlan.select.serviceNumber': function (val) {
'$store.state.runPlan.selected.serviceNumber': function (val) {
const index = this.serviceNumberConfig.data.findIndex(elem => {
return elem.serviceNumber == val;
});
this.$refs.serviceTable.setCurrentRow(this.serviceNumberConfig.data[index]);
},
'$store.state.runPlan.select.tripNumber': function (val) {
'$store.state.runPlan.selected.tripNumber': function (val) {
const index = this.tripNumberConfig.data.findIndex(elem => {
return elem.tripNumber == val;
});

View File

@ -54,7 +54,7 @@
}
},
watch: {
'$store.state.runPlan.select': function (select) {
'$store.state.runPlan.selected': function (select) {
this.stationListConfig.data = [];
let serviceObj = this.$store.state.runPlan.editData[select.serviceNumber];
if (serviceObj) {

View File

@ -1,7 +1,16 @@
<template>
<div>
<el-dialog class="fuzhou-01__systerm section-cmd-speed" :title="title" :visible.sync="show" width="800px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm section-cmd-speed"
:title="title"
:visible.sync="show"
width="800px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<span class="base-label">命令信息</span>
<el-form label-position="center" size="mini">
@ -9,50 +18,62 @@
<el-col :span="6">
<el-form-item label="类型" label-width="40px">
<el-select v-model="operation" size="small" disabled>
<el-option v-for="option in typeList" :key="option.code" :label="option.name"
:value="option.code">
</el-option>
<el-option
v-for="option in typeList"
:key="option.code"
:label="option.name"
:value="option.code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="车站名称" label-width="80px">
<el-input v-model="stationName" size="small" disabled></el-input>
<el-input v-model="stationName" size="small" disabled />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="nameLabel" label-width="80px">
<el-input v-model="name" size="small" disabled></el-input>
<el-input v-model="name" size="small" disabled />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="限速值" label-width="80px">
<el-select v-model="speed" :id="domIdChoose" size="small" :disabled="spdDisabled"
@change="speedSelectChange">
<el-option v-for="item in speedList" :key="item" :label="item" :value="item">
</el-option>
<el-select
:id="domIdChoose"
v-model="speed"
size="small"
:disabled="spdDisabled"
@change="speedSelectChange"
>
<el-option v-for="item in speedList" :key="item" :label="item" :value="item" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table class="table" ref="table" :data="tableData" border style="width: 100%" size="mini"
highlight-current-row height="200">
<el-table-column prop="order" :width="50" label="序号">
</el-table-column>
<el-table-column prop="date" :width="160" label="时间">
</el-table-column>
<el-table-column prop="context" :width="180" label="执行过程">
</el-table-column>
<el-table-column prop="result" label="执行结果">
</el-table-column>
<el-table
ref="table"
class="table"
:data="tableData"
border
style="width: 100%"
size="mini"
highlight-current-row
height="200"
>
<el-table-column prop="order" :width="50" label="序号" />
<el-table-column prop="date" :width="160" label="时间" />
<el-table-column prop="context" :width="180" label="执行过程" />
<el-table-column prop="result" label="执行结果" />
</el-table>
<span class="notice">{{message}}</span>
<span class="notice">{{ message }}</span>
<el-row class="button-group">
<el-col :span="2" :offset="2">
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
v-show="timeCountCommand>0">({{timeCountCommand}})</span></el-button>
v-show="timeCountCommand>0"
>({{ timeCountCommand }})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
@ -60,7 +81,8 @@
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
v-show="timeCountConfirm>0">({{timeCountConfirm}})</span></el-button>
v-show="timeCountConfirm>0"
>({{ timeCountConfirm }})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
@ -70,15 +92,15 @@
</el-col>
</el-row>
</el-dialog>
<confirm-control-speed ref="confirmControlSpeed" @setOperate="getOperate"></confirm-control-speed>
<confirm-control-speed ref="confirmControlSpeed" @setOperate="getOperate" />
</div>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import ConfirmControlSpeed from './childDialog/confirmControlSpeed';
import { now } from '@/utils/date';
import { OperationEvent } from '@/scripts/ConstDic';
import ConfirmControlSpeed from './childDialog/confirmControlSpeed';
import { now } from '@/utils/date';
export default {
export default {
name: 'SectionCmdSpeed',
components: {
ConfirmControlSpeed
@ -105,7 +127,7 @@
stationName: '',
name: '',
speed: ''
}
};
},
computed: {
nameLabel() {
@ -116,9 +138,10 @@
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
return '道岔名称';
}
return null;
},
speedList() {
let list = [];
const list = [];
for (var i = 0; i * this.speedSpace <= this.maxSpeed; i++) {
list.push(String(i * this.speedSpace));
}
@ -129,21 +152,22 @@
{ code: OperationEvent.Section.setSpeed.menu.operation, name: '区段设置限速' },
{ code: OperationEvent.Section.cancelSpeed.menu.operation, name: '区段取消限速' },
{ code: OperationEvent.Switch.setSpeed.menu.operation, name: '道岔设置限速' },
{ code: OperationEvent.Switch.cancelSpeed.menu.operation, name: '道岔取消限速' },
]
{ code: OperationEvent.Switch.cancelSpeed.menu.operation, name: '道岔取消限速' }
];
},
title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
return '区段设置限速';
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
return '区段取消限速'
return '区段取消限速';
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
return '道岔设置限速';
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
return '道岔取消限速'
return '道岔取消限速';
}
}
return null;
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
@ -158,6 +182,7 @@
return OperationEvent.Switch.setSpeed.choose.domId;
}
}
return null;
},
domIdCommand() {
if (this.dialogShow) {
@ -175,6 +200,7 @@
return OperationEvent.Switch.cancelSpeed.order.domId;
}
}
return null;
},
domIdConfirm1() {
if (this.dialogShow) {
@ -192,6 +218,7 @@
return OperationEvent.Switch.cancelSpeed.confirm1.domId;
}
}
return null;
},
domIdConfirm2() {
if (this.dialogShow) {
@ -209,6 +236,7 @@
return OperationEvent.Switch.cancelSpeed.confirm2.domId;
}
}
return null;
},
domIdStop() {
if (this.dialogShow) {
@ -226,16 +254,18 @@
return OperationEvent.Switch.cancelSpeed.stop.domId;
}
}
return null;
},
domIdClose() {
if (this.dialogShow) {
return OperationEvent.Command.close.menu.domId;
}
return null;
},
isCancelSpeed() {
return this.operation == OperationEvent.Section.cancelSpeed.menu.operation
|| this.operation == OperationEvent.Switch.cancelSpeed.menu.operation
},
return this.operation == OperationEvent.Section.cancelSpeed.menu.operation ||
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation;
}
},
watch: {
cmdDisabled: {
@ -243,12 +273,12 @@
this.stpDisabled = true;
this.spdDisabled = false;
val.forEach((elem, index) => {
//
//
if (elem == false && index >= 1 || this.isCancelSpeed) {
this.spdDisabled = true;
}
//1
// 1
if (elem == false && index >= 1) {
this.stpDisabled = false;
}
@ -263,7 +293,7 @@
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) {
@ -279,7 +309,7 @@
this.timeCountConfirm = -1;
}
}
}, 1000)
}, 1000);
},
beforeDestroy() {
clearInterval(this.timer);
@ -295,21 +325,21 @@
operate.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
if (selected.type === '02') {
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
if (section) {
this.name += section.name
this.name += section.name;
}
}
this.name += selected.name
this.name += selected.name;
}
} else if (operate.operation == OperationEvent.Switch.setSpeed.menu.operation ||
operate.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
this.name = selected.name
this.name = selected.name;
}
}
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
@ -343,17 +373,17 @@
this.$store.dispatch('training/emitTipFresh');
},
speedSelectChange(val) {
let operate = {
const operate = {
type: this.type,
val: val,
}
val: val
};
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.choose.operation
operate.operation = OperationEvent.Section.setSpeed.choose.operation;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.choose.operation
operate.operation = OperationEvent.Switch.setSpeed.choose.operation;
}
this.setMessage('请点击“下达”按钮,下达命令!');
@ -362,12 +392,12 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
}
})
});
},
command() {
let operate = {
type: this.type,
}
const operate = {
type: this.type
};
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
@ -399,12 +429,12 @@
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
})
});
},
confirm1() {
let operate = {
type: this.type,
}
const operate = {
type: this.type
};
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
@ -434,14 +464,14 @@
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
})
});
},
confirm2() {
let operate = {
const operate = {
send: true,
type: this.type,
val: this.speed
}
};
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
@ -469,17 +499,17 @@
} else {
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行失败' });
}
}).catch((error) => {
}).catch(() => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
})
});
},
stop() {
let operate = {
type: this.type,
}
const operate = {
type: this.type
};
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
@ -504,21 +534,21 @@
} else {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行失败' });
}
}).catch(error => {
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
})
});
},
close() {
let operate = {
const operate = {
type: this.type,
operation: OperationEvent.Command.close.menu.operation,
}
operation: OperationEvent.Command.close.menu.operation
};
this.writeRecord({ order: ++this.order, date: now(), context: '点击关闭', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.doClose();
});
},
@ -546,8 +576,8 @@
elem[prop] = param[prop];
}
}
})
}
});
}
}
};
</script>

View File

@ -1,21 +1,27 @@
<template>
<el-dialog :title="title" class="fuzhou-01__schedule choose-plan-template" :visible.sync="dialogShow" width="80%"
:before-close="doClose" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
</QueryListPage>
<el-dialog
v-dialogDrag
:title="title"
class="fuzhou-01__schedule choose-plan-template"
:visible.sync="dialogShow"
width="80%"
:before-close="doClose"
:modal="false"
:close-on-click-modal="false"
>
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<el-row type="flex" justify="center" class="button-group">
<el-button type="primary" @click="handleConfirm" :loading="loading"> </el-button>
<el-button type="primary" :loading="loading" @click="handleConfirm"> </el-button>
<el-button @click="dialogShow = false"> </el-button>
</el-row>
</el-dialog>
</template>
<script>
import { runPlanTemplateList } from '@/api/runplan';
import { getSkinStyleList } from '@/api/management/mapskin'
import { UrlConfig } from '@/router/index';
import { runPlanTemplateList } from '@/api/runplan';
import { getSkinStyleList } from '@/api/management/mapskin';
export default {
export default {
name: 'ChooseTemplatePlan',
data() {
return {
@ -50,19 +56,19 @@
prop: 'skinStyle',
type: 'tag',
columnValue: (row) => {
return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name'])
return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name']);
},
tagType: (row) => { return 'success' }
tagType: (row) => { return 'success'; }
}
]
},
currentModel: {}
}
};
},
computed: {
title() {
return '选择模板运行图'
return '选择模板运行图';
}
},
methods: {
@ -70,7 +76,7 @@
this.skinStyleList = [];
getSkinStyleList().then(response => {
this.skinStyleList = response.data;
})
});
},
doShow() {
this.loading = false;
@ -98,10 +104,10 @@
}
},
reloadTable() {
this.queryList.reload()
}
this.queryList.reload();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";

View File

@ -2,27 +2,32 @@
<div v-if="show">
<template v-if="maxmini">
<div class="nav">
<div class="cls-status" @click="touch('Close')" v-show="config.showClose"><span></span></div>
<div class="min-status" @click="touch('Minim')"><span></span></div>
<div v-show="config.showClose" class="cls-status" @click="touch('Close')"><span /></div>
<div class="min-status" @click="touch('Minim')"><span /></div>
</div>
<el-table ref="table" :data="config.data" :highlight-current-row="config.highlightCurrentRow"
@current-change="handleChange" :height="height" border>
<template v-for="item in config.columns">
<el-table-column :prop="item.prop" :label="item.label" :width="item.width">
</el-table-column>
<el-table
ref="table"
:data="config.data"
:highlight-current-row="config.highlightCurrentRow"
:height="height"
border
@current-change="handleChange"
>
<template v-for="(item,index) in config.columns">
<el-table-column :key="index" :prop="item.prop" :label="item.label" :width="item.width" />
</template>
</el-table>
</template>
<template v-else>
<div class="nav">
<div class=" max-status" @click="touch('Maxim')"><span></span></div>
<div class=" max-status" @click="touch('Maxim')"><span /></div>
</div>
</template>
</div>
</template>
<script>
export default {
export default {
name: 'DataTable',
props: {
height: {
@ -31,7 +36,7 @@
},
config: {
type: Object,
required: true,
required: true
}
},
data() {
@ -43,7 +48,7 @@
'Minim': [true, false],
'Maxim': [true, true]
}
}
};
},
methods: {
handleChange(row) {
@ -58,13 +63,13 @@
this.$nextTick(() => {
[this.show, this.maxmini] = this.touchStrategy[operate];
this.$emit('touch', this.maxmini);
})
}
});
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss" scoped>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
$height: 20px;
$width: 20px;
@ -85,7 +90,6 @@
line-height: $height;
}
/deep/ {
.el-table--border th.gutter {
background: #EBEADB !important;
@ -119,7 +123,6 @@
font-size: smaller !important;
}
}
.current-row>td {
@ -143,7 +146,7 @@
width: 2px;
height: 12px;
vertical-align: middle;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
span::after {
@ -152,7 +155,7 @@
background: black;
width: 2px;
height: 12px;
-webkit-transform: rotate(-90deg);
transform: rotate(-90deg);
}
}
@ -170,7 +173,7 @@
width: 2px;
height: 12px;
vertical-align: middle;
-webkit-transform: rotate(-90deg);
transform: rotate(-90deg);
}
}
@ -187,7 +190,7 @@
background: black;
width: 2px;
height: 12px;
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
span::after {
@ -196,7 +199,7 @@
background: black;
width: 2px;
height: 12px;
-webkit-transform: rotate(90deg);
transform: rotate(90deg);
}
}
}

View File

@ -1,24 +1,29 @@
<template>
<el-dialog :title="title" class="fuzhou-01__schedule reload-today-plan" :visible.sync="dialogShow" width="80%"
:before-close="doClose" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
</QueryListPage>
<el-dialog
v-dialogDrag
:title="title"
class="fuzhou-01__schedule reload-today-plan"
:visible.sync="dialogShow"
width="80%"
:before-close="doClose"
:modal="false"
:close-on-click-modal="false"
>
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<el-row type="flex" justify="center" class="button-group">
<el-button type="primary" @click="handleConfirm" :loading="loading"> </el-button>
<el-button type="primary" :loading="loading" @click="handleConfirm"> </el-button>
<el-button @click="dialogShow = false"> </el-button>
</el-row>
</el-dialog>
</template>
<script>
import { listPublishMap } from '@/api/jmap/mapdraft';
import { runPlanTemplateList, deleteRunPlanTemplate, generateUserRunPlanEveryDay } from '@/api/runplan';
import { getStationListBySkinStyle } from '@/api/runplan';
import { getEveryDayRunPlanData } from '@/api/simulation';
import { getSkinStyleList } from '@/api/management/mapskin'
import { UrlConfig } from '@/router/index';
import { runPlanTemplateList, generateUserRunPlanEveryDay } from '@/api/runplan';
import { getStationListBySkinStyle } from '@/api/runplan';
import { getEveryDayRunPlanData } from '@/api/simulation';
import { getSkinStyleList } from '@/api/management/mapskin';
export default {
export default {
name: 'ReloadTodayPlan',
data() {
return {
@ -53,19 +58,19 @@
prop: 'skinStyle',
type: 'tag',
columnValue: (row) => {
return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name'])
return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name']);
},
tagType: (row) => { return 'success' }
tagType: (row) => { return 'success'; }
}
]
},
currentModel: {}
}
};
},
computed: {
title() {
return '加载当天计划'
return '加载当天计划';
}
},
methods: {
@ -73,7 +78,7 @@
this.skinStyleList = [];
getSkinStyleList().then(response => {
this.skinStyleList = response.data;
})
});
},
doShow() {
this.loading = false;
@ -97,45 +102,45 @@
this.loading = true;
generateUserRunPlanEveryDay(choose.id, this.$route.query.group).then(response => {
this.loading = false;
this.reloadTable()
this.reloadTable();
this.loadRunData();
this.doClose();
this.$message.success(`生成用户每日运行图成功`);
}).catch(error => {
}).catch(() => {
this.loading = false;
this.reloadTable()
this.reloadTable();
this.$messageBox(`生成用户每日运行图失败`);
})
});
} else {
this.$messageBox(`请选择需要加载的运行图`);
}
}
},
loadRunData() {
let skinStyle = this.$route.query.skinStyle;
const skinStyle = this.$route.query.skinStyle;
this.$store.dispatch('runPlan/clear');
if (skinStyle) {
getStationListBySkinStyle(skinStyle).then(response => {
let stations = response.data;
const stations = response.data;
this.PlanConvert = this.$theme.loadPlanConvert(skinStyle);
this.$store.dispatch('runPlan/setStations', stations).then(() => {
getEveryDayRunPlanData(this.$route.query.group).then(resp => {
this.$store.dispatch('runPlan/setPlanData', resp.data);
}).catch(error => {
}).catch(() => {
this.$store.dispatch('runPlan/setPlanData', []);
this.$messageBox(`获取运行图数据失败`);
})
})
}).catch(error => {
});
});
}).catch(() => {
this.$messageBox(`获取车站列表失败`);
});
}
},
reloadTable() {
this.queryList.reload()
}
this.queryList.reload();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";

View File

@ -1,4 +1,4 @@
import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, formatTime, convertSheetToList } from '@/utils/runPlan';
import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, prefixTime, convertSheetToList } from '@/utils/runPlan';
export default {
/** 边缘高度*/
@ -64,7 +64,7 @@ export default {
}
/** 设置标志*/
[need, flag] = [true, false];
[need, flag] = [true, true];
} else if (reg2.test(value)) {
/** 含有特殊字符的时间格式*/
[, begTime, endTime] = reg2.exec(value);
@ -101,8 +101,8 @@ export default {
stationName: stationName
};
if (begTime) { stationObj['arriveTime'] = formatTime(begTime); }
if (endTime) { stationObj['departureTime'] = formatTime(endTime); }
if (begTime) { stationObj['arriveTime'] = prefixTime(begTime); }
if (endTime) { stationObj['departureTime'] = prefixTime(endTime); }
if (flag) { stationObj['flag'] = flag; }
JsonData[JsonData.length - 1].arrivalList.push(stationObj);
}

View File

@ -1,52 +1,39 @@
<template>
<div class="plan-schedule" style="width: 100%">
<title-bar ref="titleBar" @back="back"></title-bar>
<menu-bar ref="menuBar" :skinStyle="skinStyle" @dispatchDialog="dispatchDialog"></menu-bar>
<!-- <menu-tool ref="menuTool" :skinStyle="skinStyle"></menu-tool> -->
<schedule ref="schedule" :skinStyle="skinStyle" :group="group" :maxHeight="height" :maxWidth="width">
</schedule>
<status-bar ref="statusBar" :maxTop="height" @setPosition="setPosition"></status-bar>
<title-bar ref="titleBar" @back="back" />
<menu-bar ref="menuBar" :skin-style="skinStyle" @dispatchDialog="dispatchDialog" />
<schedule ref="schedule" :skin-style="skinStyle" :group="group" :max-height="height" :max-width="width" />
<status-bar ref="statusBar" :max-top="height" @setPosition="setPosition" />
<manage-plan-list ref="managePlanList" @dispatchDialog="dispatchDialog"></manage-plan-list>
<create-week-plan ref="createWeekPlan" @reloadTable="reloadTable"></create-week-plan>
<create-today-plan ref="createTodayPlan"></create-today-plan>
<modifying-plan ref="modifyingPlan" @dispatchDialog="dispatchDialog"></modifying-plan>
<add-task ref="addTask"></add-task>
<delete-task ref="deleteTask"></delete-task>
<modifying-task ref="modifyingTask"></modifying-task>
<manage-plan-list ref="managePlanList" @dispatchDialog="dispatchDialog" />
<create-week-plan ref="createWeekPlan" @reloadTable="reloadTable" />
<create-today-plan ref="createTodayPlan" />
<modifying-plan ref="modifyingPlan" @dispatchDialog="dispatchDialog" />
<add-task ref="addTask" />
<delete-task ref="deleteTask" />
<modifying-task ref="modifyingTask" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import TitleBar from './titleBar';
import MenuBar from './menuBar';
import MenuTool from './menuTool';
import StatusBar from './statusBar';
import Schedule from './schedule';
import ManagePlanList from '../menusPlan/managePlanList'
import CreateWeekPlan from '../menusPlan/createWeekPlan';
import CreateTodayPlan from '../menusPlan/createTodayPlan';
import ModifyingPlan from '../menusPlan/modifyingPlan';
import AddTask from '../menusPlan/addTask';
import DeleteTask from '../menusPlan/deleteTask'
import ModifyingTask from '../menusPlan/modifyingTask';
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
import TitleBar from './titleBar';
import MenuBar from './menuBar';
import StatusBar from './statusBar';
import Schedule from './schedule';
import ManagePlanList from '../menusPlan/managePlanList';
import CreateWeekPlan from '../menusPlan/createWeekPlan';
import CreateTodayPlan from '../menusPlan/createTodayPlan';
import ModifyingPlan from '../menusPlan/modifyingPlan';
import AddTask from '../menusPlan/addTask';
import DeleteTask from '../menusPlan/deleteTask';
import ModifyingTask from '../menusPlan/modifyingTask';
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
export default {
export default {
name: 'Menus',
mixins: [
WindowResizeHandler
],
props: {
group: {
type: String
}
},
components: {
TitleBar,
MenuBar,
MenuTool,
StatusBar,
Schedule,
ManagePlanList,
@ -57,11 +44,20 @@
DeleteTask,
ModifyingTask
},
mixins: [
WindowResizeHandler
],
props: {
group: {
type: String,
required: true
}
},
data() {
return {
width: 0,
height: 0
}
};
},
computed: {
skinStyle() {
@ -76,14 +72,14 @@
setPosition() {
this.$nextTick(() => {
this.$refs.schedule.setPosition();
})
});
},
dispatchDialog(dialogObj) {
this.$nextTick(() => {
if (this.$refs[dialogObj.name]) {
this.$refs[dialogObj.name].doShow(dialogObj.params);
}
})
});
},
reloadTable(dialogObj) {
if (this.$refs[dialogObj.name]) {
@ -96,7 +92,7 @@
this.$emit('back');
}
}
}
};
</script>
<style>
@ -207,7 +203,6 @@
background: #ECE9D8 !important;
}
.fuzhou-01__schedule .el-dialog .el-button {
height: 32px;
line-height: 32px;
@ -244,7 +239,6 @@
text-align: center !important;
}
.fuzhou-01__schedule .el-dialog .el-input {
border: 2px inset #E9E9E9;
}

View File

@ -1,172 +0,0 @@
<template>
<div id="PlanMenuTool">
<div class="nav">
<div class="tool" v-for="(item,index) in tools" :key="index">
<img :src="item.src" :alt="item.title" />
</div>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { prefixIntrger } from '@/utils/date';
import logo_ from '@/assets/logo_.png';
export default {
name: 'PlanMenuTool',
data() {
return {
tools: [
{
title: '服务器1',
operate: '',
src: logo_,
click: this.undeveloped,
},
{
title: '服务器2',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '前置机1',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '前置机2',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '主调',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '调度台1',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '调度台2',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '调度台3',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '大屏',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '维护工作站',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '运行图显示人工站',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '跳停',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '扣车',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '列车报警',
operate: '',
src: logo_,
click: this.undeveloped,
}
]
}
},
watch: {
'$store.state.training.initTime': function (initTime) {
let date = new Date(initTime);
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`
}
},
computed: {
isShowSystemTime() {
return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode;
}
},
mounted() {
this.initTools();
},
methods: {
initTools() {
this.tools = [];
}
}
}
</script>
<style scoped rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
$top: 48px;
$width: 25px;
$height: 25px;
#PlanMenuTool {
z-index: 5;
position: absolute;
width: 100%;
top: $top;
}
.nav {
display: block;
color: #0000;
background: #EBEADB;
border: 1px solid #B6BCCC !important;
border-bottom: 2px solid #B6BCCC !important;
list-style: none;
height: $height;
line-height: $height;
}
.tool {
padding-left: 10px;
display: flex;
justify-content: center;
cursor: pointer;
position: relative;
float: left;
margin: 1px;
width: $width;
img {
display: block;
text-align: center;
padding-top: 2px;
height: $height - 5;
width: $width - 5;
}
}
</style>

View File

@ -1,26 +1,38 @@
<template>
<div id="PlanSchedule" :style="{top: top+'px', height: height+'px'}">
<div class="left">
<div :id="runPlanId"></div>
<div :id="runPlanId" />
</div>
<div class="right">
<data-table ref="serviceTable" :height="height/2" :config="serviceNumberConfig" @touch="scheduleTouch"
:style="{top: top-height/2+'px'}"></data-table>
<data-table ref="tripTable" :height="height/2" :config="tripNumberConfig" @touch="trainNumTouch"
:style="{top: top-height/2+'px'}"></data-table>
<data-table
ref="serviceTable"
:height="height/2"
:config="serviceNumberConfig"
:style="{top: top-height/2+'px'}"
@touch="scheduleTouch"
/>
<data-table
ref="tripTable"
:height="height/2"
:config="tripNumberConfig"
:style="{top: top-height/2+'px'}"
@touch="trainNumTouch"
/>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { timeFormat } from '@/utils/date';
import { runDiagramGetTime } from '@/api/simulation';
import { getStationListBySkinStyle } from '@/api/runplan';
import DataTable from '../menusPlan/components/dataTable';
import { mapGetters } from 'vuex';
import { timeFormat } from '@/utils/date';
import { runDiagramGetTime } from '@/api/simulation';
import DataTable from '../menusPlan/components/dataTable';
export default {
export default {
name: 'PlanSchedule',
components: {
DataTable
},
props: {
group: {
type: String,
@ -32,16 +44,13 @@
},
maxWidth: {
type: Number,
require: true
required: true
},
maxHeight: {
type: Number,
required: true
}
},
components: {
DataTable
},
data() {
return {
top: 0,
@ -58,7 +67,7 @@
columns: [
{
prop: 'serviceNumber',
label: '表号',
label: '表号'
},
{
width: 40
@ -73,7 +82,7 @@
columns: [
{
prop: 'tripNumber',
label: '车次号',
label: '车次号'
},
{
width: 40
@ -111,7 +120,7 @@
type: 'cross'
},
formatter: this.axisTooltip,
borderWidth: 1,
borderWidth: 1
},
xAxis: [
{
@ -136,7 +145,7 @@
label: {
formatter: this.xAxisPointFormat,
backgroundColor: 'rgb(255,0,0,0.5)',
color: 'white',
color: 'white'
}
}
}
@ -147,7 +156,7 @@
show: false
},
axisTick: {
show: false,
show: false
},
axisLine: {
onZero: false,
@ -158,23 +167,23 @@
},
axisLabel: {
interval: 'auto',
formatter: this.yAxisLableFormat,
formatter: this.yAxisLableFormat
},
axisPointer: {
xAxisIndex: 'all',
label: {
formatter: this.yAxisPointFormat,
backgroundColor: 'rgb(0,100,0,0.5)',
color: 'white',
color: 'white'
}
},
min: 0,
max: 0,
max: 0
},
series: [],
dataZoom: [
{
type: 'inside',
type: 'inside'
},
{
fiterMode: 'filter',
@ -193,7 +202,12 @@
},
absoluteTime: 2 * 3600,
indexKmRangeMap: {}
}
};
},
computed: {
...mapGetters('runPlan', [
'stations'
])
},
watch: {
maxWidth() {
@ -208,25 +222,20 @@
'$store.state.runPlan.planSizeCount': function () {
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
},
'$store.state.runPlan.select.serviceNumber': function (val) {
let index = this.serviceNumberConfig.data.findIndex(elem => {
'$store.state.runPlan.selected.serviceNumber': function (val) {
const index = this.serviceNumberConfig.data.findIndex(elem => {
return elem.serviceNumber == val;
})
});
this.$refs.serviceTable.setCurrentRow(this.serviceNumberConfig.data[index]);
},
'$store.state.runPlan.select.tripNumber': function (val) {
let index = this.tripNumberConfig.data.findIndex(elem => {
'$store.state.runPlan.selected.tripNumber': function (val) {
const index = this.tripNumberConfig.data.findIndex(elem => {
return elem.tripNumber == val;
})
});
this.$refs.tripTable.setCurrentRow(this.tripNumberConfig.data[index]);
}
},
computed: {
...mapGetters('runPlan', [
'stations'
])
},
mounted() {
this.PlanConvert = this.$theme.loadPlanConvert(this.skinStyle);
},
@ -237,7 +246,7 @@
serviceNumberChange(row) {
if (row) {
this.$store.dispatch('runPlan/setSelected', { serviceNumber: row.serviceNumber, tripNumber: null });
let serviceObj = this.$store.state.runPlan.editData[row.serviceNumber]
const serviceObj = this.$store.state.runPlan.editData[row.serviceNumber];
if (serviceObj) {
this.analyticalTripNumber(serviceObj.trainMap);
}
@ -250,24 +259,24 @@
},
async analyticalServiceNumber(data) {
this.serviceNumberConfig.data = Object.keys(data || {})
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex })
.map(serviceNumber => { return { serviceNumber } });
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
.map(serviceNumber => { return { serviceNumber }; });
},
async analyticalTripNumber(data) {
this.tripNumberConfig.data = Object.keys(data || {})
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex })
.map(tripNumber => { return { tripNumber } });
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
.map(tripNumber => { return { tripNumber }; });
},
async setPosition() {
this.$nextTick(() => {
let top = 3;
let width = this.maxWidth * 0.85;
const width = this.maxWidth * 0.85;
let height = this.maxHeight;
let titleBar = document.getElementById('PlanTitleBar');
let menuBar = document.getElementById('PlanMenuBar');
let menuTool = document.getElementById('PlanMenuTool');
let statusBar = document.getElementById('PlanStatusBar');
const titleBar = document.getElementById('PlanTitleBar');
const menuBar = document.getElementById('PlanMenuBar');
const menuTool = document.getElementById('PlanMenuTool');
const statusBar = document.getElementById('PlanStatusBar');
if (titleBar) {
top += (titleBar.offsetHeight || 0);
@ -295,13 +304,13 @@
if (this.height != height) {
this.height = height - 20 * 2;
}
})
});
},
async loadChartPage() {
try {
let series = [];
let planData = this.$store.state.runPlan.planData || [];
let stations = this.$store.state.runPlan.stations || [];
const planData = this.$store.state.runPlan.planData || [];
const stations = this.$store.state.runPlan.stations || [];
this.viewDisabled = true;
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);
@ -329,7 +338,7 @@
if (elem) {
series.push(elem);
}
})
});
}
return series;
@ -337,11 +346,11 @@
popModels(series, models) {
if (models && models.length) {
models.forEach(elem => {
let index = series.indexOf(elem);
const index = series.indexOf(elem);
if (index >= 0) {
series.split(index, 1);
}
})
});
}
return series;
@ -349,8 +358,8 @@
loadInitChart(series) {
return new Promise((resolve, reject) => {
try {
let that = this;
//echart
const that = this;
// echart
require.config(
{
paths: {
@ -362,13 +371,13 @@
require(
[
'echarts',
'echarts/lib/chart/line',
'echarts/lib/chart/line'
],
function (ec) {
that.destroy();
let startValue = 3600 + that.PlanConvert.TranslationTime;
let offsetTime = 3600;
const offsetTime = 3600;
runDiagramGetTime(that.group).then(resp => {
startValue = resp.data - that.PlanConvert.TranslationTime;
@ -382,7 +391,7 @@
that.myChart.on('click', that.mouseClick);
}
resolve(true);
})
});
}
);
} catch (error) {
@ -405,13 +414,13 @@
return '';
},
xAxisInit() {
let list = [];
const list = [];
for (var time = 0 + this.PlanConvert.TranslationTime; time < 3600 * 24 + this.PlanConvert.TranslationTime; time++) {
list.push(time);
}
let startValue = 3600 * 6;
let offsetTime = 3600 * 1;
const startValue = 3600 * 6;
const offsetTime = 3600 * 1;
this.option.xAxis[0].data = list;
if (!this.option.dataZoom[0].startValue) {
@ -429,7 +438,7 @@
}
},
axisTooltip(param) {
let station = this.stations[Math.floor((param.data[1] - this.PlanConvert.EdgeHeight) / this.PlanConvert.CoordMultiple)] || { name: '', kmRange: '' };
const station = this.stations[Math.floor((param.data[1] - this.PlanConvert.EdgeHeight) / this.PlanConvert.CoordMultiple)] || { name: '', kmRange: '' };
return [
`Point Data <hr size=1 style=" margin: 3px 0">`,
`车站名称: ${station.name}<br>`,
@ -438,9 +447,9 @@
].join('');
},
mouseClick(params) {
let model = {
const model = {
serviceNumber: params.seriesName
}
};
this.$store.dispatch('runPlan/setSelected', model);
},
reSize(opt) {
@ -465,9 +474,9 @@
}
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss" scoped>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
#PlanSchedule {

View File

@ -1,23 +1,30 @@
<template>
<data-table id="PlanStatusBar" ref="dataTable" :height="height-11" :config="stationListConfig" :close="false"
:style="{top: maxmini? maxTop-110+'px':maxTop-21+'px'}" @touch="touch"></data-table>
<data-table
id="PlanStatusBar"
ref="dataTable"
:height="height-11"
:config="stationListConfig"
:close="false"
:style="{top: maxmini? maxTop-110+'px':maxTop-21+'px'}"
@touch="touch"
/>
</template>
<script>
import DataTable from '../menusPlan/components/dataTable';
import { formatTime, formatName } from '@/utils/runPlan';
import DataTable from '../menusPlan/components/dataTable';
import { formatTime, formatName } from '@/utils/runPlan';
export default {
export default {
name: 'PlanStatusBar',
components: {
DataTable
},
props: {
maxTop: {
type: Number,
required: true
}
},
components: {
DataTable
},
data() {
return {
maxmini: true,
@ -34,15 +41,15 @@
},
{
prop: 'startTime',
label: '到点',
label: '到点'
},
{
prop: 'stopTime',
label: '停站时间',
label: '停站时间'
},
{
prop: 'endTime',
label: '发点',
label: '发点'
},
{
prop: 'level',
@ -51,27 +58,27 @@
}
]
}
}
};
},
watch: {
'$store.state.runPlan.select': function (select) {
'$store.state.runPlan.selected': function (select) {
this.stationListConfig.data = [];
let serviceObj = this.$store.state.runPlan.editData[select.serviceNumber];
const serviceObj = this.$store.state.runPlan.editData[select.serviceNumber];
if (serviceObj) {
let trainMap = serviceObj.trainMap;
const trainMap = serviceObj.trainMap;
if (trainMap) {
let trainObj = trainMap[select.tripNumber];
const trainObj = trainMap[select.tripNumber];
if (trainObj) {
let stationTimeList = trainObj.stationTimeList;
const stationTimeList = trainObj.stationTimeList;
if (stationTimeList && stationTimeList.length) {
stationTimeList.forEach((elem, index) => {
let stationObj = {
const stationObj = {
stationName: formatName(elem.stationCode),
startTime: formatTime(index == 0 ? null : stationTimeList[index - 1].secondTime),
stopTime: formatTime(index == 0 ? null : elem.secondTime - stationTimeList[index - 1].secondTime),
endTime: formatTime(elem.secondTime),
level: ''
}
};
this.stationListConfig.data.push(stationObj);
});
}
@ -86,10 +93,10 @@
this.$emit('setPosition');
}
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss" scoped>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
#PlanStatusBar {

View File

@ -1,23 +1,23 @@
<template>
<div id="PlanTitleBar">
<img class="logo" :src="logoImg" />
<span> {{mapName}} &ensp;</span>
<span v-if="runPlanName">({{runPlanName}})</span>
<span class="system-close el-icon-close" @click="back"></span>
<img class="logo" :src="logoImg">
<span> {{ mapName }} &ensp;</span>
<span v-if="runPlanName">({{ runPlanName }})</span>
<span class="system-close el-icon-close" @click="back" />
</div>
</template>
<script>
import logo_ from '@/assets/logo_.png';
import { getPublishMapInfo } from '@/api/jmap/map';
import logo_ from '@/assets/logo_.png';
import { getPublishMapInfo } from '@/api/jmap/map';
export default {
export default {
name: 'PlanTitleBar',
data() {
return {
mapName: '',
logoImg: logo_
}
};
},
computed: {
runPlanName() {
@ -28,7 +28,7 @@
if (this.$route.query.mapId) {
getPublishMapInfo(this.$route.query.mapId).then(resp => {
this.mapName = resp.data.name;
})
});
}
},
methods: {
@ -36,9 +36,9 @@
this.$emit('back');
}
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss" scoped>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
$width: 25px;
$height: 25px;

View File

@ -33,80 +33,85 @@ export function deviceFactory(type, elem) {
return Object.assign({ _type: type }, deviceRender[type], elem);
}
export function parser(data, jmap) {
export function createDevice(type, model, propConvert) {
const device = deviceFactory(type, model);
return propConvert ? propConvert.initPrivateProps(device) : device;
}
export function parser(data, skinStyle) {
var mapDevice = {};
var propConvert = Vue.prototype.$theme.loadPropConvert(jmap.skinStyle);
var propConvert = skinStyle ? Vue.prototype.$theme.loadPropConvert(skinStyle): null;
if (data) {
zrUtil.each(data.linkList || [], elem => {
mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.Link, elem));
mapDevice[elem.code] = createDevice(deviceType.Link, elem, propConvert);
}, this);
zrUtil.each(data.sectionList || [], elem => {
mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.Section, elem));
mapDevice[elem.code] = createDevice(deviceType.Section, elem, propConvert);
}, this);
zrUtil.each(data.signalList || [], elem => {
mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.Signal, elem));
mapDevice[elem.code] = createDevice(deviceType.Signal, elem, propConvert);
}, this);
zrUtil.each(data.stationList || [], elem => {
mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.Station, elem));
mapDevice[elem.code] = createDevice(deviceType.Station, elem, propConvert);
}, this);
zrUtil.each(data.stationStandList || [], elem => {
mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.StationStand, elem));
mapDevice[elem.code] = createDevice(deviceType.StationStand, elem, propConvert);
}, this);
zrUtil.each(data.stationControlList || [], elem => {
mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.StationControl, elem));
mapDevice[elem.code] = createDevice(deviceType.StationControl, elem, propConvert);
}, this);
zrUtil.each(data.counterList || [], elem => {
mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.StationCounter, elem));
mapDevice[elem.code] = createDevice(deviceType.StationCounter, elem, propConvert);
}, this);
zrUtil.each(data.delayShowList || [], elem => {
mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.StationDelayUnlock, elem));
mapDevice[elem.code] = createDevice(deviceType.StationDelayUnlock, elem, propConvert);
}, this);
zrUtil.each(data.lineList || [], elem => {
mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.Line, elem));
mapDevice[elem.code] = createDevice(deviceType.Line, elem, propConvert);
}, this);
zrUtil.each(data.textList || [], elem => {
mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.Text, elem));
mapDevice[elem.code] = createDevice(deviceType.Text, elem, propConvert);
}, this);
zrUtil.each(data.zcList || [], elem => {
mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.ZcControl, elem));
mapDevice[elem.code] = createDevice(deviceType.ZcControl, elem, propConvert);
}, this);
zrUtil.each(data.lcList || [], elem => {
mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.LcControl, elem));
mapDevice[elem.code] = createDevice(deviceType.LcControl, elem, propConvert);
}, this);
zrUtil.each(data.tempSpeedLimitList || [], elem => {
mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.LimitControl, elem));
mapDevice[elem.code] = createDevice(deviceType.LimitControl, elem, propConvert);
}, this);
zrUtil.each(data.resourceList || [], elem => {
mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.ImageControl, elem));
mapDevice[elem.code] = createDevice(deviceType.ImageControl, elem, propConvert);
}, this);
zrUtil.each(data.trainList || [], elem => {
mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.Train, elem));
mapDevice[elem.code] = createDevice(deviceType.Train, elem, propConvert);
}, this);
zrUtil.each(data.Line || [], elem => {
mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.Line, elem));
mapDevice[elem.code] = createDevice(deviceType.Line, elem, propConvert);
}, this);
zrUtil.each(data.Text || [], elem => {
mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.Text, elem));
mapDevice[elem.code] = createDevice(deviceType.Text, elem, propConvert);
}, this);
zrUtil.each(data.trainWindowList || [], elem => {
mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.TrainWindow, elem));
mapDevice[elem.code] = createDevice(deviceType.TrainWindow, elem, propConvert);
if (elem.sectionCode) {
const section = mapDevice[elem.sectionCode];
if (section) {
@ -116,7 +121,7 @@ export function parser(data, jmap) {
}, this);
zrUtil.each(data.switchList || [], elem => {
mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.Switch, elem));
mapDevice[elem.code] = createDevice(deviceType.Switch, elem, propConvert);
const cnodeSection = mapDevice[mapDevice[elem.code].sectionACode];
const lnodeSection = mapDevice[mapDevice[elem.code].sectionBCode];
const rnodeSection = mapDevice[mapDevice[elem.code].sectionCCode];

View File

@ -3,16 +3,25 @@
<el-menu-item v-for="item in entryList" :key="item.name" class="avatar-wrapper" index="" @click="item.handle">
<span style="color: white;">{{ item.name }}</span>
</el-menu-item>
<deomon-list ref="deomonList" />
</div>
</template>
<script>
import DeomonList from '@/views/demonstration/deomonList';
export default {
name: 'Entry',
components: {
DeomonList
},
data() {
return {
entryList: [
{
name: '快速入口',
handle: this.quickEntry
}
],
stomp: null,
header: null
@ -28,6 +37,9 @@ export default {
mounted() {
},
methods: {
quickEntry() {
this.$refs.deomonList.doShow();
}
}
};
</script>

View File

@ -8,59 +8,64 @@
text-color="#fff"
active-text-color="#ffd04b"
>
<template v-for="item in routers" v-if="!item.hidden&&item.children">
<template v-for="(item,idx) in routers">
<template v-if="!item.hidden&&item.children">
<template v-if="hasOneScreenShowingChildren(item.children) &&!item.alwaysShow">
<el-menu-item :index="item.redirect">
<template>
<el-menu-item :key="idx" index="">
<a
:href="item.redirect ? item.redirect : (item.path+'/'+item.children[0].path)"
target="_blank"
style="width: 100%; height: 100%; display: block;"
>{{ item.children[0].meta.title || $t(item.children[0].meta.i18n) }}</a>
>{{ $t(item.children[0].meta.i18n) }}</a>
</el-menu-item>
</template>
<template
v-else-if="hasOneShowingChildren(item.children) &&!item.alwaysShow"
:to="item.path+'/'+item.children[0].path"
>
<el-menu-item :index="item.redirect ? item.redirect : (item.path+'/'+item.children[0].path)">
</template>
<template v-else-if="hasOneShowingChildren(item.children) &&!item.alwaysShow">
<template :to="item.path+'/'+item.children[0].path">
<el-menu-item :key="idx" :index="item.redirect ? item.redirect : (item.path+'/'+item.children[0].path)">
<span
v-if="item.children[0].meta"
v-if="item.children[0].meta&&item.children[0].meta.i18n"
slot="title"
>{{ item.children[0].meta.title || $t(item.children[0].meta.i18n) }}</span>
>{{ $t(item.children[0].meta.i18n) }}</span>
</el-menu-item>
</template>
<el-submenu v-else :key="item.name" :index="item.name||item.path" :show-timeout="100">
<template slot="title">
<span v-if="item.meta" slot="title">{{ $t(item.meta.i18n) || item.meta.title }}</span>
</template>
<template v-for="child in item.children" v-if="!child.hidden">
<el-submenu v-else :key="idx" :index="item.name||item.path" :show-timeout="100">
<template slot="title">
<span v-if="item.meta" slot="title">{{ $t(item.meta.i18n) }}</span>
</template>
<template v-for="(child,cdx) in item.children">
<template v-if="!child.hidden">
<template v-if="child.children&&child.children.length>0&&hasShowingChildren(child.children)">
<el-submenu :key="child.name" :index="child.name||child.path" :show-timeout="100">
<el-submenu :key="cdx" :index="child.name||child.path" :show-timeout="100">
<template slot="title">
<span v-if="child.meta" slot="title">{{ child.meta.title || $t(item.meta.i18n) }}</span>
<span v-if="child.meta" slot="title">{{ $t(child.meta.i18n) }}</span>
</template>
<template v-for="grandchild in child.children" v-if="!grandchild.hidden">
<template v-for="(grandchild,gdx) in child.children">
<template v-if="!grandchild.hidden">
<template :to="child.path+'/'+grandchild.path">
<el-menu-item
:index="item.redirect ? item.redirect : (child.path+'/'+grandchild.path)"
>
<el-menu-item :key="gdx" :index="item.redirect ? item.redirect : (child.path+'/'+grandchild.path)">
<span
v-if="grandchild.meta"
slot="title"
>{{ $t(grandchild.meta.title || grandchild.meta.i18n) }}</span>
>{{ $t(grandchild.meta.i18n) }}</span>
</el-menu-item>
</template>
</template>
</template>
</el-submenu>
</template>
<template v-else :to="item.path+'/'+child.path">
<el-menu-item :index="item.redirect ? item.redirect : (item.path+'/'+child.path)">
<span v-if="child.meta" slot="title">{{ child.meta.title || $t(child.meta.i18n) }}</span>
<el-menu-item :key="cdx" :index="item.redirect ? item.redirect : (item.path+'/'+child.path)">
<span v-if="child.meta" slot="title">{{ $t(child.meta.i18n) }}</span>
</el-menu-item>
</template>
</template>
</template>
</el-submenu>
</template>
</template>
<quick-entry ref="quickEntry" />
<user-logout ref="userLogout" />
</el-menu>

View File

@ -1,7 +1,7 @@
<template>
<div class="menu-wrapper">
<template v-for="item in routes" v-if="!item.hidden&&item.children">
<template v-if="!item.hidden&&item.children">
<template v-for="item in routes">
<router-link
v-if="hasOneShowingChildren(item.children) && !item.children[0].children&&!item.alwaysShow"
:key="item.children[0].name"
@ -19,9 +19,9 @@
<span v-if="item.meta&&item.meta.title" slot="title">{{ item.meta.title }}</span>
</template>
<template v-for="child in item.children" v-if="!child.hidden">
<template v-if="!child.hidden">
<template v-for="child in item.children">
<sidebar-item v-if="child.children&&child.children.length>0" :key="child.path" :is-nest="true" class="nest-menu" :routes="[child]" />
<router-link v-else :key="child.name" :to="item.path+'/'+child.path">
<el-menu-item :index="item.path+'/'+child.path">
<svg-icon v-if="child.meta&&child.meta.icon" :icon-class="child.meta.icon" />
@ -29,8 +29,9 @@
</el-menu-item>
</router-link>
</template>
</template>
</el-submenu>
</template>
</template>
</div>
</template>

View File

@ -5,6 +5,95 @@ Vue.use(Router);
/* Layout */
import Layout from '@/layout';
import LoginNew from '@/views/login/loginNew';
import Login from '@/views/login/index';
import LoginNewScreen from '@/views/login/loginNewScreen';
import LoginScreen from '@/views/login/loginScreen';
import LoginNewPlan from '@/views/login/loginNewPlan';
import LoginPlan from '@/views/login/loginPlan';
import Jlmap3dedit from '@/views/jlmap3d/jlmap3dedit';
import Jlmap3d from '@/views/jlmap3d/index';
import Display from '@/views/display/index';
import TrainRoom from '@/views/trainRoom/index';
import JointTraining from '@/views/jointTraining/index';
import Error401 from '@/views/error-page/401';
import Errpr404 from '@/views/error-page/404';
import Dashboard from '@/views/dashboard/index';
import Dashboard1 from '@/views/dashboard/index.vue';
import SkinStyle from '@/views/map/skinStyle/index';
import SkinStyleDraft from '@/views/map/skinStyle/draft';
import Mapdraft from '@/views/map/mapdraft/index';
import Mapedit from '@/views/map/mapdraft/mapedit/index';
import Runplan from '@/views/map/runplan/index';
import RunplanView from '@/views/map/runplan/chart';
import Trainingcategory from '@/views/lesson/trainingcategory/index';
import Trainingrecord from '@/views/lesson/trainingrecord/index';
import TrainingrecordManage from '@/views/lesson/trainingrecord/manage/index';
import Taskmanage from '@/views/lesson/taskmanage/list';
import TrainingRuleList from '@/views/lesson/trainingRule/list';
import TrainingRuleEdit from '@/views/lesson/trainingRule/detail/index';
import Trainingmanage from '@/views/lesson/trainingmanage/index';
import Lessoncategory from '@/views/lesson/lessoncategory/index';
import Scriptmanage from '@/views/lesson/scriptmanage/list';
import Teach from '@/views/teach/index';
import TeachHome from '@/views/teach/home';
import TeachDetail from '@/views/teach/detail/index';
import TeachPractical from '@/views/teach/practical/index';
import Pay from '@/views/components/pay/index';
import Exam from '@/views/exam/index';
import ExamHome from '@/views/exam/home';
import ExamDetail from '@/views/exam/detail/examDetail';
import ExamCourseDetail from '@/views/exam/detail/courseDetail';
import ExamQuestionDetail from '@/views/exam/detail/questionDetail';
import ExamResult from '@/views/exam/result';
import PublishExamRule from '@/views/publish/examRule/index';
import PublishExamRuleDraft from '@/views/publish/examRule/draft/index';
import Demonstration from '@/views/demonstration/index';
import DemonstrationHome from '@/views/demonstration/home';
import DemonstrationDetail from '@/views/demonstration/detail/index';
import ScreenMonitor from '@/views/screenMonitor/index';
import ScreenMonitorHome from '@/views/screenMonitor/home';
import ScreenMonitorDetail from '@/views/screenMonitor/detail/index';
import PlanMonitorEditTool from '@/views/planMonitor/editTool/index';
import PlanMonitor from '@/views/planMonitor/index';
import PlanMonitorHome from '@/views/planMonitor/home';
import PlanMonitorDetail from '@/views/planMonitor/detail';
import Replay from '@/views/replay/index';
import Package from '@/views/package/index';
import PackageDraft from '@/views/package/draft/ruleForm';
import PublishMap from '@/views/publish/publishMap/index';
import PublishMapDraft from '@/views/publish/publishMap/draft';
import RunPlanCommon from '@/views/publish/runPlanCommon/index';
import RunPlanCommonDraft from '@/views/publish/runPlanCommon/draft';
import RunPlanTemplate from '@/views/publish/runPlanTemplate/index';
import RunPlanEveryDay from '@/views/publish/runPlanEveryDay/index';
import ProductStatus from '@/views/publish/productStatus/index';
import PublishLesson from '@/views/publish/publishLesson/index';
// import SimulationScript from '@/views/publish/simulationScript/index';
import Commodity from '@/views/orderauthor/commodity/index';
import CommodityDraft from '@/views/orderauthor/commodity/draft';
import OrderList from '@/views/orderauthor/order/list';
import OrderDraft from '@/views/orderauthor/order/draft';
import Author from '@/views/orderauthor/author/index';
import AuthorDraft from '@/views/orderauthor/author/draft';
import Permission from '@/views/orderauthor/permission/index';
import PermissionDetail from '@/views/orderauthor/permission/detail';
import PermissionDraft from '@/views/orderauthor/permission/draft/ruleForm';
import Dictionary from '@/views/management/dictionary/index';
import DictionaryDetail from '@/views/management/dictionaryDetail/index';
import UserControl from '@/views/management/userControl/index';
import UserTraining from '@/views/management/userTraining/index';
import UserExam from '@/views/management/userExam/index';
import UserSimulation from '@/views/management/userSimulation/index';
import ExistingSimulation from '@/views/management/existingSimulation/index';
/**
* Note: sub-menu only appear when route children.length >= 1
@ -125,53 +214,53 @@ export const UrlConfig = {
export const constantRoutes = [
{
path: '/login',
component: () => import('@/views/login/loginNew'),
component: LoginNew,
hidden: true
},
{
path: '/login1',
component: () => import('@/views/login/index'),
component: Login,
hidden: true
},
// 扫码登录
{
path: '/dp/login',
component: resolve => require(['@/views/login/loginNewScreen'], resolve),
component: LoginNewScreen,
hidden: true
},
// 密码登录
{
path: '/dp/login1',
component: resolve => require(['@/views/login/loginScreen'], resolve),
component: LoginScreen,
hidden: true
},
// 扫码登录
{
path: '/plan/login',
component: resolve => require(['@/views/login/loginNewPlan'], resolve),
component: LoginNewPlan,
hidden: true
},
// 密码登录
{
path: '/plan/login1',
component: resolve => require(['@/views/login/loginPlan'], resolve),
component: LoginPlan,
hidden: true
},
{
path: '/jlmap3d/edit',
component: resolve => require(['@/views/jlmap3d/jlmap3dedit'], resolve),
component: Jlmap3dedit,
hidden: true
},
{
path: '/401',
component: () => import('@/views/error-page/401'),
component: Error401,
hidden: true
},
{
path: '/404',
component: () => import('@/views/error-page/404'),
component: Errpr404,
hidden: true
},
@ -181,7 +270,7 @@ export const constantRoutes = [
redirect: '/dashboard',
children: [{
path: 'dashboard',
component: () => import('@/views/dashboard/index'),
component: Dashboard,
meta: {
i18n: 'router.homePage',
icon: 'dashboard'
@ -201,32 +290,32 @@ export const asyncRouter = [
children: [
{
path: 'dashboard',
component: resolve => require(['@/views/dashboard/index.vue'], resolve)
component: Dashboard1
}
]
},
{
path: '/display/:mode',
component: resolve => require(['@/views/display/index'], resolve),
component: Display,
meta: {
},
hidden: true
},
{
path: '/trainroom',
component: resolve => require(['@/views/trainRoom/index'], resolve),
component: TrainRoom,
meta: {
},
hidden: true
},
{
path: '/jointTraining',
component: resolve => require(['@/views/jointTraining/index'], resolve),
component: JointTraining,
hidden: true
},
{
path: '/jlmap3d',
component: resolve => require(['@/views/jlmap3d/index'], resolve),
component: Jlmap3d,
meta: {
},
hidden: true
@ -241,7 +330,7 @@ export const asyncRouter = [
children: [
{
path: 'skinStyle',
component: resolve => require(['@/views/map/skinStyle/index'], resolve),
component: SkinStyle,
meta: {
i18n: 'router.skinManage'
}
@ -249,19 +338,19 @@ export const asyncRouter = [
{
path: 'skinStyle/draft/:mode/:skinStyleId',
hidden: true,
component: resolve => require(['@/views/map/skinStyle/draft'], resolve)
component: SkinStyleDraft
},
{
path: 'draw',
redirect: '/map/draw/0/draft',
component: resolve => require(['@/views/map/mapdraft/index'], resolve),
component: Mapdraft,
meta: {
i18n: 'router.mapDraw'
},
children: [
{
path: ':mapId/:view',
component: resolve => require(['@/views/map/mapdraft/mapedit/index'], resolve),
component: Mapedit,
hidden: true
}
]
@ -269,19 +358,19 @@ export const asyncRouter = [
{
path: 'runPlan',
redirect: '/map/runPlan/view/draft',
component: resolve => require(['@/views/map/runplan/index'], resolve),
component: Runplan,
meta: {
i18n: 'router.runPlanManage'
},
children: [{
path: 'view/:mode',
component: resolve => require(['@/views/map/runplan/chart'], resolve),
component: RunplanView,
hidden: true
}]
},
{
path: 'product',
component: resolve => require(['@/views/lesson/trainingcategory/index'], resolve),
component: Trainingcategory,
meta: {
i18n: 'router.productEdit'
}
@ -299,28 +388,28 @@ export const asyncRouter = [
{
path: 'record',
redirect: '/lesson/record/training/0/null',
component: resolve => require(['@/views/lesson/trainingrecord/index'], resolve),
component: Trainingrecord,
meta: {
i18n: 'router.trainingRecord'
},
children: [
{
path: 'training/:trainingId/:trainingName',
component: resolve => require(['@/views/lesson/trainingrecord/manage/index'], resolve),
component: TrainingrecordManage,
hidden: true
}
]
},
{
path: 'manage/taskManage',
component: resolve => require(['@/views/lesson/taskmanage/list'], resolve),
component: Taskmanage,
meta: {
i18n: 'router.taskManage'
}
},
{
path: 'manage/trainingRule',
component: resolve => require(['@/views/lesson/trainingRule/list'], resolve),
component: TrainingRuleList,
meta: {
i18n: 'router.trainingRule'
}
@ -328,20 +417,20 @@ export const asyncRouter = [
{
path: 'manage/trainingRule/detail',
hidden: true,
component: resolve => require(['@/views/lesson/trainingRule/detail/index'], resolve),
component: TrainingRuleEdit,
meta: {
}
},
{
path: 'manage/training',
component: resolve => require(['@/views/lesson/trainingmanage/index'], resolve),
component: Trainingmanage,
meta: {
i18n: 'router.trainingManage'
}
},
{
path: 'edit',
component: resolve => require(['@/views/lesson/lessoncategory/index'], resolve),
component: Lessoncategory,
meta: {
i18n: 'router.lessonEdit'
}
@ -352,12 +441,12 @@ export const asyncRouter = [
path: '/script',
component: Layout,
meta: {
roles: [admin, lessonCreater]
roles: [admin, lessonCreater, user]
},
children: [
{
path: 'scriptManage',
component: resolve => require(['@/views/lesson/scriptmanage/list'], resolve),
component: Scriptmanage,
meta: {
i18n: 'router.scriptManage'
}
@ -367,14 +456,14 @@ export const asyncRouter = [
{
path: '/teach',
redirect: '/teach/home',
component: resolve => require(['@/views/teach/index'], resolve),
component: Teach,
meta: {
roles: [admin, userLesson, user]
},
children: [
{
path: 'home',
component: resolve => require(['@/views/teach/home'], resolve),
component: TeachHome,
meta: {
i18n: 'router.teachSystem'
}
@ -382,7 +471,7 @@ export const asyncRouter = [
{
// 课程详情
path: 'detail/:lessonId',
component: resolve => require(['@/views/teach/detail/index'], resolve),
component: TeachDetail,
meta: {
},
hidden: true
@ -390,14 +479,14 @@ export const asyncRouter = [
{
// 实训详情
path: 'practical/:trainingId/:lessonId',
component: resolve => require(['@/views/teach/practical/index'], resolve),
component: TeachPractical,
meta: {
},
hidden: true
},
{
path: 'pay/:lessonId',
component: resolve => require(['@/views/components/pay/index'], resolve),
component: Pay,
meta: {
},
hidden: true
@ -407,14 +496,14 @@ export const asyncRouter = [
{
path: '/exam',
redirect: '/exam/home',
component: resolve => require(['@/views/exam/index'], resolve),
component: Exam,
meta: {
roles: [admin, userExam, user]
},
children: [
{
path: 'home',
component: resolve => require(['@/views/exam/home'], resolve),
component: ExamHome,
meta: {
i18n: 'router.examSystem'
}
@ -422,40 +511,40 @@ export const asyncRouter = [
{
// 试卷详情
path: 'detail/:examId',
component: resolve => require(['@/views/exam/detail/examDetail'], resolve),
component: ExamDetail,
hidden: true
},
{
path: 'course/:lessonId',
component: resolve => require(['@/views/exam/detail/courseDetail'], resolve),
component: ExamCourseDetail,
hidden: true
},
{
// 规则管理
path: 'examRule/manage',
component: resolve => require(['@/views/publish/examRule/index'], resolve),
component: PublishExamRule,
hidden: true
},
{
path: 'examRule/draft/:mode/:ruleId/:lessonId',
hidden: true,
component: resolve => require(['@/views/publish/examRule/draft/index'], resolve)
component: PublishExamRuleDraft
},
{
path: 'pay/:lessonId',
component: resolve => require(['@/views/components/pay/index'], resolve),
component: Pay,
hidden: true
},
{
// 开始考试
path: 'questionDetail/:examQuestionId',
component: resolve => require(['@/views/exam/detail/questionDetail'], resolve),
component: ExamQuestionDetail,
hidden: true
},
{
// 考试结果
path: 'result/:userExamId',
component: resolve => require(['@/views/exam/result'], resolve),
component: ExamResult,
hidden: true
}
]
@ -463,26 +552,26 @@ export const asyncRouter = [
{
path: '/demonstration',
redirect: '/demonstration/home',
component: resolve => require(['@/views/demonstration/index'], resolve),
component: Demonstration,
meta: {
roles: [admin, userSimulation, user]
},
children: [
{
path: 'home',
component: resolve => require(['@/views/demonstration/home'], resolve),
component: DemonstrationHome,
meta: {
i18n: 'router.demonstrationSystem'
}
},
{
path: 'detail/:mapId',
component: resolve => require(['@/views/demonstration/detail/index'], resolve),
component: DemonstrationDetail,
hidden: true
},
{
path: 'pay/:lessonId',
component: resolve => require(['@/views/components/pay/index'], resolve),
component: Pay,
hidden: true
}
]
@ -490,14 +579,14 @@ export const asyncRouter = [
{
path: '/dp',
redirect: '/dp/home',
component: resolve => require(['@/views/screenMonitor/index'], resolve),
component: ScreenMonitor,
meta: {
roles: [admin, userScreen, user]
},
children: [
{
path: 'home',
component: resolve => require(['@/views/screenMonitor/home'], resolve),
component: ScreenMonitorHome,
meta: {
i18n: 'router.dpSystem'
},
@ -505,19 +594,19 @@ export const asyncRouter = [
},
{
path: 'detail/:lessonId',
component: resolve => require(['@/views/screenMonitor/detail/index'], resolve),
component: ScreenMonitorDetail,
hidden: true
},
{
path: 'pay/:lessonId',
component: resolve => require(['@/views/components/pay/index'], resolve),
component: Pay,
hidden: true
}
]
},
{
path: '/plan/tool',
component: resolve => require(['@/views/planMonitor/editTool/index'], resolve),
component: PlanMonitorEditTool,
meta: {
},
hidden: true
@ -525,14 +614,14 @@ export const asyncRouter = [
{
path: '/plan',
redirect: '/plan/home',
component: resolve => require(['@/views/planMonitor/index'], resolve),
component: PlanMonitor,
meta: {
roles: [admin, user]
},
children: [
{
path: 'home',
component: resolve => require(['@/views/planMonitor/home'], resolve),
component: PlanMonitorHome,
meta: {
i18n: 'router.planSystem'
},
@ -540,12 +629,12 @@ export const asyncRouter = [
},
{
path: 'detail/:lessonId',
component: resolve => require(['@/views/planMonitor/detail'], resolve),
component: PlanMonitorDetail,
hidden: true
},
{
path: 'pay/:lessonId',
component: resolve => require(['@/views/components/pay/index'], resolve),
component: Pay,
hidden: true
}
]
@ -559,7 +648,7 @@ export const asyncRouter = [
children: [
{
path: 'manage',
component: resolve => require(['@/views/replay/index'], resolve),
component: Replay,
meta: {
i18n: 'router.replayManage'
}
@ -575,14 +664,14 @@ export const asyncRouter = [
children: [
{
path: 'manage',
component: resolve => require(['@/views/package/index'], resolve),
component: Package,
meta: {
i18n: 'router.permissionManage'
}
},
{
path: 'draft',
component: resolve => require(['@/views/package/draft/ruleForm'], resolve),
component: PackageDraft,
hidden: true
}
]
@ -597,78 +686,78 @@ export const asyncRouter = [
children: [
{
path: 'map',
component: resolve => require(['@/views/publish/publishMap/index'], resolve),
component: PublishMap,
meta: {
i18n: 'router.publishMapManage'
}
},
{
path: 'product',
component: resolve => require(['@/views/publish/productStatus/index'], resolve),
component: ProductStatus,
meta: {
i18n: 'router.productStateManage'
}
},
{
path: 'lesson',
component: resolve => require(['@/views/publish/publishLesson/index'], resolve),
component: PublishLesson,
meta: {
i18n: 'router.publishLessonManage'
}
},
// {
// path: 'script',
// component: resolve => require(['@/views/publish/simulationScript/index'], resolve),
// component: SimulationScript,
// meta: {
// title: '仿真脚本管理',
// }
// },
{
path: 'runPlan/template',
component: resolve => require(['@/views/publish/runPlanTemplate/index'], resolve),
component: RunPlanTemplate,
meta: {
i18n: 'router.runPlanTemplateManage'
}
},
{
path: 'runPlan/common',
component: resolve => require(['@/views/publish/runPlanCommon/index'], resolve),
component: RunPlanCommon,
meta: {
i18n: 'router.runPlanCommonManage'
}
},
{
path: 'runPlan/everyDay',
component: resolve => require(['@/views/publish/runPlanEveryDay/index'], resolve),
component: RunPlanEveryDay,
meta: {
i18n: 'router.runPlanEveryDayManage'
}
},
{
path: 'examRule/manage',
component: resolve => require(['@/views/publish/examRule/index'], resolve),
component: PublishExamRule,
meta: {
i18n: 'router.examRuleManage'
}
},
{
path: 'map/draft/:mode/:mapId',
component: resolve => require(['@/views/publish/publishMap/draft'], resolve),
component: PublishMapDraft,
hidden: true
},
{
path: 'examRule/draft/:mode/:ruleId/:lessonId',
component: resolve => require(['@/views/publish/examRule/draft/index'], resolve),
component: PublishExamRuleDraft,
hidden: true
},
{
path: 'runPlan/common/:mode',
component: resolve => require(['@/views/publish/runPlanCommon/draft'], resolve),
component: RunPlanCommonDraft,
hidden: true
},
{
path: 'runPlan/view/:mode',
component: resolve => require(['@/views/map/runplan/chart'], resolve),
component: RunplanView,
hidden: true
}
]
@ -683,28 +772,28 @@ export const asyncRouter = [
children: [
{
path: 'commodity/manage',
component: resolve => require(['@/views/orderauthor/commodity/index'], resolve),
component: Commodity,
meta: {
i18n: 'router.commodityManage'
}
},
{
path: 'order/manage',
component: resolve => require(['@/views/orderauthor/order/list'], resolve),
component: OrderList,
meta: {
i18n: 'router.orderManage'
}
},
{
path: 'author/manage',
component: resolve => require(['@/views/orderauthor/author/index'], resolve),
component: Author,
meta: {
i18n: 'router.authorityManage'
}
},
{
path: 'transfer/manage',
component: resolve => require(['@/views/orderauthor/permission/index'], resolve),
component: Permission,
meta: {
i18n: 'router.authorityTransferManage'
}
@ -712,7 +801,7 @@ export const asyncRouter = [
{
path: 'commodity/draft/:mode/:commodityId',
hidden: true,
component: resolve => require(['@/views/orderauthor/commodity/draft'], resolve),
component: CommodityDraft,
meta: {
i18n: 'router.addCommodity'
}
@ -720,7 +809,7 @@ export const asyncRouter = [
{
path: 'order/draft/:mode/:orderId',
hidden: true,
component: resolve => require(['@/views/orderauthor/order/draft'], resolve),
component: OrderDraft,
meta: {
i18n: 'router.addOrder'
}
@ -728,19 +817,19 @@ export const asyncRouter = [
{
path: 'author/draft/:mode/:userId',
hidden: true,
component: resolve => require(['@/views/orderauthor/author/draft'], resolve),
component: AuthorDraft,
meta: {
i18n: 'router.addCoursePermissions'
}
},
{
path: 'transfer/detail/:permissionId',
component: resolve => require(['@/views/orderauthor/permission/detail'], resolve),
component: PermissionDetail,
hidden: true
},
{
path: 'transfer/package',
component: resolve => require(['@/views/orderauthor/permission/draft/ruleForm'], resolve),
component: PermissionDraft,
hidden: true
}
]
@ -755,7 +844,7 @@ export const asyncRouter = [
children: [
{
path: 'dictionary',
component: resolve => require(['@/views/management/dictionary/index'], resolve),
component: Dictionary,
meta: {
i18n: 'router.dataDictionary'
}
@ -763,42 +852,42 @@ export const asyncRouter = [
{
path: 'dictionary/detail',
hidden: true,
component: resolve => require(['@/views/management/dictionaryDetail/index'], resolve),
component: DictionaryDetail,
meta: {
i18n: 'router.dataDictionaryDetails'
}
},
{
path: 'userManage',
component: resolve => require(['@/views/management/userControl/index'], resolve),
component: UserControl,
meta: {
i18n: 'router.userManage'
}
},
{
path: 'userTrainingManage',
component: resolve => require(['@/views/management/userTraining/index'], resolve),
component: UserTraining,
meta: {
i18n: 'router.userTrainingManage'
}
},
{
path: 'userExamManage',
component: resolve => require(['@/views/management/userExam/index'], resolve),
component: UserExam,
meta: {
i18n: 'router.userExamManage'
}
},
{
path: 'userSimulationManage',
component: resolve => require(['@/views/management/userSimulation/index'], resolve),
component: UserSimulation,
meta: {
i18n: 'router.userSimulationManage'
}
},
{
path: 'existingSimulation',
component: resolve => require(['@/views/management/existingSimulation/index'], resolve),
component: ExistingSimulation,
meta: {
i18n: 'router.existingSimulation'
}

View File

@ -73,13 +73,13 @@ export default {
{ label: 'SHD三联段线', value: '18' },
{ label: 'SHD四联段线', value: '19' }
],
roleType:[
{label:'管理员',value:'Admin'},
{label:'教员',value:'Instructor'},
{label:'行调',value:'Dispatcher'},
{label:'车站',value:'Attendant'},
{label:'观众',value:'Audience'},
{label:'司机',value:'Driver'},
roleType: [
{label: '管理员', value: 'Admin'},
{label: '教员', value: 'Instructor'},
{label: '行调', value: 'Dispatcher'},
{label: '车站', value: 'Attendant'},
{label: '观众', value: 'Audience'},
{label: '司机', value: 'Driver'}
],
SimulationType: [
@ -88,14 +88,14 @@ export default {
{ label: '综合演练', value: 'Joint'},
{ label: '大屏', value: 'BigScreen'},
{ label: '琏计划', value: 'RunPlan'},
{ label: '任务录制', value: 'ScriptRecord'},
{ label: '任务录制', value: 'ScriptRecord'}
],
skinCode: [
{ label: '福州一号线', value: '02'},
{ label: '北京一号线', value: '03'},
{ label: '成都三号线', value: '04'},
{ label: '北京八通线', value: '05'},
{ label: '北京八通线', value: '05'}
]
}

View File

@ -1,4 +1,5 @@
import deviceType from '@/jmap/constant/deviceType';
import { parser } from '@/jmap/utils/parser';
import Vue from 'vue';
/**
@ -190,7 +191,9 @@ const map = {
state: {
map: null, // 地图数据
mapDevice: {}, // 解析后的地图数据
mapList: {}, // 地图数据列表
mapIdList: {}, // 地图数据列表(以id为标识)
mapViewLoadedCount: 0, // 地图视图加载完成标识
mapDataLoadedCount: 0, // 地图数据加载完成标识
trainDetails: null // 地图'列车详情'显示
@ -351,26 +354,22 @@ const map = {
trainDetails: (state) => {
return state.trainDetails;
},
getDeviceByCode: () => (code) => {
if (Vue.prototype.$jlmap) {
return Vue.prototype.$jlmap.getDeviceByCode(code);
}
getDeviceByCode: (state) => (code) => {
return state.mapDevice[code];
},
// 查询区段关联的计数器
getCounterBySectionCode: (state) => (code, type) => {
let device = null;
if (Vue.prototype.$jlmap) {
var section = Vue.prototype.$jlmap.mapDevice[code];
var section = state.mapDevice[code];
if (section) {
state.map.counterList.forEach(counter => {
if (counter.stationCode === section.model.stationCode && type == counter.type) {
device = Vue.prototype.$jlmap.mapDevice[counter.code];
device = state.mapDevice[counter.code];
return;
}
});
}
}
return device;
},
@ -378,29 +377,27 @@ const map = {
// 查询信号机关联的计数器
getCounterBySingalCode: (state) => (code, type) => {
let device = null;
if (Vue.prototype.$jlmap) {
var signal = Vue.prototype.$jlmap.mapDevice[code];
var signal = state.mapDevice[code];
if (signal) {
state.map.counterList.forEach(counter => {
if (counter.stationCode === signal.model.stationCode && type == counter.type) {
device = Vue.prototype.$jlmap.mapDevice[counter.code];
device = state.mapDevice[counter.code];
return;
}
});
}
}
return device;
},
// 查询所属车站关联的控制模式
getStationControlByStationCode: (state) => (code) => {
let device = null;
if (Vue.prototype.$jlmap && code &&
if (code &&
state.map &&
state.map.stationControlList && state.map.stationControlList.length) {
state.map.stationControlList.forEach(elem => {
if (elem.stationCode == code) {
device = Vue.prototype.$jlmap.mapDevice[elem.code];
device = state.mapDevice[elem.code];
}
});
}
@ -411,7 +408,12 @@ const map = {
mutations: {
setMapData: (state, map) => {
if (map && map.skinVO) {
state.map = map;
state.mapDevice = parser(map, map.skinVO.code);
} else {
state.mapDevice = {};
}
},
mapRender: (state, devices) => {
Vue.prototype.$jlmap && Vue.prototype.$jlmap.render(devices);
@ -450,6 +452,7 @@ const map = {
},
mapClear: (state) => {
state.map = null;
state.mapDevice = {};
Vue.prototype.$jlmap && Vue.prototype.$jlmap.clear();
}
},
@ -474,6 +477,10 @@ const map = {
}
},
setMapDataIdList: ({ state }, data) => {
state.mapIdList[`mapDate_${data.mapId}`] = data.mapData;
},
updateMapDevices: ({ commit }, models) => {
return new Promise((resolve) => {
if (!(models instanceof Array)) {

View File

@ -63,7 +63,7 @@ function convertRouterRoles({ roles, permissionType }) {
*/
function filterAsyncRouter(asyncRouter, roles, parentsRoles) {
return asyncRouter.filter(route => {
if (route.name === '大屏系统' && roles.indexOf(admin)===-1 && roles.indexOf(userScreen) ===-1){
if (route.name === '大屏系统' && roles.indexOf(admin)===-1 && roles.indexOf(userScreen) ===-1) {
route.hidden = true;
}
if (hasPermission(roles, route, parentsRoles)) {

View File

@ -11,7 +11,8 @@ const runPlan = {
planUpdateCount: 0, // 运行图更新标识
selected: {}, // 选择的对象
width: 800, // 运行图canvas 容器 宽度
height: 600 // 运行图canvas 容器 高度
height: 600, // 运行图canvas 容器 高度
refreshCount: 0 // 刷新页面重新加载
},
getters: {
stations: (state) => {
@ -95,6 +96,9 @@ const runPlan = {
state.planData = {};
state.editData = {};
state.selected = {};
},
refresh: (state) => {
state.refreshCount++;
}
},
actions: {
@ -130,6 +134,10 @@ const runPlan = {
/** 清空数据*/
clear: ({ commit }) => {
commit('clear');
},
/** 刷新页面*/
refresh: ({commit}) => {
commit('refresh');
}
}
};

View File

@ -100,8 +100,8 @@ const user = {
return new Promise((resolve, reject) => {
// 设置user域token值
commit(token.key, token.value);
// let header = { group: '', 'X-Token': token.value };
// creatSubscribe(perpetualTopic, header);
const header = { group: '', 'X-Token': token.value };
creatSubscribe(perpetualTopic, header);
// 获取用户参数
dispatch('GetUserConfigInfo').then(response => {
resolve(response);

View File

@ -1,5 +1,9 @@
/* eslint-disable */
require('script-loader!file-saver');
require('script-loader!@/utils/Blob');
import XLSX from 'xlsx';
import { translate } from '@/scripts/translate';
function generateArray(table) {
var out = [];
@ -81,7 +85,6 @@ function sheet_from_array_of_arrays(data, opts) {
if (range.s.c < 10000000) ws['!ref'] = XLSX.utils.encode_range(range);
return ws;
}
function encode_row(row) { return "" + (row + 1); };
function encode_col(col) { var s = ""; for (++col; col; col = Math.floor((col - 1) / 26)) s = String.fromCharCode(((col - 1) % 26) + 65) + s; return s; }
function safe_format_cell(cell, v) {
@ -179,7 +182,6 @@ export function sheet_to_json(sheet, opts) {
out.length = outi;
return out;
}
function safe_decode_range(range) {
var o = { s: { c: 0, r: 0 }, e: { c: 0, r: 0 } };
var idx = 0, i = 0, cc = 0;
@ -227,12 +229,14 @@ function s2ab(s) {
export function export_table_to_excel(id) {
var theTable = document.getElementById(id);
console.log('a')
var oo = generateArray(theTable);
var ranges = oo[1];
/* original data */
var data = oo[0];
var ws_name = "SheetJS";
console.log(data);
var wb = new Workbook(), ws = sheet_from_array_of_arrays(data);
@ -249,6 +253,9 @@ export function export_table_to_excel(id) {
saveAs(new Blob([s2ab(wbout)], { type: "application/octet-stream" }), "test.xlsx")
}
function formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => v[j]))
}
export function export_json_to_excel(th, jsonData, defaultTitle) {
/* original data */
@ -268,3 +275,43 @@ export function export_json_to_excel(th, jsonData, defaultTitle) {
var title = defaultTitle || '列表'
saveAs(new Blob([s2ab(wbout)], { type: "application/octet-stream" }), title + ".xlsx")
}
export function export_json_excel(jsonData, defaultTitle) {
let data = jsonData;
let wb = new Workbook();
for (let index in data) {
let filterVal = handelData(index);
if (filterVal.tHeader.length) {
let dataDetail = formatJson(filterVal.tHeaderF, data[index]);
dataDetail.unshift(filterVal.tHeader); // 设置表头的
let ws = sheet_from_array_of_arrays(dataDetail);
/* add worksheet to workbook */
let title = translate[index].sheetName || index;
wb.SheetNames.push(title);
wb.Sheets[`${title}`] = ws;
}
}
let wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: false, type: 'binary' });
var title = defaultTitle || '列表'
saveAs(new Blob([s2ab(wbout)], { type: "application/octet-stream" }), title + ".xlsx")
}
// 转换数据格式
function handelData(key) {
let tHeader = [];
let tHeaderF = [];
if (translate[key]) {
translate[key].columns.forEach(item => {
tHeader.push(item.tHeader);
tHeaderF.push(item.key);
});
}
let filterVal = {
tHeader: tHeader,
tHeaderF: tHeaderF,
};
return filterVal;
}

View File

@ -1,5 +1,5 @@
import store from '@/store';
import { getPublishMapVersion, getPublishMapDetail } from '@/api/jmap/map';
import { getPublishMapVersion, getPublishMapDetail,getPublishMapVersionById,getPublishMapDetailById} from '@/api/jmap/map';
// 获取地图版本数据和store里面的map版本做比较如果不同
// 获取发布的地图数据
@ -34,3 +34,33 @@ export function loadMapData(skinStyle) {
});
});
}
export function loadMapDataById(mapId) {
return new Promise((resolve, reject) => {
getPublishMapVersionById(mapId).then(resp => {
var version = resp.data;
var mapData = store.state.map.mapIdList[`mapDate_${mapId}`];
if (mapData && mapData.version == version) {
store.dispatch('map/setMapData', mapData).then(() => {
store.dispatch('map/clearJlmapTrainView').then(() => {
resolve();
});
});
} else {
getPublishMapDetailById(mapId).then(res => {
mapData = res.data;
store.dispatch('map/setMapDataIdList', {mapData, mapId});
store.dispatch('map/setMapData', mapData).then(() => {
store.dispatch('map/clearJlmapTrainView').then(() => {
resolve();
});
});
}).catch(error => {
reject(error);
});
}
}).catch(error => {
reject(error);
});
});
}

View File

@ -1,3 +1,6 @@
import store from '@/store';
import { timeFormat } from '@/utils/date';
/** 创建一个车次数据点*/
export function createMartPoint(opt) {
const rotate = opt.directionCode === '2' ? 45 : (opt.directionCode === '1' ? -45 : 0);
@ -218,19 +221,6 @@ export function ascToNum(asc) {
return num;
}
/** 将时间格式化前补零*/
export function formatTime(time) {
let str = `${time}` || '';
if (str) {
const list = str.split(':');
str = list.map(elem => {
return `00000${elem}`.substr(-2);
}).join(':');
}
return str;
}
/** 根据索引获取单元格的数据*/
export function getCellValue(Sheet, index) {
let value;
@ -280,3 +270,35 @@ export function convertSheetToList(Sheet, isReverse) {
return dataList;
}
/** 通过time将时间格式化*/
export function formatTime(time) {
if (Number.isInteger(time)) {
return timeFormat(time);
} else {
return '';
}
}
/** 通过code将名称格式化*/
export function formatName(code) {
let name = '';
const device = store.getters['map/getDeviceByCode'](code);
if (device) {
name = device.name;
}
return name;
}
/** 将时间格式化前补零*/
export function prefixTime(time) {
let str = `${time}` || '';
if (str) {
const list = str.split(':');
str = list.map(elem => {
return `00000${elem}`.substr(-2);
}).join(':');
}
return str;
}

View File

@ -1,12 +1,11 @@
import { handleToken } from '@/utils/auth';
import { checkLoginLine } from '@/api/login';
import { getBaseUrl } from '@/utils/baseUrl'
import { getBaseUrl } from '@/utils/baseUrl';
var SockJS = require('sockjs-client');
var Stomp = require('stompjs');
const isDev = process.env.NODE_ENV === 'development';
const isTest = process.env.NODE_ENV === 'test';
const websocketUrl = `${getBaseUrl()}/joylink-websocket?token=`;
var StompClient = function (headers) {
@ -29,7 +28,7 @@ StompClient.prototype = {
sockStatus: 0,
headers: {
'X-Token': handleToken(),
'X-Token': handleToken()
},
count: 0,
@ -59,7 +58,7 @@ StompClient.prototype = {
this.closeStompDebug();
// 向服务器发起websocket连接并发送CONNECT帧
this.clientIns.connect({ 'X-Token': handleToken(), }, () => {
this.clientIns.connect({ 'X-Token': handleToken() }, () => {
console.info('连接成功.');
this.count = 0;
this.status = true;
@ -129,7 +128,7 @@ StompClient.prototype = {
closeStompDebug() {
if (this.clientIns) {
this.clientIns.debug = undefined;
if (isDev || isTest) {
if (isDev) {
this.clientIns.debug = function (message) {
console.debug(message);
};
@ -168,11 +167,11 @@ StompClient.prototype = {
unsubscribe(topic) {
if (this.subscribeMap) {
let subscription = this.subscribeMap.get(topic);
const subscription = this.subscribeMap.get(topic);
if (subscription) {
subscription.unsubscribe();
this.subscribeMap.delete(topic);
console.log("取消订阅");
console.log('取消订阅');
}
}
},
@ -204,7 +203,7 @@ StompClient.prototype = {
this.clientIns = null;
}
this.status = false;
console.log("断开连接");
console.log('断开连接');
}
};

View File

@ -211,7 +211,7 @@
top: 0px;
width: 60px;
height: 60px;
-webkit-transform: rotate(180deg);
transform: rotate(180deg);
-moz-transform: rotate(180deg);
-ms-transform: rotate(180deg);
-o-transform: rotate(180deg);
@ -231,7 +231,7 @@
top: 35%;
margin-top: -1.5px;
left: 16px;
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-moz-transform-origin: 0% 50%;
-ms-transform-origin: 0% 50%;
-o-transform-origin: 0% 50%;
@ -248,7 +248,7 @@
background: #fff;
position: absolute;
left: 0px;
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-moz-transform-origin: 0% 50%;
-ms-transform-origin: 0% 50%;
-o-transform-origin: 0% 50%;
@ -303,14 +303,14 @@
}
&.active {
-webkit-transform: rotate(0deg) !important;
transform: rotate(0deg) !important;
-moz-transform: rotate(0deg) !important;
-ms-transform: rotate(0deg) !important;
-o-transform: rotate(0deg) !important;
transform: rotate(0deg) !important;
.menu {
-webkit-transform: scale(0.7);
transform: scale(0.7);
-moz-transform: scale(0.7);
-ms-transform: scale(0.7);
-o-transform: scale(0.7);
@ -321,24 +321,24 @@
margin-top: -1.5px;
left: 50%;
margin-left: -12px;
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-moz-transform-origin: 50% 50%;
-ms-transform-origin: 50% 50%;
-o-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-transform: rotate(405deg);
transform: rotate(405deg);
-moz-transform: rotate(405deg);
-ms-transform: rotate(405deg);
-o-transform: rotate(405deg);
transform: rotate(405deg);
&:before {
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-moz-transform-origin: 50% 50%;
-ms-transform-origin: 50% 50%;
-o-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-transform: rotate(-450deg);
transform: rotate(-450deg);
-moz-transform: rotate(-450deg);
-ms-transform: rotate(-450deg);
-o-transform: rotate(-450deg);
@ -358,23 +358,23 @@
0%,
100% {
-webkit-transform: translateY(0px);
transform: translateY(0px);
}
10% {
-webkit-transform: translateY(6px);
transform: translateY(6px);
}
30% {
-webkit-transform: translateY(-4px);
transform: translateY(-4px);
}
70% {
-webkit-transform: translateY(3px);
transform: translateY(3px);
}
90% {
-webkit-transform: translateY(-2px);
transform: translateY(-2px);
}
}
@ -406,7 +406,7 @@
0%,
100% {
-webkit-transform: translateY(0px);
transform: translateY(0px);
-moz-transform: translateY(0px);
-ms-transform: translateY(0px);
-o-transform: translateY(0px);
@ -414,7 +414,7 @@
}
10% {
-webkit-transform: translateY(6px);
transform: translateY(6px);
-moz-transform: translateY(6px);
-ms-transform: translateY(6px);
-o-transform: translateY(6px);
@ -422,7 +422,7 @@
}
30% {
-webkit-transform: translateY(-4px);
transform: translateY(-4px);
-moz-transform: translateY(-4px);
-ms-transform: translateY(-4px);
-o-transform: translateY(-4px);
@ -430,7 +430,7 @@
}
70% {
-webkit-transform: translateY(3px);
transform: translateY(3px);
-moz-transform: translateY(3px);
-ms-transform: translateY(3px);
-o-transform: translateY(3px);
@ -438,7 +438,7 @@
}
90% {
-webkit-transform: translateY(-2px);
transform: translateY(-2px);
-moz-transform: translateY(-2px);
-ms-transform: translateY(-2px);
-o-transform: translateY(-2px);

View File

@ -255,10 +255,17 @@
}
};
} else {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
if (this.courseModel.pmsList.length) {
this.jump();
} else {
if (this.tryTime <= 1) {
this.loading.close();
this.$confirm('您没有权限,请前往购买产品', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',

View File

@ -15,7 +15,7 @@
</div>
<div class="brief-box">城市轨道交通仿真系统以各地铁信号系统为基础针对培训部分进行改造旨在构建一套用于行车演示的专业仿真模拟系统
该系统具有高灵活性以便于将来的扩展升级同时仿真系统具备正常操作及故障操作两种模式除了正常的功能操作以外还可以进行设备的故障模拟</div>
{{ $t('hello') }}
{{ $t('lesson.content') }}
</el-scrollbar>
</div>
</el-card>

View File

@ -79,7 +79,8 @@ import { runDiagramQuit, loadQuest, getSimulationInfo } from '@/api/simulation';
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
import { checkLoginLine } from '@/api/login';
// import { isFullscreen } from '@/utils/screen';
import { loadMapData } from '@/utils/loaddata';
import { loadMapData,loadMapDataById } from '@/utils/loaddata';
import { getPublishMapInfo } from '@/api/jmap/map';
// import { handleToken } from '@/utils/auth';
import { EventBus } from '@/scripts/event-bus';
import Vue from 'vue';
@ -196,6 +197,13 @@ export default {
},
async created() {
this.group = this.$route.query.group || '';
const loading = this.$loading({
lock: true ,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
loading.close();
},
async mounted() {
this.mode = this.$route.params.mode;
@ -415,10 +423,9 @@ export default {
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); //
this.switchMode('01');
const skinStyle = this.$route.query.skinStyle;
if (parseInt(skinStyle)) {
await this.loadMapData(skinStyle);
const mapId = this.$route.query.mapId;
if (parseInt(mapId)) {
await this.loadMapDataById(mapId);
} else {
this.endViewLoading();
}
@ -474,6 +481,19 @@ export default {
this.endViewLoading();
}
},
// id
async loadMapDataById(mapId)
{
try {
await loadMapDataById(mapId);
await this.$store.dispatch('training/setMapDefaultState');
} catch (error) {
this.$messageBox(`获取地图数据失败: ${error.message}`);
this.endViewLoading();
}
},
// 仿
async quit() {
await runDiagramQuit(this.group);

View File

@ -265,7 +265,7 @@
font-size: 15px;
}
.actionInfo{
margin-top: 30px;
margin-top:20px;
margin-left: 5px;
font-size: 15px;
width:98%;

View File

@ -7,7 +7,7 @@
</el-form>
<el-table
:data="ConditionVOList" border style="margin-top:10px;margin-left:10px;width:901px">
<el-table-column label="设备类型" width="150">
<el-table-column :label="$t('scriptRecord.deviceType')" width="150">
<template slot-scope="scope">
<div v-if="scope.row.isAdded">{{scope.row.deviceType}}</div>
<el-select v-else v-model="scope.row.deviceType" placeholder="请选择" @change="changeDeviceType($event,scope.row)">
@ -15,7 +15,7 @@
</el-select>
</template>
</el-table-column>
<el-table-column label="设备编号" width="150">
<el-table-column :label="$t('scriptRecord.deviceCode')" width="150">
<template slot-scope="scope">
<div v-if="scope.row.isAdded">{{scope.row.code}}</div>
<el-select v-else v-model="scope.row.code" placeholder="请选择">
@ -23,7 +23,7 @@
</el-select>
</template>
</el-table-column>
<el-table-column label="设备条件" width="150">
<el-table-column :label="$t('scriptRecord.deviceCondition')" width="150">
<template slot-scope="scope">
<div v-if="scope.row.isAdded">{{scope.row.condition}}</div>
<el-select v-else v-model="scope.row.condition" placeholder="请选择">
@ -31,7 +31,7 @@
</el-select>
</template>
</el-table-column>
<el-table-column label="参数设备类型" width="150">
<el-table-column :label="$t('scriptRecord.paramDeviceType')" width="150">
<template slot-scope="scope">
<div v-if="scope.row.isAdded">{{scope.row.paramDeviceType}}</div>
<el-select v-else v-model="scope.row.paramDeviceType" placeholder="请选择" @change="changeParamDeviceType">
@ -39,7 +39,7 @@
</el-select>
</template>
</el-table-column>
<el-table-column label="参数设备编号" width="150">
<el-table-column :label="$t('scriptRecord.paramDeviceCode')" width="150">
<template slot-scope="scope">
<div v-if="scope.row.isAdded">{{scope.row.paramCode}}</div>
<el-select v-else v-model="scope.row.paramCode" placeholder="请选择">
@ -47,7 +47,7 @@
</el-select>
</template>
</el-table-column>
<el-table-column label="操作" width="150">
<el-table-column :label="$t('scriptRecord.operation')" width="150">
<template slot-scope="scope">
<el-row v-if="scope.row.isAdded">
<el-button type="primary" size="mini" @click="deleteOperate(scope.$index)">删除</el-button>

View File

@ -1,10 +1,11 @@
<template>
<div class="tab-pane-big">
<el-scrollbar wrapClass="scrollbar-wrapper" ref="elActionScrollbar">
<div>
<div class="actionList">
<i class="el-icon-back" @click="backToMember"></i>
<span class="titleStyle">{{memberName}}角色<span class="titleStyle">/</span><span class="titleStyle">{{behaviorName}}行为</span><span class="titleStyle">/</span><span class="titleStyle">动作信息</span></span>
</div>
<div class="tab-pane-big">
<el-scrollbar wrapClass="scrollbar-wrapper" ref="elActionScrollbar">
<add-action ref="addBehavior" :group="group" :memberId="memberId" :behaviorId="behaviorId" @create="create" :buttonName="buttonName" :operateType="operateType" @modifyButtonName="modifyButtonName"></add-action>
<el-table
v-loading="loading"
@ -26,6 +27,7 @@
</el-table>
</el-scrollbar>
</div>
</div>
</template>
<script>
import Vue from 'vue';
@ -120,11 +122,15 @@
width:802px;
}
.actionList{
margin-top: 20px;
margin-top: 10px;
margin-left: 5px;
font-size: 15px;
margin-bottom:10px;
}
.titleStyle{
margin-left:10px;
}
.tab-pane-big{
height:380px;
}
</style>

View File

@ -1,10 +1,11 @@
<template>
<div class="tab-pane-big">
<el-scrollbar wrapClass="scrollbar-wrapper" ref="elScrollbar">
<div>
<div class="behaviorList">
<i class="el-icon-back" @click="backToMember" style="cursor:pointer;"></i>
<span class="titleStyle">{{memberName}}角色<span class="titleStyle">/</span><span class="titleStyle">行为信息</span></span>
</div>
<div class="tab-pane-big">
<el-scrollbar wrapClass="scrollbar-wrapper" ref="elScrollbar">
<add-behavior ref="addBehavior" :title="title" :group="group" :memberId="memberId" @create="handleCreate" :operateType="operateType" :buttonName="buttonName" @modifyButtonName="modifyButtonName"></add-behavior>
<div class="behaviorList">行为列表</div>
<el-table
@ -42,6 +43,7 @@
</el-table>
</el-scrollbar>
</div>
</div>
</template>
<script>
import Vue from 'vue';
@ -131,7 +133,7 @@
width:901px;
}
.behaviorList{
margin-top: 20px;
margin-top: 10px;
margin-left: 5px;
font-size: 15px;
margin-bottom:20px;
@ -140,6 +142,6 @@
margin-left:10px;
}
.tab-pane-big{
height:420px;
height:370px;
}
</style>

View File

@ -1,20 +1,20 @@
<template>
<el-tabs v-model="activeName" type="card">
<el-tab-pane label="角色管理" name="first">
<el-tab-pane :label="$t('scriptRecord.roleManage')" name="first">
<div class="tab-pane">
<el-scrollbar wrapClass="scrollbar-wrapper">
<role-section ref="roleSection" :group="group" @getBehaviorList="getBehaviorList"></role-section>
</el-scrollbar>
</div>
</el-tab-pane>
<el-tab-pane label="任务目标" name="second">
<el-tab-pane :label="$t('scriptRecord.targetCondition')" name="second">
<div class="tab-pane">
<el-scrollbar wrapClass="scrollbar-wrapper">
<target-condition ref="targetCondition" :group="group"></target-condition>
</el-scrollbar>
</div>
</el-tab-pane>
<el-tab-pane label="任务剧本" name="third">
<el-tab-pane :label="$t('scriptRecord.taskScript')" name="third">
<div class="tab-pane">
<el-scrollbar wrapClass="scrollbar-wrapper">
<task-script ref="taskScript" :group="group"></task-script>
@ -60,7 +60,6 @@
this.$store.dispatch('scriptRecord/updateDeviceCondition', deviceConditionList);
this.$store.dispatch('scriptRecord/updateMemberList', response.data.memberVOList);
this.$store.dispatch('scriptRecord/updateScript', response.data.script);
debugger;
if(response.data.mapLocation)
{
let mapLocation={"offsetX":response.data.mapLocation.x,"offsetY":response.data.mapLocation.y,"scaleRate":response.data.mapLocation.scale};

View File

@ -1,35 +1,34 @@
<template>
<div>
<el-form :model="memberVO" ref="memberVO" :rules="rules" label-width="80px" class="roleAction" label-position="left">
<el-form-item label="角色名称" class="conditionVO" prop="name">
<el-form :model="memberVO" ref="memberVO" :rules="rules" label-width="100px" class="roleAction" label-position="right">
<el-form-item :label="$t('scriptRecord.roleName')" class="conditionVO" prop="name">
<el-input v-model="memberVO.name" class="inputStyle"></el-input>
</el-form-item>
<el-form-item label="角色类型" class="conditionVO" prop="role">
<el-form-item :label="$t('scriptRecord.roleType')" class="conditionVO" prop="role">
<el-select v-model="memberVO.role" placeholder="请选择角色类型" @change="changeRoleType">
<el-option v-for="rolerType in roleTypeList" :key="rolerType.label" :label="rolerType.label" :value="rolerType.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="设备编码" class="conditionVO">
<el-form-item :label="$t('scriptRecord.deviceCode')" class="conditionVO">
<el-select v-model="memberVO.deviceCode" clearable placeholder="请选择设备编码">
<!-- groupNumber -->
<el-option v-for="deviceCode in deviceCodeList" :key="deviceCode.code" :label="deviceCode.name" :value="deviceCode.code"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="addQuestMember('memberVO')">添加</el-button>
<el-button type="primary" @click="addQuestMember('memberVO')">{{$t('scriptRecord.roleAdd')}}</el-button>
</el-form-item>
</el-form>
<div class="roleList">角色列表</div>
<div class="roleList">{{$t('scriptRecord.roleList')}}</div>
<el-table
v-loading="loading"
:data="memberList" border class="memberList">
<el-table-column prop="name" label="角色名称" width="350">
<el-table-column prop="name" :label="$t('scriptRecord.roleName')" width="350">
</el-table-column>
<el-table-column label="操作" width="350">
<el-table-column :label="$t('scriptRecord.operation')" width="350">
<template slot-scope="scope">
<el-row>
<el-button type="primary" size="mini" @click="getMembers(scope.row)">行为操作</el-button>
<el-button type="primary" size="mini" @click="deleteMember(scope.$index,scope.row)">删除</el-button>
<el-button type="primary" size="mini" @click="getMembers(scope.row)">{{$t('scriptRecord.behaviorOperate')}}</el-button>
<el-button type="primary" size="mini" @click="deleteMember(scope.$index,scope.row)">{{$t('scriptRecord.delete')}}</el-button>
</el-row>
</template>
</el-table-column>
@ -88,7 +87,6 @@
let group=this.group;
postQuestMember(group,data).then(resp => {
this.reloadTable();
// this.dialogFormVisible=false;
this.memberVO.role="Admin";
this.memberVO.deviceCode="";
this.memberVO.name="";
@ -119,6 +117,7 @@
let group=this.group;
getQuestRecord(group).then(response=>{
this.memberList=response.data.memberVOList;
this.$store.dispatch('scriptRecord/updateScript', response.data.script);
this.$store.dispatch('scriptRecord/updateMemberList', response.data.memberVOList);
});
},

View File

@ -40,7 +40,7 @@
data(){
return{
deviceConditionList:[],
conditionTitle:"目标条件",
conditionTitle:this.$t("scriptRecord.conditionTitle"),
isAdding:false,
// fieldS:"",
}

View File

@ -66,6 +66,8 @@
},
watch: {
'$store.state.scriptRecord.memberList': function (val, old){
this.taskScript.memberId="";
this.taskScript.behavior="";
this.taskScriptList=val;
},
'$store.state.scriptRecord.script': function (val, old){

View File

@ -20,9 +20,9 @@
<get-action ref="getAction" :group="group" :memberId="memberId" :behaviorId="behaviorId" @backToBehavior="backToBehavior"></get-action>
</template>
<el-button-group class="button-group">
<el-button type="primary" @click="saveMaplocation">更新定位</el-button>
<el-button type="primary" @click="saveScenesStage">保存背景</el-button>
<el-button type="success" @click="saveScenesData">保存数据</el-button>
<el-button type="primary" @click="saveMaplocation">{{$t('scriptRecord.saveMaplocation')}}</el-button>
<el-button type="primary" @click="saveScenesStage">{{$t('scriptRecord.saveBackground')}}</el-button>
<el-button type="success" @click="saveScenesData">{{$t('scriptRecord.saveData')}}</el-button>
<!-- <el-button type="danger" @click="dumpScenesData">重置剧本</el-button> -->
</el-button-group>
</div>
@ -55,7 +55,7 @@
},
data() {
return {
title: '任务录制',
title: this.$t('scriptRecord.scriptTitle'),
isShrink: false,
memberId:null,
behaviorId:null,

View File

@ -181,6 +181,7 @@
await this.$store.dispatch('exam/setTotalTime', this.userExam.duration);
await this.$store.dispatch('trainingList/setTrainingList', list);
} catch (error) {
this.loading.close();
//
if (error.code === 500004) {
this.$confirm('无此课程的考试权限,请前往购买!', '提示', {
@ -195,11 +196,16 @@
this.$messageBox('不在考试范围之内');
} else {
this.$messageBox(`${error.message}`);
}
}
},
exmaStart() {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
this.examDetail();
if (this.examList.length) {
examNotify({ examId: this.$route.params.examId }).then(resp => {
@ -208,12 +214,12 @@
trainingId: this.examList[0].trainingId,
userExamId: this.userExam.id,
examQuestionId: this.examList[0].id
}
};
this.$router.push({ path: `${UrlConfig.display}/exam`, query: query });
launchFullscreen();
}).catch(error => {
this.$messageBox(`创建仿真失败: ${error.message}`);
this.loading.close();
})
}
}

View File

@ -1,974 +0,0 @@
/* eslint-disable no-unused-vars */
import Vue from 'vue';
import Router from 'vue-router';
// in development-env not use lazy-loading, because lazy-loading too many pages will cause webpack hot update too slow. so only in production use lazy-loading;
// detail: https://panjiachen.github.io/vue-element-admin-site/#/lazy-loading
Vue.use(Router);
/* Dashboard */
import Dashboard from '@/views/dashboard/index.vue';
/* Layout */
import Layout from '@/views/layout/Layout';
import Login from '@/views/login/index';
import LoginNew from '@/views/login/loginNew';
import Page404 from '@/views/404';
import LoginScreen from '@/views/login/loginScreen';
import LoginNewScreen from '@/views/login/loginNewScreen';
import LoginPlan from '@/views/login/loginPlan';
import LoginNewPlan from '@/views/login/loginNewPlan';
//地图绘制
import MapManage from '@/views/map/mapdraft/index';
import MapEdit from '@/views/map/mapdraft/mapedit/index';
import SkinStyle from '@/views/map/skinStyle/index';
import SkinStyleDraft from '@/views/map/skinStyle/draft';
//列车运行表
import ListPlan from '@/views/map/runplan/index';
//运行图视图
import ViewPlan from '@/views/map/runplan/chart';
//实训管理和编辑
import TrainingManage from '@/views/lesson/trainingrecord/index';
import TrainingEdit from '@/views/lesson/trainingrecord/manage/index';
//产品管理
import TrainingCategory from '@/views/lesson/trainingcategory/index';
import ProductList from '@/views/map/product/list';
import ProductDraft from '@/views/map/product/draft';
//课程管理
import LessonCategory from '@/views/lesson/lessoncategory/index';
//自动生成实训
import TrainingGeneration from '@/views/lesson/trainingmanage/index';
import TrainingRule from '@/views/lesson/trainingRule/list';
import TrainingRuleDetail from '@/views/lesson/trainingRule/detail/index';
//购买页面
import PayPage from '@/views/components/pay/index';
//教学系统
import Teach from '@/views/teach/index';
import TeachHome from '@/views/teach/home';
import TeachDetail from '@/views/teach/detail/index';
import TeachPracticalDetail from '@/views/teach/practical/index';
import TaskManageList from '@/views/lesson/taskmanage/list';
import ScriptManage from '@/views/lesson/scriptmanage/list';
//考试系统
import Exam from '@/views/exam/index';
import ExamHome from '@/views/exam/home';
import ExamDetail from '@/views/exam/detail/examDetail';
import ExamCourseDetail from '@/views/exam/detail/courseDetail';
import ExamQuestionDetail from '@/views/exam/detail/questionDetail';
import ExamResult from '@/views/exam/result';
//考试规则
import ExamRuleList from '@/views/publish/examRule/index';
import ExamRuleDraft from '@/views/publish/examRule/draft/index';
//仿真系统
import Demonstration from '@/views/demonstration/index';
import DemonstrationHome from '@/views/demonstration/home';
import DemonstrationDetail from '@/views/demonstration/detail/index';
//大屏系统
import ScreenMonitor from '@/views/screenMonitor/index';
import ScreenMonitorHome from '@/views/screenMonitor/home';
import ScreenMonitorDetail from '@/views/screenMonitor/detail/index';
//琏计划系统
import PlanMonitor from '@/views/planMonitor/index';
import PlanMonitorHome from '@/views/planMonitor/home';
import PlanMonitorDetail from '@/views/planMonitor/detail';
import PlanEditTool from '@/views/planMonitor/editTool/index';
//回放管理
import replay from '@/views/replay/index';
//权限管理
import PermissionList from '@/views/package/index';
import PermissionDraft from '@/views/package/draft/ruleForm';
// 产品状态管理
import ProductStatus from '@/views/publish/productStatus/index';
// 发布地图管理
import PublishMap from '@/views/publish/publishMap/index';
import PublishMapDraft from '@/views/publish/publishMap/draft';
// 发布课程管理
import PublishLesson from '@/views/publish/publishLesson/index';
// 仿真脚本管理
import SimulationScript from '@/views/publish/simulationScript/index';
// 运行图模板管理
import PlanTemplate from '@/views/publish/runPlanTemplate/index';
import PlanCommon from '@/views/publish/runPlanCommon/index';
import PlanCommonDraft from '@/views/publish/runPlanCommon/draft';
// 运行图每日加载管理
import PlanEveryDay from '@/views/publish/runPlanEveryDay/index';
// 系统字典管理
import Dictionary from '@/views/management/dictionary/index';
import DictionaryDetail from '@/views/management/dictionaryDetail/index';
// 用户考试管理
import UserExam from '@/views/management/userExam/index';
// 用户仿真管理
import UserSimulation from '@/views/management/userSimulation/index';
// 存在仿真管理
import ExistingSimulation from '@/views/management/existingSimulation/index';
// 用户实训管理
import UserTraining from '@/views/management/userTraining/index';
// 用户管理
import UserControl from '@/views/management/userControl/index';
// 商品管理
import commodityList from '@/views/orderauthor/commodity/index';
import CommodityDraft from '@/views/orderauthor/commodity/draft';
//课程权限管理
import LessonPermission from '@/views/orderauthor/author/index';
import LessonPermissionDraft from '@/views/orderauthor/author/draft';
//订单操作
import OrderList from '@/views/orderauthor/order/list';
import OrderDraft from '@/views/orderauthor/order/draft';
import runPlan from '../store/modules/runplan';
//打包管理
import PackageMange from '@/views/orderauthor/permission/index';
import PackageDetail from '@/views/orderauthor/permission/detail';
import PackageDraft from '@/views/orderauthor/permission/draft/ruleForm';
//综合演练
import trainRoom from '@/views/trainRoom/index';
import JointTrainingDraft from '@/views/jointTraining/index';
import ThreeTest from '@/views/jlmap3d/index';//test
import ThreeDrawTest from '@/views/jlmap3d/jlmap3dedit';//test
import Jl3dSimulation from '@/views/jlmap3d/simulation/jl3dsimulation';
export const UrlConfig = {
display: '/display',
examRuleDraft: '/examRule/draft',
examRuleManage: '/examRule/manage',
map: {
prefix: '/map',
draft: '/map/draw',
skinStyle: '/map/skinStyle',
skinStyleDraft: '/map/skinStyle/draft',
runPlan: '/map/runPlan',
runPlanView: '/map/runPlan/view',
product: '/map/product',
productDraft: '/map/product/draft',
},
lesson: {
prefix: '/lesson',
record: '/lesson/record/training',
manage: '/lesson/manage/training'
},
teach: {
prefix: '/teach',
detail: '/teach/detail',
practical: '/teach/practical',
pay: '/teach/pay',
},
exam: {
prefix: '/exam',
detail: '/exam/detail',
course: '/exam/course',
examRuleManage: '/exam/examRule/manage',
pay: '/exam/pay'
},
demonstration: {
prefix: '/demonstration',
detail: '/demonstration/detail',
pay: '/demonstration/pay'
},
dp: {
prefix: '/dp',
detail: '/dp/detail',
pay: '/dp/pay'
},
plan: {
prefix: '/plan',
tool: '/plan/tool',
detail: '/plan/detail',
pay: '/plan/pay'
},
replay: {
prefix: '/replay'
},
permission: {
prefix: '/permission',
permissionList: '/permission/manage',
permissionDraft: '/permission/draft',
permission: '/permission/restore'
},
publish: {
prefix: '/publish',
map: '/publish/map',
mapDraft: '/publish/map/draft',
runPlanEveryDay: '/publish/runPlan/everyDay',
runPlanTemplate: '/publish/runPlan/template',
runPlanCommon: '/publish/runPlan/common',
runPlanView: '/publish/runPlan/view',
},
orderauthor: {
prefix: '/orderauthor',
commodityManage: '/orderauthor/commodity/manage',
commodityDraft: '/orderauthor/commodity/draft',
orderManage: '/orderauthor/order/manage',
orderDraft: '/orderauthor/order/draft',
authorMange: '/orderauthor/author/manage',
authorDraft: '/orderauthor/author/draft',
transferDetail: '/orderauthor/transfer/detail',
trainferPackage: '/orderauthor/transfer/package'
}
};
export const constantRouterMap = [
{ path: '/dp/login', component: resolve => require(['@/views/login/loginNewScreen'], resolve), hidden: true }, //扫码登录
{ path: '/dp/login1', component: resolve => require(['@/views/login/loginScreen'], resolve), hidden: true }, //密码登录
{ path: '/plan/login', component: resolve => require(['@/views/login/loginNewPlan'], resolve), hidden: true }, //扫码登录
{ path: '/plan/login1', component: resolve => require(['@/views/login/loginPlan'], resolve), hidden: true }, //密码登录
{ path: '/login', component: resolve => require(['@/views/login/loginNew'], resolve), hidden: true }, //扫码登录
{ path: '/login1', component: resolve => require(['@/views/login/index'], resolve), hidden: true }, //密码登录
{ path: '/jlmap3d/edit', component: resolve => require(['@/views/jlmap3d/jlmap3dedit'], resolve), hidden: true },
{ path: '/404', component: resolve => require(['@/views/404'], resolve), hidden: true },
{ path: '*', redirect: '/404', hidden: true }
];
export default new Router({
mode: 'history', //后端支持可开
scrollBehavior: () => ({ y: 0 }),
routes: constantRouterMap
});
export const user = '01'; // 普通用户
export const mapCreater = '02'; // 地图创建权限
export const lessonCreater = '03'; // 课程创建权限
export const admin = '04'; // 管理员
export const superAdmin = '05'; // 超级管理员
export const userExam = '011'; // 考试系统
export const userLesson = '012'; // 教学系统
export const userSimulation = '013'; // 仿真系统
export const userScreen = '014'; // 大屏系统
export const userPlan = '015'; // 计划系统
export const asyncRouterMap = [
{
path: '/',
component: resolve => require(['@/views/layout/Layout'], resolve),
redirect: '/dashboard',
name: 'Dashboard',
hidden: true,
children: [
{
path: 'dashboard',
component: resolve => require(['@/views/dashboard/index.vue'], resolve)
},
]
},
{
path: '/display/:mode',
component: resolve => require(['@/views/display/index'], resolve),
meta: {
title: '实训视图'
},
hidden: true
},
{
path: '/trainroom',
component: resolve => require(['@/views/trainRoom/index'], resolve),
meta: {
title: '综合演练房间'
},
hidden: true,
},
{
path: '/jointTraining',
name: '联合演练试图',
component: resolve => require(['@/views/jointTraining/index'], resolve),
hidden: true
},
{
path: '/jlmap3d',
name: '三维test',
component: resolve => require(['@/views/jlmap3d/index'], resolve),
meta: {
title: '三维test'
},
hidden: true
},
{
path: '/map',
name: '地图管理',
meta: {
title: '地图管理',
roles: [admin, mapCreater],
},
component: resolve => require(['@/views/layout/Layout'], resolve),
children: [
{
path: 'skinStyle',
name: '皮肤管理',
component: resolve => require(['@/views/map/skinStyle/index'], resolve),
meta: {
title: '皮肤管理',
},
},
{
path: 'skinStyle/draft/:mode/:skinStyleId',
name: '操作权限',
hidden: true,
component: resolve => require(['@/views/map/skinStyle/draft'], resolve),
meta: {
title: '操作权限'
}
},
{
path: 'draw',
redirect: '/map/draw/0/draft',
component: resolve => require(['@/views/map/mapdraft/index'], resolve),
meta: {
title: '地图绘制',
},
children: [
{
path: ':mapId/:view',
component: resolve => require(['@/views/map/mapdraft/mapedit/index'], resolve),
meta: {
title: '地图绘制',
},
hidden: true
}
]
},
{
path: 'runPlan',
redirect: '/map/runPlan/view/draft',
name: '运行图管理',
component: resolve => require(['@/views/map/runplan/index'], resolve),
meta: {
title: '运行图管理'
},
children: [{
path: 'view/:mode',
component: resolve => require(['@/views/map/runplan/chart'], resolve),
hidden: true
}],
},
{
path: 'product',
name: '产品编辑',
component: resolve => require(['@/views/lesson/trainingcategory/index'], resolve),
meta: {
title: '产品编辑',
}
}
]
},
{
path: '/lesson',
component: resolve => require(['@/views/layout/Layout'], resolve),
name: '课程管理',
meta: {
title: '课程管理',
roles: [admin, lessonCreater],
},
children: [
{
path: 'record',
redirect: '/lesson/record/training/0/null',
component: resolve => require(['@/views/lesson/trainingrecord/index'], resolve),
meta: {
title: '实训录制',
},
children: [
{
path: 'training/:trainingId/:trainingName',
component: resolve => require(['@/views/lesson/trainingrecord/manage/index'], resolve),
meta: {
title: '实训录制',
},
hidden: true
},
]
},
{
path: 'manage/taskmanage',
name: '任务管理',
component: resolve => require(['@/views/lesson/taskmanage/list'], resolve),
meta: {
title: '任务管理'
}
},
{
path: 'manage/trainingRule',
name: '操作定义',
component: resolve => require(['@/views/lesson/trainingRule/list'], resolve),
meta: {
title: '操作定义'
},
},
{
path: 'manage/trainingRule/detail',
name: '操作定义明细',
hidden: true,
component: resolve => require(['@/views/lesson/trainingRule/detail/index'], resolve),
meta: {
title: '操作定义明细'
}
},
{
path: 'manage/training',
name: '实训管理',
component: resolve => require(['@/views/lesson/trainingmanage/index'], resolve),
meta: {
title: '实训管理'
}
},
{
path: 'edit',
name: '课程编辑',
component: resolve => require(['@/views/lesson/lessoncategory/index'], resolve),
meta: {
title: '课程编辑',
}
},
{
path: 'manage/scriptmanage',
name: '剧本管理',
component: resolve => require(['@/views/lesson/scriptmanage/list'], resolve),
meta: {
title: '剧本管理'
}
}
]
},
{
path: '/teach',
redirect: '/teach/home',
name: '教学系统',
component: resolve => require(['@/views/teach/index'], resolve),
meta: {
roles: [admin, userLesson, user],
},
children: [
{
path: 'home',
component: resolve => require(['@/views/teach/home'], resolve),
meta: {
title: '教学系统'
},
},
{
path: 'detail/:lessonId',
name: '课程详情',
component: resolve => require(['@/views/teach/detail/index'], resolve),
meta: {
title: '课程详情'
},
hidden: true
},
{
path: 'practical/:trainingId/:lessonId',
name: '实训详情',
component: resolve => require(['@/views/teach/practical/index'], resolve),
meta: {
title: '实训详情'
},
hidden: true
},
{
path: 'pay/:lessonId',
component: resolve => require(['@/views/components/pay/index'], resolve),
meta: {
},
hidden: true
}
]
},
{
path: '/exam',
redirect: '/exam/home',
component: resolve => require(['@/views/exam/index'], resolve),
name: '考试系统',
meta: {
roles: [admin, userExam, user],
},
children: [
{
path: 'home',
component: resolve => require(['@/views/exam/home'], resolve),
meta: {
title: '考试系统'
},
},
{
path: 'detail/:examId',
name: '试卷详情',
component: resolve => require(['@/views/exam/detail/examDetail'], resolve),
meta: {
title: '试卷详情'
},
hidden: true,
},
{
path: 'course/:lessonId',
component: resolve => require(['@/views/exam/detail/courseDetail'], resolve),
meta: {
},
hidden: true,
},
{
path: 'examRule/manage',
name: '试题设置',
component: resolve => require(['@/views/publish/examRule/index'], resolve),
meta: {
title: '试题设置'
},
hidden: true,
},
{
path: 'examRule/draft/:mode/:ruleId/:lessonId',
hidden: true,
component: resolve => require(['@/views/publish/examRule/draft/index'], resolve),
meta: {
title: '添加订单'
}
},
{
path: 'pay/:lessonId',
component: resolve => require(['@/views/components/pay/index'], resolve),
meta: {
},
hidden: true
},
{
path: 'questionDetail/:examQuestionId',
name: '开始考试',
component: resolve => require(['@/views/exam/detail/questionDetail'], resolve),
meta: {
title: '开始考试',
},
hidden: true,
},
{
path: 'result/:userExamId',
name: '考试结果',
component: resolve => require(['@/views/exam/result'], resolve),
meta: {
title: '考试结果',
},
hidden: true
},
]
},
{
path: '/demonstration',
redirect: '/demonstration/home',
component: resolve => require(['@/views/demonstration/index'], resolve),
name: '仿真系统',
meta: {
roles: [admin, userSimulation, user],
},
children: [
{
path: 'home',
component: resolve => require(['@/views/demonstration/home'], resolve),
meta: {
title: '仿真系统'
},
},
{
path: 'detail/:mapId',
name: '地图详情',
component: resolve => require(['@/views/demonstration/detail/index'], resolve),
meta: {
title: '地图详情'
},
hidden: true
},
{
path: 'pay/:lessonId',
component: resolve => require(['@/views/components/pay/index'], resolve),
meta: {
},
hidden: true
}
]
},
{
path: '/dp',
redirect: '/dp/home',
component: resolve => require(['@/views/screenMonitor/index'], resolve),
name: '大屏系统',
meta: {
roles: [admin, userScreen],
},
children: [
{
path: 'home',
component: resolve => require(['@/views/screenMonitor/home'], resolve),
meta: {
title: '大屏系统'
},
target: true
},
{
path: 'detail/:lessonId',
component: resolve => require(['@/views/screenMonitor/detail/index'], resolve),
meta: {
},
hidden: true
},
{
path: 'pay/:lessonId',
component: resolve => require(['@/views/components/pay/index'], resolve),
meta: {
},
hidden: true
}
]
},
{
path: '/plan/tool',
component: resolve => require(['@/views/planMonitor/editTool/index'], resolve),
meta: {
},
hidden: true
},
{
path: '/plan',
redirect: '/plan/home',
component: resolve => require(['@/views/planMonitor/index'], resolve),
name: '琏计划',
meta: {
roles: [admin, user],
},
children: [
{
path: 'home',
component: resolve => require(['@/views/planMonitor/home'], resolve),
meta: {
title: '琏计划'
},
target: true
},
{
path: 'detail/:lessonId',
component: resolve => require(['@/views/planMonitor/detail'], resolve),
meta: {
},
hidden: true
},
{
path: 'pay/:lessonId',
component: resolve => require(['@/views/components/pay/index'], resolve),
meta: {
},
hidden: true
}
]
},
{
path: '/replay',
component: resolve => require(['@/views/layout/Layout'], resolve),
meta: {
roles: [admin],
},
children: [
{
path: 'manage',
component: resolve => require(['@/views/replay/index'], resolve),
meta: {
title: '回放管理'
},
}
]
},
{
path: '/permission',
component: resolve => require(['@/views/layout/Layout'], resolve),
meta: {
roles: [admin, user],
},
children: [
{
path: 'manage',
component: resolve => require(['@/views/package/index'], resolve),
meta: {
title: '权限管理'
},
},
{
path: 'draft',
component: resolve => require(['@/views/package/draft/ruleForm'], resolve),
meta: {
},
hidden: true
}
]
},
{
path: '/publish',
name: '发布内容管理',
component: resolve => require(['@/views/layout/Layout'], resolve),
meta: {
title: '发布内容管理',
roles: [admin],
},
children: [
{
path: 'map',
name: '发布地图管理',
component: resolve => require(['@/views/publish/publishMap/index'], resolve),
meta: {
title: '发布地图管理',
}
},
{
path: 'product',
name: '产品状态管理',
component: resolve => require(['@/views/publish/productStatus/index'], resolve),
meta: {
title: '产品状态管理',
}
},
{
path: 'lesson',
name: '发布课程管理',
component: resolve => require(['@/views/publish/publishLesson/index'], resolve),
meta: {
title: '发布课程管理',
}
},
// {
// path: 'script',
// name: '仿真脚本管理',
// component: resolve => require(['@/views/publish/simulationScript/index'], resolve),
// meta: {
// title: '仿真脚本管理',
// }
// },
{
path: 'runPlan/template',
component: resolve => require(['@/views/publish/runPlanTemplate/index'], resolve),
meta: {
title: '运行图模板管理'
}
},
{
path: 'runPlan/common',
component: resolve => require(['@/views/publish/runPlanCommon/index'], resolve),
meta: {
title: '运行图通用管理'
}
},
{
path: 'runPlan/everyDay',
component: resolve => require(['@/views/publish/runPlanEveryDay/index'], resolve),
meta: {
title: '运行图每日管理'
}
},
{
path: 'examRule/manage',
name: '试题管理',
component: resolve => require(['@/views/publish/examRule/index'], resolve),
meta: {
title: '试题管理'
}
},
{
path: 'map/draft/:mode/:mapId',
component: resolve => require(['@/views/publish/publishMap/draft'], resolve),
meta: {
},
hidden: true
},
{
path: 'examRule/draft/:mode/:ruleId/:lessonId',
hidden: true,
component: resolve => require(['@/views/publish/examRule/draft/index'], resolve),
meta: {
}
},
{
path: 'runPlan/common/:mode',
component: resolve => require(['@/views/publish/runPlanCommon/draft'], resolve),
meta: {
},
hidden: true
},
{
path: 'runPlan/view/:mode',
component: resolve => require(['@/views/map/runplan/chart'], resolve),
meta: {
},
hidden: true
}
]
},
{
path: '/orderauthor',
component: resolve => require(['@/views/layout/Layout'], resolve),
name: '订单权限管理',
meta: {
title: '订单权限管理',
roles: [admin]
},
children: [
{
path: 'commodity/manage',
name: '商品管理',
component: resolve => require(['@/views/orderauthor/commodity/index'], resolve),
meta: {
title: '商品管理'
}
},
{
path: 'order/manage',
name: '订单管理',
component: resolve => require(['@/views/orderauthor/order/list'], resolve),
meta: {
title: '订单管理'
}
},
{
path: 'author/manage',
name: '权限管理',
component: resolve => require(['@/views/orderauthor/author/index'], resolve),
meta: {
title: '权限管理'
}
},
{
path: 'transfer/manage',
name: '权限分发管理',
component: resolve => require(['@/views/orderauthor/permission/index'], resolve),
meta: {
title: '权限分发管理'
}
},
{
path: 'commodity/draft/:mode/:commodityId',
name: '添加商品',
hidden: true,
component: resolve => require(['@/views/orderauthor/commodity/draft'], resolve),
meta: {
title: '添加商品'
}
},
{
path: 'order/draft/:mode/:orderId',
name: '添加订单',
hidden: true,
component: resolve => require(['@/views/orderauthor/order/draft'], resolve),
meta: {
title: '添加订单'
}
},
{
path: 'author/draft/:mode/:userId',
name: '添加课程权限',
hidden: true,
component: resolve => require(['@/views/orderauthor/author/draft'], resolve),
meta: {
title: '添加课程权限'
}
},
{
path: 'transfer/detail/:permissionId',
component: resolve => require(['@/views/orderauthor/permission/detail'], resolve),
meta: {
},
hidden: true
},
{
path: 'transfer/package',
component: resolve => require(['@/views/orderauthor/permission/draft/ruleForm'], resolve),
meta: {
},
hidden: true
}
]
},
{
path: '/system',
component: resolve => require(['@/views/layout/Layout'], resolve),
meta: {
title: '系统管理',
roles: [admin],
},
children: [
{
path: 'dictionary',
name: 'Dictionary',
component: resolve => require(['@/views/management/dictionary/index'], resolve),
meta: {
title: '数据字典'
}
},
{
path: 'dictionary/detail',
name: '数据字典明细',
hidden: true,
component: resolve => require(['@/views/management/dictionaryDetail/index'], resolve),
meta: {
title: '数据字典明细'
}
},
{
path: 'userManage',
name: '用户管理',
component: resolve => require(['@/views/management/userControl/index'], resolve),
meta: {
title: '用户管理',
}
},
{
path: 'userTrainingManage',
name: '用户实训管理',
component: resolve => require(['@/views/management/userTraining/index'], resolve),
meta: {
title: '用户实训管理',
}
},
{
path: 'userExamManage',
name: '用户考试管理',
component: resolve => require(['@/views/management/userExam/index'], resolve),
meta: {
title: '用户考试管理',
}
},
{
path: 'userSimulationManage',
name: '用户仿真管理',
component: resolve => require(['@/views/management/userSimulation/index'], resolve),
meta: {
title: '用户仿真管理',
}
},
{
path: 'existingSimulation',
name: '存在仿真管理',
component: resolve => require(['@/views/management/existingSimulation/index'], resolve),
meta: {
title: '存在仿真管理',
}
}
]
},
];

View File

@ -253,7 +253,7 @@ export default {
},
//
setMap(map) {
this.$jlmap.setMap(map);
this.$jlmap.setMap(map, this.$store.state.map.mapDevice);
},
//
refresh(map) {

View File

@ -9,7 +9,8 @@
</template>
<script>
import { getSkinStyleList } from '@/api/management/mapskin'
import { listPublishMap } from '@/api/jmap/map'
import { getQuestById} from '@/api/quest';
export default {
@ -17,12 +18,12 @@
data() {
return {
dialogVisible: false,
skinStyleList: [],
mapList: [],
taskStatusList: [],
disabled:null,
formModel: {
name: '',
skinCode: '01',
mapId: '',
description:''
},
isShow: false,
@ -38,7 +39,7 @@
labelWidth: '100px',
items: [
{ prop: 'name', label: '剧本名称', type: 'text', required: true},
{ prop: 'skinCode', label: '皮肤类型', type: 'select', required: true, options: this.skinStyleList,disabled:this.disabled},
{ prop: 'mapId', label: '地图', type: 'select', required: true, options: this.mapList,disabled:this.disabled},
{ prop: 'description', label: '剧本描述', type: 'textarea', required: true},
]
}
@ -49,8 +50,8 @@
name: [
{ required: true, message: '请输入剧本', trigger: 'blur' },
],
skinCode: [
{ required: true, message: '请选择皮肤类型', trigger: 'change' },
mapId: [
{ required: true, message: '请选择地图', trigger: 'change' },
],
description:[
{ required: true, message: '请输入剧本描述', trigger: 'blur' },
@ -67,16 +68,16 @@
},
methods: {
loadInitData() {
this.skinStyleList = [];
getSkinStyleList().then(response => {
this.skinStyleList = response.data.map(elem => { return { value: elem.code, label: elem.name } });
this.mapList = [];
listPublishMap().then(response => {
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name } });
})
},
doShow(questid) {
if(questid)
{
getQuestById(questid).then(resp=>{
let data={'name':resp.data.name,'description':resp.data.description,'skinCode':resp.data.skinCode};
let data={'name':resp.data.name,'description':resp.data.description,'mapId':resp.data.mapId};
this.formModel=data;
this.formModel.id=questid;
this.disabled="disabled";

View File

@ -11,8 +11,9 @@
<script>
import { superAdmin } from '@/router';
import { listPublishMap } from '@/api/jmap/mapdraft';
import { getSkinStyleList } from '@/api/management/mapskin'
// import { listPublishMap } from '@/api/jmap/mapdraft';
import { listPublishMap } from '@/api/jmap/map';
// import { getSkinStyleList } from '@/api/management/mapskin'
import { runPlanTemplateList, deleteRunPlanTemplate, generateCommonRunPlanEveryDay } from '@/api/runplan';
import { UrlConfig } from '@/router/index';
import { getQuestPageList,createQuest,deleteQuest,updateQuest} from '@/api/quest';
@ -27,7 +28,7 @@
},
data() {
return {
skinCodeList: [],
mapList: [],
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
@ -36,9 +37,9 @@
labelWidth: '140px',
reset: true,
queryObject: {
skinCode: {
mapId: {
type: 'select',
label: '皮肤类型',
label: '地图',
config: {
data: []
}
@ -55,11 +56,11 @@
prop: 'name'
},
{
title: '皮肤类型',
prop: 'skinCode',
title: '地图',
prop: 'mapId',
type: 'tag',
columnValue: (row) => {
return this.$convertField(row.skinCode, this.skinCodeList, ['code', 'name'])
return this.$convertField(row.mapId, this.mapList, ['id', 'name'])
},
tagType: (row) => { return '' }
},
@ -71,7 +72,7 @@
type: 'button',
title: '操作',
width: '350',
hide: () => { return this.$store.state.user.roles.indexOf(superAdmin) < 0; },
// hide: () => { return this.$store.state.user.roles.indexOf(superAdmin) < 0; },
buttons: [
{
name: '录制',
@ -104,11 +105,12 @@
},
methods: {
loadInitData() {
this.skinCodeList = [];
getSkinStyleList().then(response => {
this.skinCodeList = response.data;
this.mapList = [];
listPublishMap().then(response => {
this.mapList = response.data;
// this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name } });
response.data.forEach(elem => {
this.queryForm.queryObject.skinCode.config.data.push({ value: elem.code, label: elem.name });
this.queryForm.queryObject.mapId.config.data.push({ value: elem.id, label: elem.name });
})
})
},
@ -141,7 +143,7 @@
//
handleRecord(index, row) {
scriptRecordNotify(row.id).then(resp => {
let query = { skinStyle: row.skinCode, group: resp.data, scriptId: row.id };
let query = { mapId: row.mapId, group: resp.data, scriptId: row.id };
this.$router.push({ path: `${UrlConfig.display}/script`, query });
launchFullscreen();
}).catch(error => {

View File

@ -1,59 +1,69 @@
<template>
<div class="card-box" v-loading="loading">
<div v-loading="loading" class="card-box">
<el-steps class="steps" :active="display">
<el-step :title="title" icon="el-icon-edit-outline"></el-step>
<el-step title="" icon="el-icon-upload"></el-step>
<el-step :title="title" icon="el-icon-edit-outline" />
<el-step title="" icon="el-icon-upload" />
</el-steps>
<el-card class="forms">
<el-scrollbar wrapClass="scrollbar-wrapper" :style="{height:height -120 + 'px'}" style="padding-top: 40px">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{height:height -120 + 'px'}" style="padding-top: 40px">
<el-form ref="form" :model="addModel" label-width="140px">
<el-form-item label="皮肤类型:" prop="mapName">
<el-input v-model="addModel.mapName" :disabled="true"></el-input>
<el-input v-model="addModel.mapName" :disabled="true" />
</el-form-item>
<el-form-item label="产品类型:" prop="prdType">
<el-radio-group v-model="addModel.prdType" :disabled="isUpdate">
<template v-for="item in chooseList">
<el-radio-button :label="item.code" :key="item.code">{{item.name}}</el-radio-button>
<el-radio-button :key="item.code" :label="item.code">{{ item.name }}</el-radio-button>
</template>
</el-radio-group>
</el-form-item>
<el-form-item label="产品编码:" prop="code"
:rules="node && node.data.type ==='skin' ? baseRules.code:{}">
<el-input v-model="addModel.code" :disabled="codeDisabled"></el-input>
<el-form-item
label="产品编码:"
prop="code"
:rules="node && node.data.type ==='skin' ? baseRules.code:{}"
>
<el-input v-model="addModel.code" :disabled="codeDisabled" />
</el-form-item>
<el-form-item label="产品名称:" prop="name" :rules="baseRules.name">
<el-input v-model="addModel.name"></el-input>
<el-input v-model="addModel.name" />
</el-form-item>
<el-form-item label="关联实训类型:" prop="trainTypes" :rules="baseRules.trainTypes"
v-if="isShowTrainTypes">
<el-form-item
v-if="isShowTrainTypes"
label="关联实训类型:"
prop="trainTypes"
:rules="baseRules.trainTypes"
>
<el-select v-model="addModel.trainTypes" multiple placeholder="请选择" @change="trainTypesChange">
<el-option v-for="item in trainTypesList" :key="item.code" :label="item.name"
:value="item.code">
</el-option>
<el-option
v-for="item in trainTypesList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="产品说明:" prop="remarks" :rules="baseRules.remarks">
<el-input v-model="addModel.remarks" type="textarea" :rows="4"></el-input>
<el-input v-model="addModel.remarks" type="textarea" :rows="4" />
</el-form-item>
</el-form>
</el-scrollbar>
</el-card>
<div class="draft">
<el-button-group>
<el-button type="primary" v-if="isCreate" @click="create">创建</el-button>
<el-button type="primary" v-if="isUpdate" @click="update">更新</el-button>
<el-button type="danger" v-if="isDelete" @click="deleteObj">删除</el-button>
<el-button v-if="isCreate" type="primary" @click="create">创建</el-button>
<el-button v-if="isUpdate" type="primary" @click="update">更新</el-button>
<el-button v-if="isDelete" type="danger" @click="deleteObj">删除</el-button>
</el-button-group>
</div>
</div>
</template>
<script>
import { getPublishMapInfo } from '@/api/jmap/map';
import { createTrainingCategory, updateTrainingCategory, getProductDetail, deleteTrainingCategory, checkMapProductCodeExist } from '@/api/management/mapprd'
import localStore from 'storejs';
// import { getPublishMapInfo } from '@/api/jmap/map';
import { createTrainingCategory, updateTrainingCategory, getProductDetail, deleteTrainingCategory, checkMapProductCodeExist } from '@/api/management/mapprd';
// import localStore from 'storejs';
export default {
export default {
name: 'ShowDetail',
props: {
height: {
@ -81,7 +91,7 @@
prdType: '01',
trainTypes: []
}
}
};
},
computed: {
title() {
@ -121,7 +131,7 @@
trainTypes: [
{ required: true, message: '请选择关联实训类型', trigger: 'change' }
]
}
};
}
},
mounted() {
@ -135,17 +145,17 @@
methods: {
loadData(node) {
if (node) {
//
//
this.node = node;
this.initTrainTypes = [];
this.$refs.form.resetFields();
this.loading = true;
if ('skin' === node.data.type) {
if (node.data.type === 'skin') {
this.codeDisabled = false;
this.addModel.mapName = node.data.name;
this.addModel.skinStyle = node.data.id;
this.loading = false;
} else if ('prd' === node.data.type) {
} else if (node.data.type === 'prd') {
this.codeDisabled = true;
getProductDetail(node.data.id).then(response => {
this.addModel.mapName = node.parent.data.name;
@ -158,23 +168,23 @@
this.addModel.trainTypes = this.initTrainTypes = response.data.trainTypes;
this.addModel.id = response.data.id;
this.loading = false;
}).catch(error => {
}).catch(() => {
this.loading = false;
});
} else {
this.addModel.prdType = '01';
}
//
//
this.$nextTick(function () {
this.$refs.form.clearValidate();
})
});
}
},
create() {
this.$refs.form.validate((valid) => {
if (valid) {
let data = {
const data = {
skinStyle: this.addModel.skinStyle,
mapName: this.addModel.mapName,
name: this.addModel.name,
@ -189,27 +199,27 @@
this.initTrainTypes = this.addModel.trainTypes;
this.$emit('refresh');
this.$message.success('创建产品成功');
}).catch(error => {
}).catch(() => {
this.$messageBox('创建产品失败');
});
} else {
this.$messageBox('产品Code已存在');
}
}).catch(error => {
}).catch(() => {
this.$messageBox('校验产品Code是否已存在失败');
})
});
}
});
},
update() {
this.$refs.form.validate((valid) => {
if (valid) {
this.addModel.trainTypes = this.isShowTrainTypes ? this.addModel.trainTypes : []
this.addModel.trainTypes = this.isShowTrainTypes ? this.addModel.trainTypes : [];
updateTrainingCategory(this.addModel).then(response => {
this.initTrainTypes = this.addModel.trainTypes;
this.$message.success('更新产品成功');
this.$emit('refresh');
}).catch(error => {
}).catch(() => {
this.$messageBox('更新产品失败');
});
}
@ -244,12 +254,11 @@
});
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.card-box {
padding-top: 20px;
}

View File

@ -1,22 +1,21 @@
<template>
<div>
<div class="training-tree">
<training-tree-operate ref="trainingTree" :height="height" @loadData="loadData">
</training-tree-operate>
<training-tree-operate ref="trainingTree" :height="height" @loadData="loadData" />
</div>
<div class="training-draft" :style="{width: width +'px'}">
<edit-detail-operate ref="training" :height="height" @refresh="refresh"> </edit-detail-operate>
<edit-detail-operate ref="training" :height="height" @refresh="refresh" />
</div>
</div>
</template>
<script>
import { deleteMap, listMap, newMap, getMapDetail, publishMap, editMap, saveAsMap } from '@/api/jmap/mapdraft'
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
import TrainingTreeOperate from './tree';
import EditDetailOperate from './edit';
// import { deleteMap, listMap, newMap, getMapDetail, publishMap, editMap, saveAsMap } from '@/api/jmap/mapdraft';
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
import TrainingTreeOperate from './tree';
import EditDetailOperate from './edit';
export default {
export default {
name: 'TrainingEditOperate',
components: {
EditDetailOperate,
@ -27,7 +26,7 @@
return {
width: 0,
height: 0
}
};
},
methods: {
resizeHandler() {
@ -42,10 +41,10 @@
refresh() {
this.$nextTick(() => {
this.$refs.trainingTree.refresh();
})
}
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";

View File

@ -271,14 +271,20 @@ export default {
this.$refs.draftTrain.show({ event: '03', title: '删除自动生成实训' });
},
demoDisplay(index, node) {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
trainingNotify({ trainingId: node.id }).then(resp => {
/** 区分演示和正式需要在演示时设置lessonId为0*/
const query = { group: resp.data, trainingId: node.id, lessonId: 0 };
this.$router.push({ path: `${UrlConfig.display}/manage`, query: query });
launchFullscreen();
}).catch(error => {
this.$messageBox(`创建仿真失败: ${error.message}`);
this.loading.close();
});
},

View File

@ -2,8 +2,8 @@
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSave"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
<el-button @click="dialogVisible = false">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
</template>

View File

@ -26,15 +26,15 @@ export default {
queryObject: {
code: {
type: 'text',
label: '编码'
label: this.$t('system.code')
},
name: {
type: 'text',
label: '名称'
label: this.$t('system.name')
},
status: {
type: 'select',
label: '状态',
label: this.$t('system.status'),
config: {
data: this.$ConstSelect.Status
}
@ -48,27 +48,27 @@ export default {
indexShow: true,
columns: [
{
title: '编码',
title: this.$t('system.code'),
prop: 'code'
},
{
title: '名称',
title: this.$t('system.name'),
prop: 'name'
},
{
title: '状态',
title: this.$t('system.status'),
prop: 'status',
type: 'tag',
columnValue: (row) => { return this.$ConstSelect.translate(row.status, 'Status'); },
tagType: (row) => { if (row.status === '0') { return 'danger'; } else { return 'success'; } }
},
{
title: '说明',
title: this.$t('system.remarks'),
prop: 'remarks'
},
{
type: 'button',
title: '操作',
title: this.$t('global.operate'),
width: '250',
buttons: [
{
@ -76,11 +76,11 @@ export default {
handleClick: this.handleViewDetail
},
{
name: '编辑',
name: this.$t('global.edit'),
handleClick: this.handleEdit
},
{
name: '删除',
name: this.$t('global.delete'),
handleClick: this.handleDelete,
type: 'danger'
}
@ -88,7 +88,7 @@ export default {
}
],
actions: [
{ text: '新增', handler: this.handleAdd }
{ text: this.$t('global.add'), handler: this.handleAdd }
// { text: '', btnCode: 'employee_delete', handler: this.handleBatchDelete, type: 'danger' }
]
},
@ -115,8 +115,8 @@ export default {
handleDelete(index, row) {
this.$confirm('此操作将删除该类型, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning'
}).then(() => {
del(row.id).then(response => {
@ -124,7 +124,7 @@ export default {
this.reloadTable();
}).catch(() => {
this.reloadTable();
this.$messageBox('删除失败');
this.$messageBox(this.$t('error.deleteFailed'));
});
});
},

View File

@ -7,7 +7,6 @@
<transition>
<router-view />
</transition>
<!-- <menu-location ref="menuLocation" /> -->
</div>
</template>
<script>
@ -15,14 +14,12 @@ import WindowResizeHandler from '@/mixin/WindowResizeHandler';
import MapListOperation from './mapmanage/maplist';
import localStore from 'storejs';
import DrapLeft from '@/views/components/drapLeft/index';
// import MenuLocation from './menus/menuLocation';
export default {
name: 'MapDraft',
components: {
MapListOperation,
DrapLeft
// MenuLocation
},
mixins: [
WindowResizeHandler

View File

@ -1,5 +1,5 @@
<template>
<el-dialog title="自动信号列表" :visible.sync="show" width="85%" :before-do-close="doClose">
<el-dialog :title="$t('map.automaticSignalList')" :visible.sync="show" width="85%" :before-do-close="doClose">
<div>
<QueryListPage
ref="queryListPage"
@ -41,7 +41,7 @@ export default {
queryObject: {
signalCode: {
type: 'select',
label: '信号机',
label: this.$t('map.signal'),
config: {
data: []
}
@ -55,38 +55,38 @@ export default {
indexShow: true,
columns: [
{
title: '自动信号编码',
title: this.$t('map.automaticSignalCode'),
prop: 'code'
},
{
title: '信号机名称',
title: this.$t('map.signalCodeName'),
prop: 'signalCode'
},
{
title: '信号机code',
title: this.$t('map.signalCode'),
prop: 'code'
},
{
type: 'button',
title: '区段数据',
title: this.$t('map.sectionData'),
buttons: [
{
name: '预览',
name: this.$t('map.preview'),
handleClick: this.sectionDetail
}
]
},
{
type: 'button',
title: '操作',
title: this.$t('map.operation'),
width: '200',
buttons: [
{
name: '编辑',
name: this.$t('map.compile'),
handleClick: this.editObj
},
{
name: '删除',
name: this.$t('map.delete'),
handleClick: this.deleteObj,
type: 'danger'
}
@ -182,10 +182,10 @@ export default {
if (this.mapInfo && this.mapInfo.id && row) {
//
delAutoSignal(row.id).then(response => {
this.$message.success('删除成功');
this.$message.success(this.$t('map.successfullyDelete'));
this.reloadTable();
}).catch(error => {
this.$messageBox('删除失败');
}).catch(() => {
this.$messageBox(this.$t('map.failDelete'));
});
}
},
@ -197,12 +197,12 @@ export default {
const fieldList = {
id: row.id,
mapId: this.$route.params.mapId,
title: '区段列表',
title: this.$t('map.sectionList'),
name: row.code,
model: {
field: 'autoSignalClearList',
items: [
{ prop: 'sectionCode', label: '区段名称', type: 'select', options: sectionDict }
{ prop: 'sectionCode', label: this.$t('map.sectionName'), type: 'select', options: sectionDict }
]
}
};

View File

@ -4,16 +4,16 @@
<el-card>
<div slot="header" class="clearfix">
<span>
地图名称
{{ $t('map.mapName') }}
<b>{{ mapInfo.name }}</b>
</span>
<el-button type="text" style="float: right; padding: 3px 3px" @click="previewRouteEvent">预览
<el-button type="text" style="float: right; padding: 3px 3px" @click="previewRouteEvent">{{ $t('map.preview') }}
</el-button>
<el-button type="text" style="float: right; padding: 3px 3px" @click="createRouteEvent">新建
<el-button type="text" style="float: right; padding: 3px 3px" @click="createRouteEvent">{{ $t('map.newConstruction') }}
</el-button>
</div>
<el-tabs v-model="enabledTab" type="card">
<el-tab-pane label="自动信号" name="Route">
<el-tab-pane :label="$t('map.automaticSignal')" name="Route">
<route-draft
ref="routeEdit"
:selected="selected"

View File

@ -3,7 +3,7 @@
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-form ref="form" :model="addModel" :rules="rules" label-width="180px" size="mini">
<div class="definition">
<el-form-item label="信号机ID:" prop="signalCode">
<el-form-item :label="$t('map.signalID')" prop="signalCode">
<el-select v-model="addModel.signalCode" clearable :filterable="true">
<el-option
v-for="item in signalList"
@ -12,10 +12,10 @@
:value="item.code"
/>
</el-select>
<el-button :type="field === 'signalCode' ? 'danger' : 'primary'" @click="hover('signalCode')">激活
<el-button :type="field === 'signalCode' ? 'danger' : 'primary'" @click="hover('signalCode')">{{ $t('map.activate') }}
</el-button>
</el-form-item>
<el-form-item label="进路自动触发区段数据:" prop="autoSignalClearList">
<el-form-item :label="$t('map.segmentData')" prop="autoSignalClearList">
<el-select v-model="addModel.autoSignalClearList" multiple clearable :filterable="true">
<el-option
v-for="item in sectionList"
@ -27,13 +27,13 @@
<el-button
:type=" field === 'autoSignalClearList' ? 'danger' : 'primary'"
@click="hover('autoSignalClearList')"
>激活</el-button>
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button v-if="isSave" type="primary" size="small" :loading="loading" @click="save">保存
<el-button v-if="isSave" type="primary" size="small" :loading="loading" @click="save">{{ $t('map.save') }}
</el-button>
<el-button v-else type="warning" size="small" :loading="loading" @click="update">更新
<el-button v-else type="warning" size="small" :loading="loading" @click="update">{{ $t('map.updata') }}
</el-button>
</el-button-group>
</el-form-item>
@ -82,10 +82,10 @@ export default {
editShow: false,
rules: {
signalCode: [
{ required: true, message: '请选择信号机', trigger: 'change' }
{ required: true, message: this.$t('map.pleaseSelectSignal'), trigger: 'change' }
],
autoSignalClearList: [
{ required: true, message: '请选择进路自动触发区段数据', trigger: 'change' }
{ required: true, message: this.$t('map.triggerSegmentData'), trigger: 'change' }
]
}
};
@ -149,11 +149,11 @@ export default {
if (valid) {
this.loading = true;
postAutoSignal(this.buildModel(getUID('autoSingle'))).then(resp => {
this.$message.success('创建自动信号成功!');
this.$message.success(this.$t('map.automaticSignalSuccessful'));
this.loading = false;
this.clear();
}).catch(() => {
this.$messageBox('创建自动信号失败');
this.$messageBox(this.$t('map.failedCreateSignal'));
this.loading = false;
});
}
@ -164,11 +164,11 @@ export default {
if (valid) {
this.loading = true;
putAutoSignal(this.buildModel()).then(resp => {
this.$message.success('更新自动信号成功!');
this.$message.success(this.$t('map.automaticSignalUpdateSucceeded'));
this.loading = false;
this.clear();
}).catch(() => {
this.$messageBox('更新自动信号失败');
this.$messageBox(this.$t('map.automaticSignalUpdateFailed'));
this.loading = false;
});
}

View File

@ -243,10 +243,10 @@ export default {
x: em.clientX,
y: em.clientY
};
if (!em.deviceType) {
var menu = getDeviceMenuByDeviceType('Cancel');
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
}
},
saveMapEvent() {
if (this.$refs.jlmapVisual) {

View File

@ -1,21 +1,21 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tab-pane class="view-control" label="属性" name="first">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="form" :form="dataForm" :form-model="editModel" :rules="rules" />
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="edit">修改</el-button>
<el-button type="primary" @click="deleteObj">删除</el-button>
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
</el-tab-pane>
<el-tab-pane class="view-control" label="操作" name="second">
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="make" :form="makeForm" :form-model="addModel" :rules="createRules" />
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">创建</el-button>
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</el-tab-pane>
</el-tabs>
@ -51,11 +51,11 @@ export default {
imageLists: [
{
value: `${process.env.VOICE_API}/oss/2d/bj1.png`,
label: '上段'
label: this.$t('map.upside')
},
{
value: `${process.env.VOICE_API}/oss/2d/bj2.png`,
label: '下段'
label: this.$t('map.hypomere')
}
],
editModel: {
@ -85,16 +85,16 @@ export default {
},
rules: {
width: [
{ required: true, message: '请输入图片宽度', trigger: 'blur' }
{ required: true, message: this.$t('map.pleaseEnterImageWidth'), trigger: 'blur' }
],
height: [
{ required: true, message: '请输入图片宽度', trigger: 'blur' }
{ required: true, message: this.$t('map.pleaseEnterImageHeight'), trigger: 'blur' }
],
'position.x': [
{ required: true, message: '请输入x坐标位置', trigger: 'blur' }
{ required: true, message: this.$t('map.pleaseEnterXCoordinate'), trigger: 'blur' }
],
'position.y': [
{ required: true, message: '请输入y坐标位置', trigger: 'blur' }
{ required: true, message: this.$t('map.pleaseEnterYCoordinate'), trigger: 'blur' }
]
}
};
@ -107,13 +107,13 @@ export default {
const form = {
labelWidth: '150px',
items: [
{ prop: 'code', label: '编码:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.resourceList, change: true, deviceChange: this.deviceChange },
{ prop: 'name', label: '图片名称:', type: 'input' },
{ prop: 'width', label: '图片宽度:', type: 'number', min: 0 },
{ prop: 'height', label: '图片高度:', type: 'number', min: 0 },
{ prop: 'zIndex', label: '图片层级:', type: 'number', min: 0 },
{ prop: 'rotate', label: '旋转角度:', type: 'number', min: 0 },
{ prop: 'position', label: '图片坐标:', type: 'coordinate', width: '140px', children: [
{ prop: 'code', label: this.$t('map.code'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.resourceList, change: true, deviceChange: this.deviceChange },
{ prop: 'name', label: this.$t('map.imageName'), type: 'input' },
{ prop: 'width', label: this.$t('map.imageWidth'), type: 'number', min: 0 },
{ prop: 'height', label: this.$t('map.imageHeight'), type: 'number', min: 0 },
{ prop: 'zIndex', label: this.$t('map.imageZindex'), type: 'number', min: 0 },
{ prop: 'rotate', label: this.$t('map.rotateAngle'), type: 'number', min: 0 },
{ prop: 'position', label: this.$t('map.imagePoint'), type: 'coordinate', width: '140px', children: [
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
] }
@ -125,10 +125,10 @@ export default {
const form = {
labelWidth: '150px',
items: [
{ prop: 'width', label: '图片宽度:', type: 'number', min: 0 },
{ prop: 'height', label: '图片高度:', type: 'number', min: 0 },
{ prop: 'url', label: '图片选择:', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.imageLists },
{ prop: 'position', label: '图片坐标:', type: 'coordinate', width: '140px', children: [
{ prop: 'width', label: this.$t('map.imageWidth'), type: 'number', min: 0 },
{ prop: 'height', label: this.$t('map.imageHeight'), type: 'number', min: 0 },
{ prop: 'url', label: this.$t('map.imageSelect'), type: 'select', optionLabel: 'label', optionValue: 'value', options: this.imageLists },
{ prop: 'position', label: this.$t('map.imagePoint'), type: 'coordinate', width: '140px', children: [
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
] }
@ -139,16 +139,16 @@ export default {
createRules: function () {
return {
width: [
{ required: true, message: '请输入图片宽度', trigger: 'blur' }
{ required: true, message: this.$t('map.pleaseEnterImageWidth'), trigger: 'blur' }
],
height: [
{ required: true, message: '请输入图片宽度', trigger: 'blur' }
{ required: true, message: this.$t('map.pleaseEnterImageHeight'), trigger: 'blur' }
],
'position.x': [
{ required: true, message: '请输入x坐标位置', trigger: 'blur' }
{ required: true, message: this.$t('map.pleaseEnterXCoordinate'), trigger: 'blur' }
],
'position.y': [
{ required: true, message: '请输入y坐标位置', trigger: 'blur' }
{ required: true, message: this.$t('map.pleaseEnterYCoordinate'), trigger: 'blur' }
]
};
}
@ -241,15 +241,15 @@ export default {
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
if (selected && selected._type.toUpperCase() === 'ImageControl'.toUpperCase()) {
const _that = this;
this.$confirm('是否确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
this.$confirm(this.$t('map.confirmDeletion'), this.$t('map.hint'), {
confirmButtonText: this.$t('map.confirm'),
cancelButtonText: this.$t('map.cancel'),
type: 'warning'
}).then(() => {
_that.$emit('delMapModel', selected);
_that.deviceSelect();
}).catch(() => {
_that.$message.info('已取消删除');
_that.$message.info(this.$t('map.cancelledDelete'));
});
}
}

View File

@ -54,7 +54,7 @@
<el-button
:type="item.buttonShowType ? 'danger' : 'primary'"
@click="item.hover(item.buttonType)"
>激活</el-button>
>{{ $t('map.activate') }}</el-button>
</el-form-item>
</template>
<template v-if="checkFieldType(item, 'input')">

View File

@ -1,10 +1,10 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tab-pane class="view-control" label="属性" name="first">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<el-form ref="form" :model="editModel" :rules="editRules" label-width="120px" size="mini">
<el-form-item label="计数器编码:" prop="code">
<el-form-item :label="$t('map.counterCoding')" prop="code">
<el-select v-model="editModel.code" filterable @change="deviceChange">
<el-option
v-for="item in counterList"
@ -14,10 +14,10 @@
/>
</el-select>
</el-form-item>
<el-form-item label="计数器名称:" prop="name">
<el-form-item :label="$t('map.counterName')" prop="name">
<el-input v-model="editModel.name" />
</el-form-item>
<el-form-item label="所属车站:" prop="stationCode">
<el-form-item :label="$t('map.belongsStation')" prop="stationCode">
<el-select v-model="editModel.stationCode" filterable>
<el-option
v-for="item in stationList"
@ -27,8 +27,8 @@
/>
</el-select>
</el-form-item>
<el-form-item label="计数器类型:" prop="type">
<el-select v-model="editModel.type" filterable placeholder="请选择类型">
<el-form-item :label="$t('map.counterType')" prop="type">
<el-select v-model="editModel.type" filterable :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in typeList"
:key="item.code"
@ -37,26 +37,26 @@
/>
</el-select>
</el-form-item>
<el-form-item label="计数器最大值:" prop="max">
<el-form-item :label="$t('map.countMax')" prop="max">
<el-input-number v-model="editModel.max" :min="0" />
</el-form-item>
<el-form-item label="坐标 x:" prop="position.x">
<el-form-item :label="$t('map.pointX')" prop="position.x">
<el-input-number v-model="editModel.position.x" />px
</el-form-item>
<el-form-item label="坐标 y:" prop="position.y">
<el-form-item :label="$t('map.pointY')" prop="position.y">
<el-input-number v-model="editModel.position.y" />px
</el-form-item>
</el-form>
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="edit">修改</el-button>
<el-button type="primary" @click="deleteObj">删除</el-button>
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
</el-tab-pane>
<el-tab-pane class="view-control" label="操作" name="second">
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<el-form ref="make" label-width="120px" :model="addModel" :rules="createRules" size="mini">
<el-form-item label="车站名称:" prop="stationCode">
<el-form-item :label="$t('map.stationName')" prop="stationCode">
<el-select v-model="addModel.stationCode" filterable>
<el-option
v-for="item in stationList"
@ -66,8 +66,8 @@
/>
</el-select>
</el-form-item>
<el-form-item label="计数器类型:" prop="type">
<el-select v-model="addModel.type" filterable placeholder="请选择类型">
<el-form-item :label="$t('map.counterType')" prop="type">
<el-select v-model="addModel.type" filterable :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in typeList"
:key="item.code"
@ -79,7 +79,7 @@
</el-form>
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">创建</el-button>
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</el-tab-pane>
</el-tabs>
@ -110,8 +110,8 @@ export default {
return {
activeName: 'first',
typeList: [
{ code: '01', name: '区故解' },
{ code: '02', name: '总人解' }
{ code: '01', name: this.$t('map.areaSolution') },
{ code: '02', name: this.$t('map.alwaysSolution') }
],
editModel: {
code: '',
@ -140,35 +140,35 @@ export default {
createRules: function () {
return {
type: [
{ required: true, message: '请选择计数器类型', trigger: 'change' }
{ required: true, message: this.$t('map.selectCounterType'), trigger: 'change' }
],
stationCode: [
{ required: true, message: '请选择车站', trigger: 'change' }
{ required: true, message: this.$t('map.selectStation'), trigger: 'change' }
]
};
},
editRules: function () {
return {
code: [
{ required: true, message: '请重新选择设备', trigger: 'change' }
{ required: true, message: this.$t('map.pleaseSelectDevice'), trigger: 'change' }
],
stationCode: [
{ required: true, message: '请选择车站', trigger: 'change' }
{ required: true, message: this.$t('map.selectStation'), trigger: 'change' }
],
name: [
{ required: true, message: '请输入计数器名称', trigger: 'change' }
{ required: true, message: this.$t('map.pleaseSelectCountName'), trigger: 'change' }
],
type: [
{ required: true, message: '请选择计数器类型', trigger: 'change' }
{ required: true, message: this.$t('map.selectCounterType'), trigger: 'change' }
],
max: [
{ required: true, message: '请输入计数器最大值', trigger: 'change' }
{ required: true, message: this.$t('map.pleaseCounterValue'), trigger: 'change' }
],
'position.x': [
{ required: true, message: '请输入x坐标', trigger: 'change' }
{ required: true, message: this.$t('map.pleaseEnterXCoordinate'), trigger: 'change' }
],
'position.y': [
{ required: true, message: '请输入y坐标', trigger: 'change' }
{ required: true, message: this.$t('map.pleaseEnterYCoordinate'), trigger: 'change' }
]
};
}
@ -266,15 +266,15 @@ export default {
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
if (selected && selected._type.toUpperCase() === 'Counter'.toUpperCase()) {
const _that = this;
this.$confirm('是否确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
this.$confirm(this.$t('map.confirmDeletion'), this.$t('map.hint'), {
confirmButtonText: this.$t('map.confirm'),
cancelButtonText: this.$t('map.cancel'),
type: 'warning'
}).then(() => {
_that.$emit('delMapModel', selected);
_that.deviceSelect();
}).catch(() => {
_that.$message.info('已取消删除');
_that.$message.info(this.$t('map.cancelledDelete'));
});
}
}

View File

@ -1,10 +1,10 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tab-pane class="view-control" label="属性" name="first">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<el-form ref="form" :model="editModel" :rules="editRules" label-width="130px" size="mini">
<el-form-item label="延时解锁编码:" prop="code">
<el-form-item :label="$t('map.delayUnlockingCode')" prop="code">
<el-select v-model="editModel.code" filterable @change="deviceChange">
<el-option
v-for="item in delayShowList"
@ -14,7 +14,7 @@
/>
</el-select>
</el-form-item>
<el-form-item label="所属车站:" prop="stationCode">
<el-form-item :label="$t('map.belongsStation')" prop="stationCode">
<el-select v-model="editModel.stationCode" filterable>
<el-option
v-for="item in stationList"
@ -24,32 +24,32 @@
/>
</el-select>
</el-form-item>
<el-form-item label="延时时间:" prop="unlockTime" disabled="true">
<el-form-item :label="$t('map.delayTime')" prop="unlockTime" disabled="true">
<el-input-number v-model="editModel.unlockTime" :min="0" :max="1000" />s
</el-form-item>
<el-form-item label="字体:" prop="fontFamily">
<el-form-item :label="$t('map.font')" prop="fontFamily">
<el-font v-model="editModel.fontFamily" />
</el-form-item>
<el-form-item label="颜色:" prop="textFontColor">
<el-form-item :label="$t('map.color')" prop="textFontColor">
<el-color-picker v-model="editModel.textFontColor" show-alpha :predefine="skins" />
</el-form-item>
<el-form-item label="坐标 x:" prop="position.x">
<el-form-item :label="$t('map.pointX')" prop="position.x">
<el-input-number v-model="editModel.position.x" />px
</el-form-item>
<el-form-item label="坐标 y:" prop="position.y">
<el-form-item :label="$t('map.pointY')" prop="position.y">
<el-input-number v-model="editModel.position.y" />px
</el-form-item>
</el-form>
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="edit">修改</el-button>
<el-button type="primary" @click="deleteObj">删除</el-button>
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
</el-tab-pane>
<el-tab-pane class="view-control" label="操作" name="second">
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<el-form ref="make" label-width="120px" :rules="createRules" :model="addModel" size="mini">
<el-form-item label="车站名称:" prop="stationCode">
<el-form-item :label="$t('map.stationName')" prop="stationCode">
<el-select v-model="addModel.stationCode" filterable>
<el-option
v-for="item in stationList"
@ -62,7 +62,7 @@
</el-form>
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">创建</el-button>
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</el-tab-pane>
</el-tabs>
@ -120,32 +120,32 @@ export default {
createRules: function () {
return {
stationCode: [
{ required: true, message: '请选择车站', trigger: 'change' }
{ required: true, message: this.$t('map.selectStation'), trigger: 'change' }
]
};
},
editRules: function () {
return {
code: [
{ required: true, message: '请重新选择设备', trigger: 'change' }
{ required: true, message: this.$t('map.pleaseSelectDevice'), trigger: 'change' }
],
stationCode: [
{ required: true, message: '请选择车站', trigger: 'change' }
{ required: true, message: this.$t('map.selectStation'), trigger: 'change' }
],
unlockTime: [
{ required: true, message: '请输入延时时间', trigger: 'change' }
{ required: true, message: this.$t('map.pleaseEnterDelayTime'), trigger: 'change' }
],
textFontColor: [
{ required: true, message: '请输入字体颜色', trigger: 'change' }
{ required: true, message: this.$t('map.pleaseEnterFontColor'), trigger: 'change' }
],
fontFamily: [
{ required: true, message: '请输入字体格式', trigger: 'change' }
{ required: true, message: this.$t('map.pleaseEnterFontFormat'), trigger: 'change' }
],
'position.x': [
{ required: true, message: '请输入x坐标', trigger: 'change' }
{ required: true, message: this.$t('map.pleaseEnterXCoordinate'), trigger: 'change' }
],
'position.y': [
{ required: true, message: '请输入y坐标', trigger: 'change' }
{ required: true, message: this.$t('map.pleaseEnterYCoordinate'), trigger: 'change' }
]
};
}
@ -241,15 +241,15 @@ export default {
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
if (selected && selected._type.toUpperCase() === 'DelayUnlock'.toUpperCase()) {
const _that = this;
this.$confirm('是否确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
this.$confirm(this.$t('map.confirmDeletion'), this.$t('map.hint'), {
confirmButtonText: this.$t('map.confirm'),
cancelButtonText: this.$t('map.cancel'),
type: 'warning'
}).then(() => {
_that.$emit('delMapModel', selected);
_that.deviceSelect();
}).catch(() => {
_that.$message.info('已取消删除');
_that.$message.info(this.$t('map.cancelledDelete'));
});
}
}

View File

@ -4,7 +4,7 @@
<el-card>
<div slot="header" class="clearfix">
<span>
地图名称
{{ $t('map.mapName') }}
<b>{{ mapInfo.name }}</b>
</span>
<el-button
@ -13,20 +13,20 @@
style="float: right; padding: 3px 0"
:disabled="mapSaveing"
@click="saveMapEvent"
>保存</el-button>
>{{ $t('map.save') }}</el-button>
<el-button
v-if="isSave"
type="text"
style="float: right; padding: 3px 0; margin-right: 5px;"
:disabled="mapSaveing"
@click="verifyMapEvent"
>数据校验</el-button>
>{{ $t('map.dataVerification') }}</el-button>
</div>
<el-row type="flex" justify="center">
<el-radio-group v-model="viewSelect" @change="handleSelectView">
<el-radio-button :label="ViewMode.LOGIC">逻辑视图</el-radio-button>
<el-radio-button :label="ViewMode.PHYSICAL">物理视图</el-radio-button>
<el-radio-button :label="ViewMode.MIX">混合视图</el-radio-button>
<el-radio-button :label="ViewMode.LOGIC">{{ $t('map.logicalView') }}</el-radio-button>
<el-radio-button :label="ViewMode.PHYSICAL">{{ $t('map.physicalView') }}</el-radio-button>
<el-radio-button :label="ViewMode.MIX">{{ $t('map.mixedView') }}</el-radio-button>
</el-radio-group>
</el-row>
<el-row v-if="ViewMode.LOGIC === viewSelect" class="logical-view" type="flex" justify="center">
@ -42,7 +42,7 @@
</el-checkbox-group>
</el-row>
<el-tabs v-model="enabledTab" type="card">
<el-tab-pane label="Link" name="Link">
<el-tab-pane :label="$t('map.link')" name="Link">
<link-draft
ref="Link"
:card-height="cardHeights"
@ -52,7 +52,7 @@
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane label="区段" name="Section">
<el-tab-pane :label="$t('map.section')" name="Section">
<section-draft
ref="Section"
:card-height="cardHeights"
@ -63,7 +63,7 @@
@fieldSelect="fieldSelect"
/>
</el-tab-pane>
<el-tab-pane label="道岔" name="Switch">
<el-tab-pane :label="$t('map.switch')" name="Switch">
<switch-draft
ref="Switch"
:card-height="cardHeights"
@ -73,7 +73,7 @@
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane label="信号机" name="Signal">
<el-tab-pane :label="$t('map.signal')" name="Signal">
<signal-draft
ref="Signal"
:card-height="cardHeights"
@ -83,7 +83,7 @@
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane label="zc区域控制" name="ZcControl">
<el-tab-pane :label="$t('map.zcZoneControl')" name="ZcControl">
<zc-control-draft
ref="ZcControl"
:card-height="cardHeights"
@ -93,7 +93,7 @@
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane label="全线临时限速" name="LimitControl">
<el-tab-pane :label="$t('map.temporaryLimit')" name="LimitControl">
<limit-control-draft
ref="LimitControl"
:card-height="cardHeights"
@ -103,7 +103,7 @@
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane label="Lc控制" name="LcControl">
<el-tab-pane :label="$t('map.lcControl')" name="LcControl">
<lc-control-draft
ref="LcControl"
:card-height="cardHeights"
@ -113,7 +113,7 @@
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane label="图片" name="ImageControl">
<el-tab-pane :label="$t('map.image')" name="ImageControl">
<Image-control-draft
ref="ImageControl"
:card-height="cardHeights"
@ -123,7 +123,7 @@
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane label="车站" name="Station">
<el-tab-pane :label="$t('map.station')" name="Station">
<station-draft
ref="Station"
:card-height="cardHeights"
@ -133,7 +133,7 @@
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane label="控制模式" name="StationControl">
<el-tab-pane :label="$t('map.controlMode')" name="StationControl">
<station-control-draft
ref="StationControl"
:card-height="cardHeights"
@ -143,7 +143,7 @@
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane label="站台" name="StationStand">
<el-tab-pane :label="$t('map.platform')" name="StationStand">
<station-stand-draft
ref="StationStand"
:card-height="cardHeights"
@ -153,7 +153,7 @@
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane label="计数器" name="Counter">
<el-tab-pane :label="$t('map.counter')" name="Counter">
<counter-draft
ref="Counter"
:card-height="cardHeights"
@ -163,7 +163,7 @@
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane label="延迟解锁" name="DelayUnlock">
<el-tab-pane :label="$t('map.delayUnlock')" name="DelayUnlock">
<delay-unlock-draft
ref="DelayUnlock"
:card-height="cardHeights"
@ -173,7 +173,7 @@
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane label="列车" name="Train">
<el-tab-pane :label="$t('map.train')" name="Train">
<train-draft
ref="Train"
:card-height="cardHeights"
@ -183,7 +183,7 @@
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane label="车次窗" name="TrainWindow">
<el-tab-pane :label="$t('map.trainWindow')" name="TrainWindow">
<train-window-draft
ref="TrainWindow"
:card-height="cardHeights"
@ -193,7 +193,7 @@
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane label="线条" name="Line">
<el-tab-pane :label="$t('map.line')" name="Line">
<line-draft
ref="Line"
:card-height="cardHeights"
@ -203,7 +203,7 @@
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane label="文字" name="Text">
<el-tab-pane :label="$t('map.text')" name="Text">
<text-draft
ref="Text"
:card-height="cardHeights"
@ -270,7 +270,7 @@ export default {
},
mapInfo: {
type: Object,
default: function() { return {name: '请选择地图'}; }
default: function() { return {name: this.$t('map.pleaseSelectMap')}; }
},
cardHeight: {
type: [String, Number],
@ -283,12 +283,12 @@ export default {
feild: '',
ViewMode: ViewMode,
LogicalViewTypeList: [
{ code: 'Link', name: 'link' }
{ code: 'Link', name: this.$t('map.link') }
],
PhysicalViewTypeList: [
{ code: 'Section', name: '区段' },
{ code: 'Signal', name: '信号机' },
{ code: 'Switch', name: '道岔' }
{ code: 'Section', name: this.$t('map.section') },
{ code: 'Signal', name: this.$t('map.signal') },
{ code: 'Switch', name: this.$t('map.switch') }
],
logicalLevelsSelect: [],
physicalLevelsSelect: [],

Some files were not shown because too many files have changed in this diff Show More