Merge branch 'master' of git.cloud.tencent.com:joylink/jl-nclient
This commit is contained in:
commit
8749644fa8
@ -18,6 +18,7 @@
|
|||||||
"axios": "0.18.0",
|
"axios": "0.18.0",
|
||||||
"echarts": "^4.2.1",
|
"echarts": "^4.2.1",
|
||||||
"element-ui": "2.7.2",
|
"element-ui": "2.7.2",
|
||||||
|
"file-saver": "^1.3.3",
|
||||||
"js-cookie": "2.2.0",
|
"js-cookie": "2.2.0",
|
||||||
"js-md5": "^0.7.3",
|
"js-md5": "^0.7.3",
|
||||||
"lodash": "^4.17.11",
|
"lodash": "^4.17.11",
|
||||||
@ -53,8 +54,8 @@
|
|||||||
"babel-preset-env": "1.6.1",
|
"babel-preset-env": "1.6.1",
|
||||||
"babel-preset-stage-2": "6.24.1",
|
"babel-preset-stage-2": "6.24.1",
|
||||||
"chalk": "2.4.2",
|
"chalk": "2.4.2",
|
||||||
"copy-webpack-plugin": "^4.5.2",
|
|
||||||
"connect": "3.6.6",
|
"connect": "3.6.6",
|
||||||
|
"copy-webpack-plugin": "^4.5.2",
|
||||||
"eslint": "5.15.3",
|
"eslint": "5.15.3",
|
||||||
"eslint-plugin-vue": "5.2.2",
|
"eslint-plugin-vue": "5.2.2",
|
||||||
"file-loader": "^3.0.1",
|
"file-loader": "^3.0.1",
|
||||||
@ -64,7 +65,7 @@
|
|||||||
"runjs": "^4.3.2",
|
"runjs": "^4.3.2",
|
||||||
"sass-loader": "^7.1.0",
|
"sass-loader": "^7.1.0",
|
||||||
"script-ext-html-webpack-plugin": "2.1.3",
|
"script-ext-html-webpack-plugin": "2.1.3",
|
||||||
"script-loader": "0.7.2",
|
"script-loader": "^0.7.2",
|
||||||
"serve-static": "^1.13.2",
|
"serve-static": "^1.13.2",
|
||||||
"svg-sprite-loader": "4.1.3",
|
"svg-sprite-loader": "4.1.3",
|
||||||
"svgo": "1.2.2",
|
"svgo": "1.2.2",
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
|
|
||||||
/** 获取地图版本信息*/
|
/** 根据皮肤获取地图版本信息*/
|
||||||
export function getPublishMapVersion(skinStyle) {
|
export function getPublishMapVersion(skinStyle) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/map/${skinStyle}/version`,
|
url: `/api/map/skin/${skinStyle}/version`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 获取发布地图详细内容*/
|
/** 根据皮肤获取发布地图详细内容*/
|
||||||
export function getPublishMapDetail(skinStyle) {
|
export function getPublishMapDetail(skinStyle) {
|
||||||
const datad = request({
|
const datad = request({
|
||||||
url: `/api/map/${skinStyle}/details`,
|
url: `/api/map/skin/${skinStyle}/details`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
return datad.then();
|
return datad.then();
|
||||||
|
@ -17,18 +17,34 @@ export function getPublishMapListBySkinStyle(skinStyle) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 获取地图版本信息*/
|
/** 根据皮肤获取地图版本信息*/
|
||||||
export function getPublishMapVersion(skinStyle) {
|
export function getPublishMapVersion(skinStyle) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/map/${skinStyle}/version`,
|
url: `/api/map/skin/${skinStyle}/version`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 获取发布地图详细内容*/
|
/** 根据皮肤获取发布地图详细内容*/
|
||||||
export function getPublishMapDetail(skinStyle) {
|
export function getPublishMapDetail(skinStyle) {
|
||||||
return request({
|
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'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
|
|
||||||
/** 分页查找仿真任务*/
|
/** 分页查找个人录制的仿真任务*/
|
||||||
export function getQuestPageList(params) {
|
export function getQuestPageList(params) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/quest/paging`,
|
url: `/api/quest/paging`,
|
||||||
@ -53,3 +53,12 @@ export function updateMapLocation(id, data) {
|
|||||||
data
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 分页查找上线的仿真任务*/
|
||||||
|
export function getQuestPageListOnline(params) {
|
||||||
|
return request({
|
||||||
|
url: `/api/quest/paging/online`,
|
||||||
|
method: 'get',
|
||||||
|
params: params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -337,11 +337,11 @@ export function getQuestRecord(group) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 加载任务*/
|
/** 加载任务*/
|
||||||
export function loadQuest(questId, group) {
|
export function loadQuest(questId, memberId, group) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/simulation/${group}/quest/${questId}`,
|
url: `/api/simulation/${group}/quest/${questId}?memberId=${memberId}`,
|
||||||
method: 'post'
|
method: 'post'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 退出任务*/
|
/** 退出任务*/
|
||||||
|
@ -11,6 +11,20 @@ export default {
|
|||||||
logicalView: '逻辑视图',
|
logicalView: '逻辑视图',
|
||||||
physicalView: '物理视图',
|
physicalView: '物理视图',
|
||||||
mixedView: '混合视图',
|
mixedView: '混合视图',
|
||||||
|
normal: '正常',
|
||||||
|
|
||||||
|
save: '保存',
|
||||||
|
updata: '更新',
|
||||||
|
updateObj: '修改',
|
||||||
|
updateObjAxis: '更新坐标',
|
||||||
|
saveAs: '另存为',
|
||||||
|
publish: '发布',
|
||||||
|
deleteObj: '删除',
|
||||||
|
confirm: '确 定',
|
||||||
|
cancel: '取 消',
|
||||||
|
cancelledDelete: '已取消删除',
|
||||||
|
confirmDeletion: '是否确认删除?',
|
||||||
|
hint: '提示',
|
||||||
|
|
||||||
link: 'link',
|
link: 'link',
|
||||||
section: '区段',
|
section: '区段',
|
||||||
@ -42,6 +56,7 @@ export default {
|
|||||||
scaling: '缩放比例',
|
scaling: '缩放比例',
|
||||||
statusSignalName: '状态信号名称:',
|
statusSignalName: '状态信号名称:',
|
||||||
stateSignalsPlotCoordinates: '状态信号画图坐标:',
|
stateSignalsPlotCoordinates: '状态信号画图坐标:',
|
||||||
|
equipmentStation: '所属设备集中站:',
|
||||||
|
|
||||||
lineCoding: '线条编码:',
|
lineCoding: '线条编码:',
|
||||||
lineType: '线条类型:',
|
lineType: '线条类型:',
|
||||||
@ -49,10 +64,6 @@ export default {
|
|||||||
segmentCoordinates: '区段显示坐标:',
|
segmentCoordinates: '区段显示坐标:',
|
||||||
|
|
||||||
publishMapCreation: '从发布地图创建',
|
publishMapCreation: '从发布地图创建',
|
||||||
confirm: '确 定',
|
|
||||||
cancel: '取 消',
|
|
||||||
|
|
||||||
cancelledDelete: '已取消删除',
|
|
||||||
|
|
||||||
pleaseEnterMapName: '请输入地图名称',
|
pleaseEnterMapName: '请输入地图名称',
|
||||||
pleaseChooseSkinStyle: '请选择皮肤风格',
|
pleaseChooseSkinStyle: '请选择皮肤风格',
|
||||||
@ -85,11 +96,6 @@ export default {
|
|||||||
publishingAssociatedCity: '发布关联城市:',
|
publishingAssociatedCity: '发布关联城市:',
|
||||||
publishMapName: '发布地图名称:',
|
publishMapName: '发布地图名称:',
|
||||||
|
|
||||||
updateObj: '修改',
|
|
||||||
updateObjAxis: '更新坐标',
|
|
||||||
saveAs: '另存为',
|
|
||||||
publish: '发布',
|
|
||||||
deleteObj: '删除',
|
|
||||||
editRoute: '编辑进路',
|
editRoute: '编辑进路',
|
||||||
editRouting: '编辑交路',
|
editRouting: '编辑交路',
|
||||||
editAutoRouting: '编辑自动信号',
|
editAutoRouting: '编辑自动信号',
|
||||||
@ -97,9 +103,6 @@ export default {
|
|||||||
pathUnit: '路径单元',
|
pathUnit: '路径单元',
|
||||||
jlmap3d: '三维化编辑',
|
jlmap3d: '三维化编辑',
|
||||||
|
|
||||||
confirmDeletion: '是否确认删除?',
|
|
||||||
hint: '提示',
|
|
||||||
|
|
||||||
automaticSignalList: '自动信号列表',
|
automaticSignalList: '自动信号列表',
|
||||||
automaticSignalCode: '自动信号编码',
|
automaticSignalCode: '自动信号编码',
|
||||||
signalCodeName: '信号机名称',
|
signalCodeName: '信号机名称',
|
||||||
@ -109,6 +112,7 @@ export default {
|
|||||||
operation: '操作',
|
operation: '操作',
|
||||||
compile: '编辑',
|
compile: '编辑',
|
||||||
delete: '删除',
|
delete: '删除',
|
||||||
|
empty: '清空',
|
||||||
sectionName: '区段名称',
|
sectionName: '区段名称',
|
||||||
sectionList: '区段列表',
|
sectionList: '区段列表',
|
||||||
automaticSignal: '自动信号',
|
automaticSignal: '自动信号',
|
||||||
@ -116,8 +120,7 @@ export default {
|
|||||||
signalID: '信号机ID:',
|
signalID: '信号机ID:',
|
||||||
activate: '激活',
|
activate: '激活',
|
||||||
segmentData: '进路自动触发区段数据:',
|
segmentData: '进路自动触发区段数据:',
|
||||||
save: '保存',
|
|
||||||
updata: '更新',
|
|
||||||
pleaseSelectSignal: '请选择信号机',
|
pleaseSelectSignal: '请选择信号机',
|
||||||
triggerSegmentData: '请选择进路自动触发区段数据',
|
triggerSegmentData: '请选择进路自动触发区段数据',
|
||||||
automaticSignalSuccessful: '创建自动信号成功!',
|
automaticSignalSuccessful: '创建自动信号成功!',
|
||||||
@ -181,6 +184,123 @@ export default {
|
|||||||
linkRightFdCode: '右侧正向Link:',
|
linkRightFdCode: '右侧正向Link:',
|
||||||
linkRightSdCode: '右侧侧向Link:',
|
linkRightSdCode: '右侧侧向Link:',
|
||||||
linkLp: 'Link 起点坐标:',
|
linkLp: 'Link 起点坐标:',
|
||||||
linkRp: '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: '中控'
|
||||||
};
|
};
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
export default {
|
export default {
|
||||||
|
pleaseSelect: '请选择',
|
||||||
selectEquipment: '请选择设备',
|
selectEquipment: '请选择设备',
|
||||||
deviceTypeNotNull: 'Device type code cannot be empty',
|
deviceTypeNotNull: '设备类型码不能为空',
|
||||||
operationTypeNotNull: 'Operator code cannot be empty',
|
operationTypeNotNull: '操作码不能为空',
|
||||||
tipsNotNull: 'Tips cannot be empty',
|
tipsNotNull: '提示信息不能为空',
|
||||||
|
|
||||||
pleaseSelectEncoding: '请选择唯一编码',
|
pleaseSelectEncoding: '请选择唯一编码',
|
||||||
pleaseEnterStatusSignal: '请输入状态信号名称',
|
pleaseEnterStatusSignal: '请输入状态信号名称',
|
||||||
pleaseEnterXCoordinate: '请输入x坐标',
|
pleaseEnterXCoordinate: '请输入x坐标',
|
||||||
@ -31,5 +31,55 @@ export default {
|
|||||||
pointX: '坐标 x:',
|
pointX: '坐标 x:',
|
||||||
pointY: '坐标 y:',
|
pointY: '坐标 y:',
|
||||||
direct: '方向:',
|
direct: '方向:',
|
||||||
basisLink: '基础Link:'
|
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'
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
export default {
|
export default {
|
||||||
scriptTitle: "Task Recording",
|
scriptTitle: 'Task Recording',
|
||||||
saveMaplocation: "Update Location",
|
saveMaplocation: 'Update Location',
|
||||||
saveBackground: "Save Background",
|
saveBackground: 'Save Background',
|
||||||
saveData: "Save Data",
|
saveData: 'Save Data',
|
||||||
roleManage: "Role Manage",
|
roleManage: 'Role Manage',
|
||||||
targetCondition: "Task Target",
|
targetCondition: 'Task Target',
|
||||||
taskScript: "Task Script",
|
taskScript: 'Task Script',
|
||||||
roleName: "Role Name",
|
roleName: 'Role Name',
|
||||||
roleType: "Role Type",
|
roleType: 'Role Type',
|
||||||
deviceCode: "Device Code",
|
deviceCode: 'Device Code',
|
||||||
roleList: "Role List",
|
roleList: 'Role List',
|
||||||
operation:"Operation",
|
operation: 'Operation',
|
||||||
roleAdd: "Add",
|
roleAdd: 'Add',
|
||||||
delete: "Delete",
|
delete: 'Delete',
|
||||||
behaviorOperate: "Behavior Operate",
|
behaviorOperate: 'Behavior Operate',
|
||||||
conditionTitle: "Target condition",
|
conditionTitle: 'Target condition',
|
||||||
deviceType: "Device Type",
|
deviceType: 'Device Type',
|
||||||
deviceCondition: "Device Condition",
|
deviceCondition: 'Device Condition',
|
||||||
paramDeviceType: "Param DeviceType",
|
paramDeviceType: 'Param DeviceType',
|
||||||
paramDeviceCode: "Param DeviceCode",
|
paramDeviceCode: 'Param DeviceCode'
|
||||||
};
|
};
|
||||||
|
@ -3,8 +3,10 @@ export default {
|
|||||||
cancel: '取 消',
|
cancel: '取 消',
|
||||||
creatingSuccessful: '创建成功!',
|
creatingSuccessful: '创建成功!',
|
||||||
confirmDeletion: '是否确认删除?',
|
confirmDeletion: '是否确认删除?',
|
||||||
|
confirmBatchGeneration: '是否确认批量生成?',
|
||||||
hint: '提示',
|
hint: '提示',
|
||||||
cancelledDelete: '已取消删除',
|
cancelledDelete: '已取消删除',
|
||||||
|
cancelGeneration: '已取消批量生成',
|
||||||
|
|
||||||
updateSuccessfully: '更新成功',
|
updateSuccessfully: '更新成功',
|
||||||
updateFailed: '更新失败',
|
updateFailed: '更新失败',
|
||||||
@ -12,6 +14,13 @@ export default {
|
|||||||
failDelete: '删除失败',
|
failDelete: '删除失败',
|
||||||
|
|
||||||
cannotCoincide: '起始坐标和结束坐标不能重合',
|
cannotCoincide: '起始坐标和结束坐标不能重合',
|
||||||
|
cannotMerged: '存在非物理区段,不能合并',
|
||||||
|
linkCannotMerged: '不在同一Link上的物理区段不能合并',
|
||||||
|
|
||||||
meter: '米'
|
selectedSectionEmpty: '选择的区段为空',
|
||||||
|
|
||||||
|
stationFont: '车站字体',
|
||||||
|
kilometerFont: '公里标字体',
|
||||||
|
meter: '米',
|
||||||
|
angle: '度'
|
||||||
};
|
};
|
||||||
|
@ -11,6 +11,20 @@ export default {
|
|||||||
logicalView: '逻辑视图',
|
logicalView: '逻辑视图',
|
||||||
physicalView: '物理视图',
|
physicalView: '物理视图',
|
||||||
mixedView: '混合视图',
|
mixedView: '混合视图',
|
||||||
|
normal: '正常',
|
||||||
|
|
||||||
|
save: '保存',
|
||||||
|
updata: '更新',
|
||||||
|
updateObj: '修改',
|
||||||
|
updateObjAxis: '更新坐标',
|
||||||
|
saveAs: '另存为',
|
||||||
|
publish: '发布',
|
||||||
|
deleteObj: '删除',
|
||||||
|
confirm: '确 定',
|
||||||
|
cancel: '取 消',
|
||||||
|
cancelledDelete: '已取消删除',
|
||||||
|
confirmDeletion: '是否确认删除?',
|
||||||
|
hint: '提示',
|
||||||
|
|
||||||
link: 'link',
|
link: 'link',
|
||||||
section: '区段',
|
section: '区段',
|
||||||
@ -42,6 +56,7 @@ export default {
|
|||||||
scaling: '缩放比例',
|
scaling: '缩放比例',
|
||||||
statusSignalName: '状态信号名称:',
|
statusSignalName: '状态信号名称:',
|
||||||
stateSignalsPlotCoordinates: '状态信号画图坐标:',
|
stateSignalsPlotCoordinates: '状态信号画图坐标:',
|
||||||
|
equipmentStation: '所属设备集中站:',
|
||||||
|
|
||||||
lineCoding: '线条编码:',
|
lineCoding: '线条编码:',
|
||||||
lineType: '线条类型:',
|
lineType: '线条类型:',
|
||||||
@ -49,10 +64,6 @@ export default {
|
|||||||
segmentCoordinates: '区段显示坐标:',
|
segmentCoordinates: '区段显示坐标:',
|
||||||
|
|
||||||
publishMapCreation: '从发布地图创建',
|
publishMapCreation: '从发布地图创建',
|
||||||
confirm: '确 定',
|
|
||||||
cancel: '取 消',
|
|
||||||
|
|
||||||
cancelledDelete: '已取消删除',
|
|
||||||
|
|
||||||
pleaseEnterMapName: '请输入地图名称',
|
pleaseEnterMapName: '请输入地图名称',
|
||||||
pleaseChooseSkinStyle: '请选择皮肤风格',
|
pleaseChooseSkinStyle: '请选择皮肤风格',
|
||||||
@ -85,11 +96,6 @@ export default {
|
|||||||
publishingAssociatedCity: '发布关联城市:',
|
publishingAssociatedCity: '发布关联城市:',
|
||||||
publishMapName: '发布地图名称:',
|
publishMapName: '发布地图名称:',
|
||||||
|
|
||||||
updateObj: '修改',
|
|
||||||
updateObjAxis: '更新坐标',
|
|
||||||
saveAs: '另存为',
|
|
||||||
publish: '发布',
|
|
||||||
deleteObj: '删除',
|
|
||||||
editRoute: '编辑进路',
|
editRoute: '编辑进路',
|
||||||
editRouting: '编辑交路',
|
editRouting: '编辑交路',
|
||||||
editAutoRouting: '编辑自动信号',
|
editAutoRouting: '编辑自动信号',
|
||||||
@ -97,9 +103,6 @@ export default {
|
|||||||
pathUnit: '路径单元',
|
pathUnit: '路径单元',
|
||||||
jlmap3d: '三维化编辑',
|
jlmap3d: '三维化编辑',
|
||||||
|
|
||||||
confirmDeletion: '是否确认删除?',
|
|
||||||
hint: '提示',
|
|
||||||
|
|
||||||
automaticSignalList: '自动信号列表',
|
automaticSignalList: '自动信号列表',
|
||||||
automaticSignalCode: '自动信号编码',
|
automaticSignalCode: '自动信号编码',
|
||||||
signalCodeName: '信号机名称',
|
signalCodeName: '信号机名称',
|
||||||
@ -109,6 +112,7 @@ export default {
|
|||||||
operation: '操作',
|
operation: '操作',
|
||||||
compile: '编辑',
|
compile: '编辑',
|
||||||
delete: '删除',
|
delete: '删除',
|
||||||
|
empty: '清空',
|
||||||
sectionName: '区段名称',
|
sectionName: '区段名称',
|
||||||
sectionList: '区段列表',
|
sectionList: '区段列表',
|
||||||
automaticSignal: '自动信号',
|
automaticSignal: '自动信号',
|
||||||
@ -116,8 +120,7 @@ export default {
|
|||||||
signalID: '信号机ID:',
|
signalID: '信号机ID:',
|
||||||
activate: '激活',
|
activate: '激活',
|
||||||
segmentData: '进路自动触发区段数据:',
|
segmentData: '进路自动触发区段数据:',
|
||||||
save: '保存',
|
|
||||||
updata: '更新',
|
|
||||||
pleaseSelectSignal: '请选择信号机',
|
pleaseSelectSignal: '请选择信号机',
|
||||||
triggerSegmentData: '请选择进路自动触发区段数据',
|
triggerSegmentData: '请选择进路自动触发区段数据',
|
||||||
automaticSignalSuccessful: '创建自动信号成功!',
|
automaticSignalSuccessful: '创建自动信号成功!',
|
||||||
@ -181,6 +184,123 @@ export default {
|
|||||||
linkRightFdCode: '右侧正向Link:',
|
linkRightFdCode: '右侧正向Link:',
|
||||||
linkRightSdCode: '右侧侧向Link:',
|
linkRightSdCode: '右侧侧向Link:',
|
||||||
linkLp: 'Link 起点坐标:',
|
linkLp: 'Link 起点坐标:',
|
||||||
linkRp: '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: '中控'
|
||||||
};
|
};
|
||||||
|
@ -32,6 +32,7 @@ export default {
|
|||||||
pulishManage: '发布内容管理',
|
pulishManage: '发布内容管理',
|
||||||
publishMapManage: '发布地图管理',
|
publishMapManage: '发布地图管理',
|
||||||
productStateManage: '产品状态管理',
|
productStateManage: '产品状态管理',
|
||||||
|
publishLessonManage: '发布课程管理',
|
||||||
runPlanTemplateManage: '模板运行图管理',
|
runPlanTemplateManage: '模板运行图管理',
|
||||||
runPlanCommonManage: '通用运行图管理',
|
runPlanCommonManage: '通用运行图管理',
|
||||||
runPlanEveryDayManage: '每日运行图管理',
|
runPlanEveryDayManage: '每日运行图管理',
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
export default {
|
export default {
|
||||||
|
pleaseSelect: '请选择',
|
||||||
selectEquipment: '请选择设备',
|
selectEquipment: '请选择设备',
|
||||||
deviceTypeNotNull: '设备类型码不能为空',
|
deviceTypeNotNull: '设备类型码不能为空',
|
||||||
operationTypeNotNull: '操作码不能为空',
|
operationTypeNotNull: '操作码不能为空',
|
||||||
@ -30,5 +31,55 @@ export default {
|
|||||||
pointX: '坐标 x:',
|
pointX: '坐标 x:',
|
||||||
pointY: '坐标 y:',
|
pointY: '坐标 y:',
|
||||||
direct: '方向:',
|
direct: '方向:',
|
||||||
basisLink: '基础Link:'
|
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'
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
export default {
|
export default {
|
||||||
scriptTitle: "任务录制",
|
scriptTitle: '任务录制',
|
||||||
saveMaplocation: "更新定位",
|
saveMaplocation: '更新定位',
|
||||||
saveBackground: "保存背景",
|
saveBackground: '保存背景',
|
||||||
saveData: "保存数据",
|
saveData: '保存数据',
|
||||||
roleManage:"角色管理",
|
roleManage: '角色管理',
|
||||||
targetCondition:"任务目标",
|
targetCondition: '任务目标',
|
||||||
taskScript:"任务剧本",
|
taskScript: '任务剧本',
|
||||||
roleName: "角色名称",
|
roleName: '角色名称',
|
||||||
roleType: "角色类型",
|
roleType: '角色类型',
|
||||||
deviceCode: "设备编码",
|
deviceCode: '设备编码',
|
||||||
roleList: "角色列表",
|
roleList: '角色列表',
|
||||||
operation: "操作",
|
operation: '操作',
|
||||||
roleAdd: "添加",
|
roleAdd: '添加',
|
||||||
delete: "删除",
|
delete: '删除',
|
||||||
behaviorOperate: "行为操作",
|
behaviorOperate: '行为操作',
|
||||||
conditionTitle: "目标条件",
|
conditionTitle: '目标条件',
|
||||||
deviceType: "设备类型",
|
deviceType: '设备类型',
|
||||||
deviceCondition: "设备条件",
|
deviceCondition: '设备条件',
|
||||||
paramDeviceType: "参数设备类型",
|
paramDeviceType: '参数设备类型',
|
||||||
paramDeviceCode: "参数设备编号",
|
paramDeviceCode: '参数设备编号'
|
||||||
};
|
};
|
||||||
|
@ -3,8 +3,10 @@ export default {
|
|||||||
cancel: '取 消',
|
cancel: '取 消',
|
||||||
creatingSuccessful: '创建成功!',
|
creatingSuccessful: '创建成功!',
|
||||||
confirmDeletion: '是否确认删除?',
|
confirmDeletion: '是否确认删除?',
|
||||||
|
confirmBatchGeneration: '是否确认批量生成?',
|
||||||
hint: '提示',
|
hint: '提示',
|
||||||
cancelledDelete: '已取消删除',
|
cancelledDelete: '已取消删除',
|
||||||
|
cancelGeneration: '已取消批量生成',
|
||||||
|
|
||||||
updateSuccessfully: '更新成功',
|
updateSuccessfully: '更新成功',
|
||||||
updateFailed: '更新失败',
|
updateFailed: '更新失败',
|
||||||
@ -12,6 +14,13 @@ export default {
|
|||||||
failDelete: '删除失败',
|
failDelete: '删除失败',
|
||||||
|
|
||||||
cannotCoincide: '起始坐标和结束坐标不能重合',
|
cannotCoincide: '起始坐标和结束坐标不能重合',
|
||||||
|
cannotMerged: '存在非物理区段,不能合并',
|
||||||
|
linkCannotMerged: '不在同一Link上的物理区段不能合并',
|
||||||
|
|
||||||
meter: '米'
|
selectedSectionEmpty: '选择的区段为空',
|
||||||
|
|
||||||
|
stationFont: '车站字体',
|
||||||
|
kilometerFont: '公里标字体',
|
||||||
|
meter: '米',
|
||||||
|
angle: '度'
|
||||||
};
|
};
|
||||||
|
@ -3,16 +3,25 @@
|
|||||||
<el-menu-item v-for="item in entryList" :key="item.name" class="avatar-wrapper" index="" @click="item.handle">
|
<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>
|
<span style="color: white;">{{ item.name }}</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
|
<deomon-list ref="deomonList" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import DeomonList from '@/views/demonstration/deomonList';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Entry',
|
name: 'Entry',
|
||||||
|
components: {
|
||||||
|
DeomonList
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
entryList: [
|
entryList: [
|
||||||
|
{
|
||||||
|
name: '快速入口',
|
||||||
|
handle: this.quickEntry
|
||||||
|
}
|
||||||
],
|
],
|
||||||
stomp: null,
|
stomp: null,
|
||||||
header: null
|
header: null
|
||||||
@ -28,6 +37,9 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
quickEntry() {
|
||||||
|
this.$refs.deomonList.doShow();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -8,58 +8,63 @@
|
|||||||
text-color="#fff"
|
text-color="#fff"
|
||||||
active-text-color="#ffd04b"
|
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="hasOneScreenShowingChildren(item.children) &&!item.alwaysShow">
|
<template v-if="!item.hidden&&item.children">
|
||||||
<el-menu-item :index="item.redirect">
|
<template v-if="hasOneScreenShowingChildren(item.children) &&!item.alwaysShow">
|
||||||
<a
|
<template>
|
||||||
:href="item.redirect ? item.redirect : (item.path+'/'+item.children[0].path)"
|
<el-menu-item :key="idx" index="">
|
||||||
target="_blank"
|
<a
|
||||||
style="width: 100%; height: 100%; display: block;"
|
:href="item.redirect ? item.redirect : (item.path+'/'+item.children[0].path)"
|
||||||
>{{ item.children[0].meta.title || $t(item.children[0].meta.i18n) }}</a>
|
target="_blank"
|
||||||
</el-menu-item>
|
style="width: 100%; height: 100%; display: block;"
|
||||||
</template>
|
>{{ $t(item.children[0].meta.i18n) }}</a>
|
||||||
<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)">
|
|
||||||
<span
|
|
||||||
v-if="item.children[0].meta"
|
|
||||||
slot="title"
|
|
||||||
>{{ item.children[0].meta.title || $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">
|
|
||||||
<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">
|
|
||||||
<template slot="title">
|
|
||||||
<span v-if="child.meta" slot="title">{{ child.meta.title || $t(item.meta.i18n) }}</span>
|
|
||||||
</template>
|
|
||||||
<template v-for="grandchild in child.children" v-if="!grandchild.hidden">
|
|
||||||
<template :to="child.path+'/'+grandchild.path">
|
|
||||||
<el-menu-item
|
|
||||||
:index="item.redirect ? item.redirect : (child.path+'/'+grandchild.path)"
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
v-if="grandchild.meta"
|
|
||||||
slot="title"
|
|
||||||
>{{ $t(grandchild.meta.title || grandchild.meta.i18n) }}</span>
|
|
||||||
</el-menu-item>
|
|
||||||
</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>
|
</el-menu-item>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</el-submenu>
|
<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&&item.children[0].meta.i18n"
|
||||||
|
slot="title"
|
||||||
|
>{{ $t(item.children[0].meta.i18n) }}</span>
|
||||||
|
</el-menu-item>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
<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="cdx" :index="child.name||child.path" :show-timeout="100">
|
||||||
|
<template slot="title">
|
||||||
|
<span v-if="child.meta" slot="title">{{ $t(child.meta.i18n) }}</span>
|
||||||
|
</template>
|
||||||
|
<template v-for="(grandchild,gdx) in child.children">
|
||||||
|
<template v-if="!grandchild.hidden">
|
||||||
|
<template :to="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.i18n) }}</span>
|
||||||
|
</el-menu-item>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</el-submenu>
|
||||||
|
</template>
|
||||||
|
<template v-else :to="item.path+'/'+child.path">
|
||||||
|
<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>
|
</template>
|
||||||
<quick-entry ref="quickEntry" />
|
<quick-entry ref="quickEntry" />
|
||||||
<user-logout ref="userLogout" />
|
<user-logout ref="userLogout" />
|
||||||
|
@ -1,36 +1,37 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="menu-wrapper">
|
<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"
|
||||||
|
:to="item.path+'/'+item.children[0].path"
|
||||||
|
>
|
||||||
|
<el-menu-item :index="item.path+'/'+item.children[0].path" :class="{'submenu-title-noDropdown':!isNest}">
|
||||||
|
<svg-icon v-if="item.children[0].meta&&item.children[0].meta.icon" :icon-class="item.children[0].meta.icon" />
|
||||||
|
<span v-if="item.children[0].meta&&item.children[0].meta.title" slot="title">{{ item.children[0].meta.title }}</span>
|
||||||
|
</el-menu-item>
|
||||||
|
</router-link>
|
||||||
|
|
||||||
<router-link
|
<el-submenu v-else :key="item.name" :index="item.name||item.path">
|
||||||
v-if="hasOneShowingChildren(item.children) && !item.children[0].children&&!item.alwaysShow"
|
<template slot="title">
|
||||||
:key="item.children[0].name"
|
<svg-icon v-if="item.meta&&item.meta.icon" :icon-class="item.meta.icon" />
|
||||||
:to="item.path+'/'+item.children[0].path"
|
<span v-if="item.meta&&item.meta.title" slot="title">{{ item.meta.title }}</span>
|
||||||
>
|
</template>
|
||||||
<el-menu-item :index="item.path+'/'+item.children[0].path" :class="{'submenu-title-noDropdown':!isNest}">
|
|
||||||
<svg-icon v-if="item.children[0].meta&&item.children[0].meta.icon" :icon-class="item.children[0].meta.icon" />
|
|
||||||
<span v-if="item.children[0].meta&&item.children[0].meta.title" slot="title">{{ item.children[0].meta.title }}</span>
|
|
||||||
</el-menu-item>
|
|
||||||
</router-link>
|
|
||||||
|
|
||||||
<el-submenu v-else :key="item.name" :index="item.name||item.path">
|
|
||||||
<template slot="title">
|
|
||||||
<svg-icon v-if="item.meta&&item.meta.icon" :icon-class="item.meta.icon" />
|
|
||||||
<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">
|
|
||||||
<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" />
|
|
||||||
<span v-if="child.meta&&child.meta.title" slot="title">{{ child.meta.title }}</span>
|
|
||||||
</el-menu-item>
|
|
||||||
</router-link>
|
|
||||||
</template>
|
|
||||||
</el-submenu>
|
|
||||||
|
|
||||||
|
<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" />
|
||||||
|
<span v-if="child.meta&&child.meta.title" slot="title">{{ child.meta.title }}</span>
|
||||||
|
</el-menu-item>
|
||||||
|
</router-link>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</el-submenu>
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -193,6 +193,7 @@ const map = {
|
|||||||
map: null, // 地图数据
|
map: null, // 地图数据
|
||||||
mapDevice: {}, // 解析后的地图数据
|
mapDevice: {}, // 解析后的地图数据
|
||||||
mapList: {}, // 地图数据列表
|
mapList: {}, // 地图数据列表
|
||||||
|
mapIdList: {}, // 地图数据列表(以id为标识)
|
||||||
mapViewLoadedCount: 0, // 地图视图加载完成标识
|
mapViewLoadedCount: 0, // 地图视图加载完成标识
|
||||||
mapDataLoadedCount: 0, // 地图数据加载完成标识
|
mapDataLoadedCount: 0, // 地图数据加载完成标识
|
||||||
trainDetails: null // 地图'列车详情'显示
|
trainDetails: null // 地图'列车详情'显示
|
||||||
@ -476,6 +477,10 @@ const map = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
setMapDataIdList: ({ state }, data) => {
|
||||||
|
state.mapIdList[`mapDate_${data.mapId}`] = data.mapData;
|
||||||
|
},
|
||||||
|
|
||||||
updateMapDevices: ({ commit }, models) => {
|
updateMapDevices: ({ commit }, models) => {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
if (!(models instanceof Array)) {
|
if (!(models instanceof Array)) {
|
||||||
|
@ -63,9 +63,9 @@ function convertRouterRoles({ roles, permissionType }) {
|
|||||||
*/
|
*/
|
||||||
function filterAsyncRouter(asyncRouter, roles, parentsRoles) {
|
function filterAsyncRouter(asyncRouter, roles, parentsRoles) {
|
||||||
return asyncRouter.filter(route => {
|
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;
|
route.hidden = true;
|
||||||
}
|
}
|
||||||
if (hasPermission(roles, route, parentsRoles)) {
|
if (hasPermission(roles, route, parentsRoles)) {
|
||||||
if (route.children && route.children.length) {
|
if (route.children && route.children.length) {
|
||||||
route.children = filterAsyncRouter(route.children, roles, route.meta ? route.meta.roles : undefined);
|
route.children = filterAsyncRouter(route.children, roles, route.meta ? route.meta.roles : undefined);
|
||||||
|
@ -100,8 +100,8 @@ const user = {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
// 设置user域token值
|
// 设置user域token值
|
||||||
commit(token.key, token.value);
|
commit(token.key, token.value);
|
||||||
// let header = { group: '', 'X-Token': token.value };
|
const header = { group: '', 'X-Token': token.value };
|
||||||
// creatSubscribe(perpetualTopic, header);
|
creatSubscribe(perpetualTopic, header);
|
||||||
// 获取用户参数
|
// 获取用户参数
|
||||||
dispatch('GetUserConfigInfo').then(response => {
|
dispatch('GetUserConfigInfo').then(response => {
|
||||||
resolve(response);
|
resolve(response);
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
require('script-loader!file-saver');
|
||||||
|
require('@/utils/Blob');
|
||||||
import XLSX from 'xlsx';
|
import XLSX from 'xlsx';
|
||||||
|
import { translate } from '@/scripts/translate';
|
||||||
|
|
||||||
|
|
||||||
function generateArray(table) {
|
function generateArray(table) {
|
||||||
var out = [];
|
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);
|
if (range.s.c < 10000000) ws['!ref'] = XLSX.utils.encode_range(range);
|
||||||
return ws;
|
return ws;
|
||||||
}
|
}
|
||||||
|
|
||||||
function encode_row(row) { return "" + (row + 1); };
|
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 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) {
|
function safe_format_cell(cell, v) {
|
||||||
@ -179,7 +182,6 @@ export function sheet_to_json(sheet, opts) {
|
|||||||
out.length = outi;
|
out.length = outi;
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
function safe_decode_range(range) {
|
function safe_decode_range(range) {
|
||||||
var o = { s: { c: 0, r: 0 }, e: { c: 0, r: 0 } };
|
var o = { s: { c: 0, r: 0 }, e: { c: 0, r: 0 } };
|
||||||
var idx = 0, i = 0, cc = 0;
|
var idx = 0, i = 0, cc = 0;
|
||||||
@ -227,12 +229,14 @@ function s2ab(s) {
|
|||||||
|
|
||||||
export function export_table_to_excel(id) {
|
export function export_table_to_excel(id) {
|
||||||
var theTable = document.getElementById(id);
|
var theTable = document.getElementById(id);
|
||||||
|
console.log('a')
|
||||||
var oo = generateArray(theTable);
|
var oo = generateArray(theTable);
|
||||||
var ranges = oo[1];
|
var ranges = oo[1];
|
||||||
|
|
||||||
/* original data */
|
/* original data */
|
||||||
var data = oo[0];
|
var data = oo[0];
|
||||||
var ws_name = "SheetJS";
|
var ws_name = "SheetJS";
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
var wb = new Workbook(), ws = sheet_from_array_of_arrays(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")
|
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) {
|
export function export_json_to_excel(th, jsonData, defaultTitle) {
|
||||||
|
|
||||||
/* original data */
|
/* original data */
|
||||||
@ -268,3 +275,43 @@ export function export_json_to_excel(th, jsonData, defaultTitle) {
|
|||||||
var title = defaultTitle || '列表'
|
var title = defaultTitle || '列表'
|
||||||
saveAs(new Blob([s2ab(wbout)], { type: "application/octet-stream" }), title + ".xlsx")
|
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;
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
import store from '@/store';
|
import store from '@/store';
|
||||||
import { getPublishMapVersion, getPublishMapDetail } from '@/api/jmap/map';
|
import { getPublishMapVersion, getPublishMapDetail,getPublishMapVersionById,getPublishMapDetailById} from '@/api/jmap/map';
|
||||||
|
|
||||||
// 获取地图版本数据,和store里面的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);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -1,223 +1,188 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-dialog
|
<el-dialog title="剧本列表" :visible.sync="show" top="50px" width="70%" :before-doClose="doClose"
|
||||||
title="任务列表"
|
:close-on-click-modal="false" :z-index="2000">
|
||||||
:visible.sync="show"
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm"
|
||||||
top="50px"
|
:query-list="queryList">
|
||||||
width="70%"
|
</QueryListPage>
|
||||||
:before-do-close="doClose"
|
</el-dialog>
|
||||||
:close-on-click-modal="false"
|
<el-dialog title="角色选择" :visible.sync="roleShow" top="50px" width="350px" :before-do-close="roleDoClose"
|
||||||
:z-index="2000"
|
:close-on-click-modal="false" :z-index="5000">
|
||||||
>
|
<div>
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
<el-form ref="ruleForm" :model="form" label-width="50px">
|
||||||
</el-dialog>
|
<el-form-item label="角色" prop="role">
|
||||||
<el-dialog
|
<el-select v-model="form.role" placeholder="请选择">
|
||||||
title="角色选择"
|
<el-option v-for="item in memberList" :key="item.id" :label="item.name" :value="item.id"
|
||||||
:visible.sync="roleShow"
|
:disabled="checkDisabled(item.role)" />
|
||||||
top="50px"
|
</el-select>
|
||||||
width="350px"
|
</el-form-item>
|
||||||
:before-do-close="roleDoClose"
|
</el-form>
|
||||||
:close-on-click-modal="false"
|
</div>
|
||||||
:z-index="5000"
|
<span slot="footer" class="dialog-footer">
|
||||||
>
|
<el-button @click="roleDoClose">取 消</el-button>
|
||||||
<div>
|
<el-button type="primary" @click="confirm">确 定</el-button>
|
||||||
<el-form ref="ruleForm" :model="form" :rules="rules" label-width="50px">
|
</span>
|
||||||
<el-form-item label="角色" prop="role">
|
</el-dialog>
|
||||||
<el-select v-model="form.role" placeholder="请选择">
|
</div>
|
||||||
<el-option
|
|
||||||
v-for="item in memberList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
:disabled="checkDisabled(item.role)"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<span slot="footer" class="dialog-footer">
|
|
||||||
<el-button @click="roleDoClose">取 消</el-button>
|
|
||||||
<el-button type="primary" @click="confirm">确 定</el-button>
|
|
||||||
</span>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getQuestPageList, getQuestByIdList } from '@/api/quest';
|
import { getQuestPageListOnline, getQuestByIdList } from '@/api/quest';
|
||||||
import { getSkinStyleList } from '@/api/management/mapskin';
|
import { listPublishMap } from '@/api/jmap/map';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AddQuest',
|
name: 'addQuest',
|
||||||
props: {
|
props: {
|
||||||
trainings: {
|
trainings: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => {
|
},
|
||||||
return [];
|
detail: {
|
||||||
}
|
type: Object,
|
||||||
},
|
}
|
||||||
detail: {
|
},
|
||||||
type: Object,
|
data() {
|
||||||
default: () => {
|
return {
|
||||||
return {};
|
show: false,
|
||||||
}
|
roleShow: false,
|
||||||
}
|
mapList: [],
|
||||||
},
|
pagerConfig: {
|
||||||
data() {
|
pageSize: 'pageSize',
|
||||||
return {
|
pageIndex: 'pageNum'
|
||||||
show: false,
|
},
|
||||||
roleShow: false,
|
row: {},
|
||||||
skinCodeList: [],
|
form: {
|
||||||
pagerConfig: {
|
role: ''
|
||||||
pageSize: 'pageSize',
|
},
|
||||||
pageIndex: 'pageNum'
|
memberList: [],
|
||||||
},
|
queryForm: {
|
||||||
row: {},
|
labelWidth: '80px',
|
||||||
memberList: [],
|
reset: false,
|
||||||
form: {
|
show: false,
|
||||||
role: ''
|
queryObject: {
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
role: [
|
|
||||||
{ required: true, message: '请选择', trigger: 'change' }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
queryForm: {
|
|
||||||
labelWidth: '80px',
|
|
||||||
reset: false,
|
|
||||||
show: false,
|
|
||||||
queryObject: {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
queryList: {
|
queryList: {
|
||||||
query: this.listQuest,
|
query: this.listQuest,
|
||||||
selectCheckShow: false,
|
selectCheckShow: false,
|
||||||
indexShow: true,
|
indexShow: true,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '任务名称',
|
title: '任务名称',
|
||||||
prop: 'name'
|
prop: 'name'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '皮肤类型',
|
title: '地图',
|
||||||
prop: 'skinCode',
|
prop: 'mapId',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.skinCode, this.skinCodeList, ['code', 'name']); },
|
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['id', 'name']); },
|
||||||
tagType: (row) => { return 'success'; }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '创建时间',
|
title: '创建时间',
|
||||||
prop: 'createTime'
|
prop: 'createTime',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
title: '操作',
|
title: '操作',
|
||||||
width: '250',
|
width: '250',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: '加载剧本',
|
name: '加载任务',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
handleClick: this.handleLoad
|
handleClick: this.handleLoad
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
actions: [
|
actions: [
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
currentModel: {}
|
currentModel: {}
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow() {
|
doShow() {
|
||||||
this.show = true;
|
this.show = true;
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.show = false;
|
this.show = false;
|
||||||
},
|
},
|
||||||
listQuest(params) {
|
listQuest(params) {
|
||||||
params['skinCode'] = this.$route.query.skinStyle;
|
params['skinCode'] = this.$route.query.skinStyle;
|
||||||
return getQuestPageList(params);
|
return getQuestPageListOnline(params);
|
||||||
},
|
},
|
||||||
convertList(FromList, ToList, ChecktypeFunction) {
|
convertList(FromList, ToList, ChecktypeFunction) {
|
||||||
if (FromList) {
|
if (FromList) {
|
||||||
ToList.length = 0;
|
ToList.length = 0;
|
||||||
FromList.forEach(elem => {
|
FromList.forEach(elem => {
|
||||||
if (ChecktypeFunction(elem)) {
|
if (ChecktypeFunction(elem)) {
|
||||||
ToList.push({ value: elem.code, label: elem.name });
|
ToList.push({ value: elem.code, label: elem.name });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async loadInitData() {
|
async loadInitData() {
|
||||||
// 皮肤类型
|
// 皮肤类型
|
||||||
this.skinCodeList = [];
|
this.mapList = [];
|
||||||
getSkinStyleList().then(response => {
|
listPublishMap().then(response => {
|
||||||
this.skinCodeList = response.data;
|
this.mapList = response.data;
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
convertField(fieldValue, enumList, converFormat) {
|
||||||
if (converFormat && converFormat.length >= 2) {
|
if (converFormat && converFormat.length >= 2) {
|
||||||
const value = converFormat[0];
|
let value = converFormat[0];
|
||||||
const label = converFormat[1];
|
let label = converFormat[1];
|
||||||
for (let i = 0; i < enumList.length; i++) {
|
for (let i = 0; enumList && i < enumList.length; i++) {
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
if ('' + fieldValue === '' + enumList[i][value]) {
|
||||||
return enumList[i][label];
|
return enumList[i][label];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async handleLoad(index, row) {
|
async handleLoad(index, row) {
|
||||||
this.row = row;
|
this.row = row;
|
||||||
const res = await getQuestByIdList(row.id);
|
const res = await getQuestByIdList(row.id);
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.memberList = res.data.memberVOList;
|
this.memberList = res.data.memberVOList;
|
||||||
this.memberList.unshift({id: '', name: '观众', role: 'Dispatcher'});
|
this.memberList.unshift({ id: '', name: '无', role: 'Dispatcher' });
|
||||||
}
|
}
|
||||||
this.roleShow = true;
|
this.roleShow = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
if (this.queryList && this.queryList.reload) {
|
if (this.queryList && this.queryList.reload) {
|
||||||
this.queryList.reload();
|
this.queryList.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
confirm() {
|
confirm() {
|
||||||
this.$refs['ruleForm'].validate((valid) => {
|
this.$emit('selectQuest', this.row, this.form.role);
|
||||||
if (valid) {
|
this.doClose();
|
||||||
this.$emit('selectQuest', this.row, this.form.role);
|
this.roleDoClose();
|
||||||
this.doClose();
|
},
|
||||||
this.roleDoClose();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
roleDoClose() {
|
roleDoClose() {
|
||||||
this.$refs['ruleForm'].resetFields();
|
this.$refs['ruleForm'].resetFields();
|
||||||
this.roleShow = false;
|
this.roleShow = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
checkDisabled(role) {
|
checkDisabled(role) {
|
||||||
if(this.$route.query.prdType == '01'){
|
if(this.$route.query.prdType == '01'){
|
||||||
return role != 'Attendant';
|
return role !== 'Attendant';
|
||||||
} else if (this.$route.query.prdType == '02'){
|
} else if (this.$route.query.prdType == '02'){
|
||||||
return role != 'Dispatcher';
|
return role !== 'Dispatcher';
|
||||||
}else if (this.$route.query.prdType == '04'){
|
}else if (this.$route.query.prdType == '04'){
|
||||||
return role !== 'Driver';
|
return role !== 'Driver';
|
||||||
}else {
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -79,7 +79,8 @@ import { runDiagramQuit, loadQuest, getSimulationInfo } from '@/api/simulation';
|
|||||||
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
||||||
import { checkLoginLine } from '@/api/login';
|
import { checkLoginLine } from '@/api/login';
|
||||||
// import { isFullscreen } from '@/utils/screen';
|
// 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 { handleToken } from '@/utils/auth';
|
||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
@ -422,10 +423,9 @@ export default {
|
|||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||||
this.switchMode('01');
|
this.switchMode('01');
|
||||||
|
|
||||||
const skinStyle = this.$route.query.skinStyle;
|
const mapId = this.$route.query.mapId;
|
||||||
if (parseInt(skinStyle)) {
|
if (parseInt(mapId)) {
|
||||||
await this.loadMapData(skinStyle);
|
await this.loadMapDataById(mapId);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
}
|
}
|
||||||
@ -449,14 +449,14 @@ export default {
|
|||||||
this.$refs.addQuest.doShow();
|
this.$refs.addQuest.doShow();
|
||||||
},
|
},
|
||||||
// 选择脚本
|
// 选择脚本
|
||||||
async selectQuest(row, role) {
|
async selectQuest(row, id) {
|
||||||
const res = await loadQuest(row.id, this.group);
|
let res = await loadQuest(row.id, id, this.group);
|
||||||
if (res && res.code == 200) {
|
if (res && res.code == 200) {
|
||||||
this.questId = parseInt(row.id);
|
this.questId = parseInt(row.id);
|
||||||
if(res.data && res.data.mapLocation) {
|
if(res.data && res.data.mapLocation) {
|
||||||
let mapLocation={"offsetX":res.data.mapLocation.x,"offsetY":res.data.mapLocation.y,"scaleRate":res.data.mapLocation.scale};
|
let mapLocation={"offsetX":res.data.mapLocation.x,"offsetY":res.data.mapLocation.y,"scaleRate":res.data.mapLocation.scale};
|
||||||
Vue.prototype.$jlmap.setOptions(mapLocation)
|
Vue.prototype.$jlmap.setOptions(mapLocation)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.$refs.menuDemon) {
|
if (this.$refs.menuDemon) {
|
||||||
@ -481,6 +481,19 @@ export default {
|
|||||||
this.endViewLoading();
|
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() {
|
async quit() {
|
||||||
await runDiagramQuit(this.group);
|
await runDiagramQuit(this.group);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form label-width="140px">
|
<el-form label-width="80px">
|
||||||
<el-form-item :label="title">
|
<el-form-item :label="title">
|
||||||
<el-button type="primary" size="small" @click="addDeviceCondition" :disabled="isdisabled">添加</el-button>
|
<el-button type="primary" size="small" @click="addDeviceCondition" :disabled="isdisabled">添加</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
labelWidth: '100px',
|
labelWidth: '100px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'name', label: '剧本名称', type: 'text', required: true},
|
{ prop: 'name', label: '剧本名称', type: 'text', required: true},
|
||||||
{ prop: 'mapId', label: '地图类型', type: 'select', required: true, options: this.mapList,disabled:this.disabled},
|
{ prop: 'mapId', label: '地图', type: 'select', required: true, options: this.mapList,disabled:this.disabled},
|
||||||
{ prop: 'description', label: '剧本描述', type: 'textarea', required: true},
|
{ prop: 'description', label: '剧本描述', type: 'textarea', required: true},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -51,7 +51,7 @@
|
|||||||
{ required: true, message: '请输入剧本', trigger: 'blur' },
|
{ required: true, message: '请输入剧本', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
mapId: [
|
mapId: [
|
||||||
{ required: true, message: '请选择地图类型', trigger: 'change' },
|
{ required: true, message: '请选择地图', trigger: 'change' },
|
||||||
],
|
],
|
||||||
description:[
|
description:[
|
||||||
{ required: true, message: '请输入剧本描述', trigger: 'blur' },
|
{ required: true, message: '请输入剧本描述', trigger: 'blur' },
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
queryObject: {
|
queryObject: {
|
||||||
mapId: {
|
mapId: {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: '地图类型',
|
label: '地图',
|
||||||
config: {
|
config: {
|
||||||
data: []
|
data: []
|
||||||
}
|
}
|
||||||
@ -56,7 +56,7 @@
|
|||||||
prop: 'name'
|
prop: 'name'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '地图类型',
|
title: '地图',
|
||||||
prop: 'mapId',
|
prop: 'mapId',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => {
|
columnValue: (row) => {
|
||||||
@ -143,7 +143,7 @@
|
|||||||
// 录制
|
// 录制
|
||||||
handleRecord(index, row) {
|
handleRecord(index, row) {
|
||||||
scriptRecordNotify(row.id).then(resp => {
|
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 });
|
this.$router.push({ path: `${UrlConfig.display}/script`, query });
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
|
@ -1,255 +1,264 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="card-box" v-loading="loading">
|
<div v-loading="loading" class="card-box">
|
||||||
<el-steps class="steps" :active="display">
|
<el-steps class="steps" :active="display">
|
||||||
<el-step :title="title" icon="el-icon-edit-outline"></el-step>
|
<el-step :title="title" icon="el-icon-edit-outline" />
|
||||||
<el-step title="" icon="el-icon-upload"></el-step>
|
<el-step title="" icon="el-icon-upload" />
|
||||||
</el-steps>
|
</el-steps>
|
||||||
<el-card class="forms">
|
<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 ref="form" :model="addModel" label-width="140px">
|
||||||
<el-form-item label="皮肤类型:" prop="mapName">
|
<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>
|
||||||
<el-form-item label="产品类型:" prop="prdType">
|
<el-form-item label="产品类型:" prop="prdType">
|
||||||
<el-radio-group v-model="addModel.prdType" :disabled="isUpdate">
|
<el-radio-group v-model="addModel.prdType" :disabled="isUpdate">
|
||||||
<template v-for="item in chooseList">
|
<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>
|
</template>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="产品编码:" prop="code"
|
<el-form-item
|
||||||
:rules="node && node.data.type ==='skin' ? baseRules.code:{}">
|
label="产品编码:"
|
||||||
<el-input v-model="addModel.code" :disabled="codeDisabled"></el-input>
|
prop="code"
|
||||||
</el-form-item>
|
:rules="node && node.data.type ==='skin' ? baseRules.code:{}"
|
||||||
<el-form-item label="产品名称:" prop="name" :rules="baseRules.name">
|
>
|
||||||
<el-input v-model="addModel.name"></el-input>
|
<el-input v-model="addModel.code" :disabled="codeDisabled" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关联实训类型:" prop="trainTypes" :rules="baseRules.trainTypes"
|
<el-form-item label="产品名称:" prop="name" :rules="baseRules.name">
|
||||||
v-if="isShowTrainTypes">
|
<el-input v-model="addModel.name" />
|
||||||
<el-select v-model="addModel.trainTypes" multiple placeholder="请选择" @change="trainTypesChange">
|
</el-form-item>
|
||||||
<el-option v-for="item in trainTypesList" :key="item.code" :label="item.name"
|
<el-form-item
|
||||||
:value="item.code">
|
v-if="isShowTrainTypes"
|
||||||
</el-option>
|
label="关联实训类型:"
|
||||||
</el-select>
|
prop="trainTypes"
|
||||||
</el-form-item>
|
:rules="baseRules.trainTypes"
|
||||||
<el-form-item label="产品说明:" prop="remarks" :rules="baseRules.remarks">
|
>
|
||||||
<el-input v-model="addModel.remarks" type="textarea" :rows="4"></el-input>
|
<el-select v-model="addModel.trainTypes" multiple placeholder="请选择" @change="trainTypesChange">
|
||||||
</el-form-item>
|
<el-option
|
||||||
</el-form>
|
v-for="item in trainTypesList"
|
||||||
</el-scrollbar>
|
:key="item.code"
|
||||||
</el-card>
|
:label="item.name"
|
||||||
<div class="draft">
|
:value="item.code"
|
||||||
<el-button-group>
|
/>
|
||||||
<el-button type="primary" v-if="isCreate" @click="create">创建</el-button>
|
</el-select>
|
||||||
<el-button type="primary" v-if="isUpdate" @click="update">更新</el-button>
|
</el-form-item>
|
||||||
<el-button type="danger" v-if="isDelete" @click="deleteObj">删除</el-button>
|
<el-form-item label="产品说明:" prop="remarks" :rules="baseRules.remarks">
|
||||||
</el-button-group>
|
<el-input v-model="addModel.remarks" type="textarea" :rows="4" />
|
||||||
</div>
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-scrollbar>
|
||||||
|
</el-card>
|
||||||
|
<div class="draft">
|
||||||
|
<el-button-group>
|
||||||
|
<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>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
// import { getPublishMapInfo } from '@/api/jmap/map';
|
||||||
import { createTrainingCategory, updateTrainingCategory, getProductDetail, deleteTrainingCategory, checkMapProductCodeExist } from '@/api/management/mapprd'
|
import { createTrainingCategory, updateTrainingCategory, getProductDetail, deleteTrainingCategory, checkMapProductCodeExist } from '@/api/management/mapprd';
|
||||||
import localStore from 'storejs';
|
// import localStore from 'storejs';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ShowDetail',
|
name: 'ShowDetail',
|
||||||
props: {
|
props: {
|
||||||
height: {
|
height: {
|
||||||
type: Number
|
type: Number
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
node: null,
|
node: null,
|
||||||
display: 1,
|
display: 1,
|
||||||
codeDisabled: true,
|
codeDisabled: true,
|
||||||
rules: {},
|
rules: {},
|
||||||
trainTypesList: [],
|
trainTypesList: [],
|
||||||
initTrainTypes: [],
|
initTrainTypes: [],
|
||||||
chooseList: [],
|
chooseList: [],
|
||||||
addModel: {
|
addModel: {
|
||||||
id: '',
|
id: '',
|
||||||
mapId: '',
|
mapId: '',
|
||||||
mapName: '',
|
mapName: '',
|
||||||
skinStyle: '',
|
skinStyle: '',
|
||||||
name: '',
|
name: '',
|
||||||
remarks: '',
|
remarks: '',
|
||||||
code: '',
|
code: '',
|
||||||
prdType: '01',
|
prdType: '01',
|
||||||
trainTypes: []
|
trainTypes: []
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
if (this.node && this.node.data) {
|
if (this.node && this.node.data) {
|
||||||
if (this.node.data.type === 'skin') {
|
if (this.node.data.type === 'skin') {
|
||||||
return '创建产品类目';
|
return '创建产品类目';
|
||||||
} else if (this.node.data.type === 'prd' ||
|
} else if (this.node.data.type === 'prd' ||
|
||||||
this.node.data.type === 'prd') {
|
this.node.data.type === 'prd') {
|
||||||
return '编辑产品类目';
|
return '编辑产品类目';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return '请选择操作';
|
return '请选择操作';
|
||||||
},
|
},
|
||||||
isCreate() {
|
isCreate() {
|
||||||
return this.node && this.node.data.type === 'skin';
|
return this.node && this.node.data.type === 'skin';
|
||||||
},
|
},
|
||||||
isUpdate() {
|
isUpdate() {
|
||||||
return this.node && this.node.data.type === 'prd';
|
return this.node && this.node.data.type === 'prd';
|
||||||
},
|
},
|
||||||
isDelete() {
|
isDelete() {
|
||||||
return this.node && this.node.data.type === 'prd';
|
return this.node && this.node.data.type === 'prd';
|
||||||
},
|
},
|
||||||
isShowTrainTypes() {
|
isShowTrainTypes() {
|
||||||
return this.addModel.prdType != '03' && this.addModel.prdType != '04';
|
return this.addModel.prdType != '03' && this.addModel.prdType != '04';
|
||||||
},
|
},
|
||||||
baseRules() {
|
baseRules() {
|
||||||
return {
|
return {
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: '请输入产品编码', trigger: 'change' }
|
{ required: true, message: '请输入产品编码', trigger: 'change' }
|
||||||
],
|
],
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '请输入产品名称', trigger: 'change' }
|
{ required: true, message: '请输入产品名称', trigger: 'change' }
|
||||||
],
|
],
|
||||||
remarks: [
|
remarks: [
|
||||||
{ required: true, message: '请输入产品说明', trigger: 'change' }
|
{ required: true, message: '请输入产品说明', trigger: 'change' }
|
||||||
],
|
],
|
||||||
trainTypes: [
|
trainTypes: [
|
||||||
{ required: true, message: '请选择关联实训类型', trigger: 'change' }
|
{ required: true, message: '请选择关联实训类型', trigger: 'change' }
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$Dictionary.trainingType().then(list => {
|
this.$Dictionary.trainingType().then(list => {
|
||||||
this.trainTypesList = list;
|
this.trainTypesList = list;
|
||||||
});
|
});
|
||||||
this.$Dictionary.productPostType().then(list => {
|
this.$Dictionary.productPostType().then(list => {
|
||||||
this.chooseList = list;
|
this.chooseList = list;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadData(node) {
|
loadData(node) {
|
||||||
if (node) {
|
if (node) {
|
||||||
//清除数据
|
// 清除数据
|
||||||
this.node = node;
|
this.node = node;
|
||||||
this.initTrainTypes = [];
|
this.initTrainTypes = [];
|
||||||
this.$refs.form.resetFields();
|
this.$refs.form.resetFields();
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
if ('skin' === node.data.type) {
|
if (node.data.type === 'skin') {
|
||||||
this.codeDisabled = false;
|
this.codeDisabled = false;
|
||||||
this.addModel.mapName = node.data.name;
|
this.addModel.mapName = node.data.name;
|
||||||
this.addModel.skinStyle = node.data.id;
|
this.addModel.skinStyle = node.data.id;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
} else if ('prd' === node.data.type) {
|
} else if (node.data.type === 'prd') {
|
||||||
this.codeDisabled = true;
|
this.codeDisabled = true;
|
||||||
getProductDetail(node.data.id).then(response => {
|
getProductDetail(node.data.id).then(response => {
|
||||||
this.addModel.mapName = node.parent.data.name;
|
this.addModel.mapName = node.parent.data.name;
|
||||||
this.addModel.mapId = node.parent.data.id;
|
this.addModel.mapId = node.parent.data.id;
|
||||||
this.addModel.name = response.data.name;
|
this.addModel.name = response.data.name;
|
||||||
this.addModel.remarks = response.data.remarks;
|
this.addModel.remarks = response.data.remarks;
|
||||||
this.addModel.prdType = response.data.prdType;
|
this.addModel.prdType = response.data.prdType;
|
||||||
this.addModel.code = response.data.code;
|
this.addModel.code = response.data.code;
|
||||||
this.addModel.skinStyle = response.data.skinStyle;
|
this.addModel.skinStyle = response.data.skinStyle;
|
||||||
this.addModel.trainTypes = this.initTrainTypes = response.data.trainTypes;
|
this.addModel.trainTypes = this.initTrainTypes = response.data.trainTypes;
|
||||||
this.addModel.id = response.data.id;
|
this.addModel.id = response.data.id;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.addModel.prdType = '01';
|
this.addModel.prdType = '01';
|
||||||
}
|
}
|
||||||
|
|
||||||
//清除表单验证提示信息
|
// 清除表单验证提示信息
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$refs.form.clearValidate();
|
this.$refs.form.clearValidate();
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
create() {
|
create() {
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let data = {
|
const data = {
|
||||||
skinStyle: this.addModel.skinStyle,
|
skinStyle: this.addModel.skinStyle,
|
||||||
mapName: this.addModel.mapName,
|
mapName: this.addModel.mapName,
|
||||||
name: this.addModel.name,
|
name: this.addModel.name,
|
||||||
remarks: this.addModel.remarks,
|
remarks: this.addModel.remarks,
|
||||||
prdType: this.addModel.prdType,
|
prdType: this.addModel.prdType,
|
||||||
code: this.addModel.code,
|
code: this.addModel.code,
|
||||||
trainTypes: this.isShowTrainTypes ? this.addModel.trainTypes : []
|
trainTypes: this.isShowTrainTypes ? this.addModel.trainTypes : []
|
||||||
};
|
};
|
||||||
checkMapProductCodeExist({ code: this.addModel.code }).then(response => {
|
checkMapProductCodeExist({ code: this.addModel.code }).then(response => {
|
||||||
if (!response.data) {
|
if (!response.data) {
|
||||||
createTrainingCategory(data).then(response => {
|
createTrainingCategory(data).then(response => {
|
||||||
this.initTrainTypes = this.addModel.trainTypes;
|
this.initTrainTypes = this.addModel.trainTypes;
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
this.$message.success('创建产品成功');
|
this.$message.success('创建产品成功');
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox('创建产品失败');
|
this.$messageBox('创建产品失败');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox('产品Code已存在');
|
this.$messageBox('产品Code已存在');
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox('校验产品Code是否已存在失败');
|
this.$messageBox('校验产品Code是否已存在失败');
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
update() {
|
update() {
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.addModel.trainTypes = this.isShowTrainTypes ? this.addModel.trainTypes : []
|
this.addModel.trainTypes = this.isShowTrainTypes ? this.addModel.trainTypes : [];
|
||||||
updateTrainingCategory(this.addModel).then(response => {
|
updateTrainingCategory(this.addModel).then(response => {
|
||||||
this.initTrainTypes = this.addModel.trainTypes;
|
this.initTrainTypes = this.addModel.trainTypes;
|
||||||
this.$message.success('更新产品成功');
|
this.$message.success('更新产品成功');
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox('更新产品失败');
|
this.$messageBox('更新产品失败');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
trainTypesChange(tag) {
|
trainTypesChange(tag) {
|
||||||
if (this.initTrainTypes && this.initTrainTypes.length > 0) {
|
if (this.initTrainTypes && this.initTrainTypes.length > 0) {
|
||||||
this.initTrainTypes.forEach(elem => {
|
this.initTrainTypes.forEach(elem => {
|
||||||
if (this.addModel.trainTypes.indexOf(elem) < 0) {
|
if (this.addModel.trainTypes.indexOf(elem) < 0) {
|
||||||
this.addModel.trainTypes = this.initTrainTypes;
|
this.addModel.trainTypes = this.initTrainTypes;
|
||||||
this.$messageBox('不能缩小上次创建的实训列表的范围');
|
this.$messageBox('不能缩小上次创建的实训列表的范围');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deleteObj() {
|
deleteObj() {
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
deleteTrainingCategory(this.addModel).then(response => {
|
deleteTrainingCategory(this.addModel).then(response => {
|
||||||
this.$message.success('删除产品成功');
|
this.$message.success('删除产品成功');
|
||||||
this.$refs.form.resetFields();
|
this.$refs.form.resetFields();
|
||||||
this.node = null;
|
this.node = null;
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
if (error.code === 500009) {
|
if (error.code === 500009) {
|
||||||
this.$messageBox('产品已被使用无法删除');
|
this.$messageBox('产品已被使用无法删除');
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox('删除产品失败');
|
this.$messageBox('删除产品失败');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
|
||||||
|
|
||||||
.card-box {
|
.card-box {
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
}
|
}
|
||||||
@ -300,4 +309,4 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 20px auto;
|
margin: 20px auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,51 +1,50 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="training-tree">
|
<div class="training-tree">
|
||||||
<training-tree-operate ref="trainingTree" :height="height" @loadData="loadData">
|
<training-tree-operate ref="trainingTree" :height="height" @loadData="loadData" />
|
||||||
</training-tree-operate>
|
|
||||||
</div>
|
|
||||||
<div class="training-draft" :style="{width: width +'px'}">
|
|
||||||
<edit-detail-operate ref="training" :height="height" @refresh="refresh"> </edit-detail-operate>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="training-draft" :style="{width: width +'px'}">
|
||||||
|
<edit-detail-operate ref="training" :height="height" @refresh="refresh" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { deleteMap, listMap, newMap, getMapDetail, publishMap, editMap, saveAsMap } from '@/api/jmap/mapdraft'
|
// import { deleteMap, listMap, newMap, getMapDetail, publishMap, editMap, saveAsMap } from '@/api/jmap/mapdraft';
|
||||||
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||||
import TrainingTreeOperate from './tree';
|
import TrainingTreeOperate from './tree';
|
||||||
import EditDetailOperate from './edit';
|
import EditDetailOperate from './edit';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainingEditOperate',
|
name: 'TrainingEditOperate',
|
||||||
components: {
|
components: {
|
||||||
EditDetailOperate,
|
EditDetailOperate,
|
||||||
TrainingTreeOperate
|
TrainingTreeOperate
|
||||||
},
|
},
|
||||||
mixins: [WindowResizeHandler],
|
mixins: [WindowResizeHandler],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
width: 0,
|
width: 0,
|
||||||
height: 0
|
height: 0
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
resizeHandler() {
|
resizeHandler() {
|
||||||
this.width = this._clientWidth - 420;
|
this.width = this._clientWidth - 420;
|
||||||
this.height = this._clientHeight - 150;
|
this.height = this._clientHeight - 150;
|
||||||
},
|
},
|
||||||
loadData(node) {
|
loadData(node) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.training.loadData(node);
|
this.$refs.training.loadData(node);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
refresh() {
|
refresh() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.trainingTree.refresh();
|
this.$refs.trainingTree.refresh();
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
@ -58,4 +57,4 @@
|
|||||||
.training-draft {
|
.training-draft {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||||
<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-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<el-button-group class="map-draft-group">
|
<el-button-group class="map-draft-group">
|
||||||
<el-button type="primary" @click="edit">修改</el-button>
|
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
<el-button type="primary" @click="deleteObj">删除</el-button>
|
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" label="创建" name="second">
|
<el-tab-pane class="view-control" :label="$t('map.create')" name="second">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<el-form ref="make" size="mini">
|
<el-form ref="make" size="mini">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -18,21 +18,21 @@
|
|||||||
v-model="linksCollection"
|
v-model="linksCollection"
|
||||||
filterable
|
filterable
|
||||||
:filter-method="filterLinks"
|
:filter-method="filterLinks"
|
||||||
filter-placeholder="请输入Link名称"
|
:filter-placeholder="$t('rules.linkSelectName')"
|
||||||
:data="DatasCollection"
|
:data="DatasCollection"
|
||||||
:titles="['Link集合', '选择Link']"
|
:titles="[$t('map.linkSet'), $t('map.selectLink')]"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<el-button-group class="map-draft-group">
|
<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-button-group>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" label="拆分/合并" name="three">
|
<el-tab-pane class="view-control" :label="$t('map.splitMerge')" name="three">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight+60+'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight+60+'px' }">
|
||||||
<el-form ref="oprt" :model="addModel" label-width="130px" size="mini" :rules="addRules">
|
<el-form ref="oprt" :model="addModel" label-width="130px" size="mini" :rules="addRules">
|
||||||
<el-form-item label="区段名称:" prop="code">
|
<el-form-item :label="$t('map.sectionNameC')" prop="code">
|
||||||
<el-select v-model="addModel.code" filterable>
|
<el-select v-model="addModel.code" filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in PhysicalSectionList"
|
v-for="item in PhysicalSectionList"
|
||||||
@ -44,20 +44,20 @@
|
|||||||
<el-button
|
<el-button
|
||||||
:type="field === 'splitSection' ? 'danger' : 'primary'"
|
:type="field === 'splitSection' ? 'danger' : 'primary'"
|
||||||
@click="hover('splitSection')"
|
@click="hover('splitSection')"
|
||||||
>激活</el-button>
|
>{{ $t('map.activate') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="拆分偏移量:" prop="splitOffset">
|
<el-form-item :label="$t('map.splitOffset')" prop="splitOffset">
|
||||||
<el-input-number v-model="addModel.splitOffset" :min="20" :max="addModel.splitOffsetMax" />px
|
<el-input-number v-model="addModel.splitOffset" :min="20" :max="addModel.splitOffsetMax" />px
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button type="primary" size="big" @click="split">拆分</el-button>
|
<el-button type="primary" size="big" @click="split">{{ $t('map.split') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-form ref="oprt1" :model="mergeModel" label-width="130px" size="mini" :rules="mergeRules">
|
<el-form ref="oprt1" :model="mergeModel" label-width="130px" size="mini" :rules="mergeRules">
|
||||||
<el-form-item label="左侧区段名称:" prop="lsectioncode">
|
<el-form-item :label="$t('map.sectionLsectioncode')" prop="lsectioncode">
|
||||||
<el-select v-model="mergeModel.lsectioncode" filterable placeholder="请选择">
|
<el-select v-model="mergeModel.lsectioncode" filterable :placeholder="$t('rules.pleaseSelect')">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in ReverseSectionList"
|
v-for="item in ReverseSectionList"
|
||||||
:key="item.code"
|
:key="item.code"
|
||||||
@ -68,10 +68,10 @@
|
|||||||
<el-button
|
<el-button
|
||||||
:type="field === 'leftSection' ? 'danger' : 'primary'"
|
:type="field === 'leftSection' ? 'danger' : 'primary'"
|
||||||
@click="hover('leftSection')"
|
@click="hover('leftSection')"
|
||||||
>激活</el-button>
|
>{{ $t('map.activate') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="右侧区段名称:" prop="rsectioncode">
|
<el-form-item :label="$t('map.sectionRsectioncode')" prop="rsectioncode">
|
||||||
<el-select v-model="mergeModel.rsectioncode" filterable placeholder="请选择">
|
<el-select v-model="mergeModel.rsectioncode" filterable :placeholder="$t('rules.pleaseSelect')">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in ReverseSectionList"
|
v-for="item in ReverseSectionList"
|
||||||
:key="item.code"
|
:key="item.code"
|
||||||
@ -82,59 +82,59 @@
|
|||||||
<el-button
|
<el-button
|
||||||
:type="field === 'rightSection' ? 'danger' : 'primary'"
|
:type="field === 'rightSection' ? 'danger' : 'primary'"
|
||||||
@click="hover('rightSection')"
|
@click="hover('rightSection')"
|
||||||
>激活</el-button>
|
>{{ $t('map.activate') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button type="primary" size="big" @click="merge">合并</el-button>
|
<el-button type="primary" size="big" @click="merge">{{ $t('map.merge') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" label="逻辑区段" name="four">
|
<el-tab-pane class="view-control" :label="$t('map.logicBlock')" name="four">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<el-table :data="tableData" style="width: 80%; margin: 0 auto;">
|
<el-table :data="tableData" style="width: 80%; margin: 0 auto;">
|
||||||
<el-table-column label="区段折线" width="150">
|
<el-table-column :label="$t('map.sectionPolyline')" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span style="margin-left: 10px">第{{ scope.row.index }}段折线</span>
|
<span style="margin-left: 10px">{{ $t('map.aux') }}{{ scope.row.index }}{{ $t('map.sectionLine') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="逻辑区段数量" width="130">
|
<el-table-column :label="$t('map.sectionLogicalNumber')" width="130">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.num" size="mini" />
|
<el-input v-model="scope.row.num" size="mini" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作">
|
<el-table-column :label="$t('map.operation')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">清空
|
<el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">{{ $t('map.empty') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<el-button-group class="map-draft-group">
|
<el-button-group class="map-draft-group">
|
||||||
<el-button type="primary" @click="editSectionNum">修改</el-button>
|
<el-button type="primary" @click="editSectionNum">{{ $t('map.updateObj') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" label="道岔区段" name="five">
|
<el-tab-pane class="view-control" :label="$t('map.switchSection')" name="five">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight+60+'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight+60+'px' }">
|
||||||
<el-form ref="switchSectionCreate" label-width="110px">
|
<el-form ref="switchSectionCreate" label-width="110px">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="danger" @click="removeSwitchSection">一键删除道岔区段</el-button>
|
<el-button type="danger" @click="removeSwitchSection">{{ $t('map.deleteSwitchSection') }}</el-button>
|
||||||
<el-button type="primary" @click="createSwitchSection">一键创建道岔区段</el-button>
|
<el-button type="primary" @click="createSwitchSection">{{ $t('map.createSwitchSection') }}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" label="规则修改" name="six">
|
<el-tab-pane class="view-control" :label="$t('map.rulesChange')" name="six">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<el-form ref="fiveRule" :model="editRuleModel" label-width="120px" size="mini" :rules="editRule">
|
<el-form ref="fiveRule" :model="editRuleModel" label-width="120px" size="mini" :rules="editRule">
|
||||||
<el-form-item label="坐标 y:" prop="pointY">
|
<el-form-item :label="$t('map.pointY')" prop="pointY">
|
||||||
<el-input-number v-model="editRuleModel.pointY" />
|
<el-input-number v-model="editRuleModel.pointY" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="列车所在方向:" prop="trainType">
|
<el-form-item :label="$t('map.trainDirection')" prop="trainType">
|
||||||
<el-select v-model="editRuleModel.trainType" filterable placeholder="请选择">
|
<el-select v-model="editRuleModel.trainType" filterable :placeholder="$t('map.pleaseSelect')">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="option in TrainPositionTypeList"
|
v-for="option in TrainPositionTypeList"
|
||||||
:key="option.code"
|
:key="option.code"
|
||||||
@ -146,7 +146,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<el-button-group class="map-draft-group">
|
<el-button-group class="map-draft-group">
|
||||||
<el-button type="primary" @click="editSectionTrain">修改</el-button>
|
<el-button type="primary" @click="editSectionTrain">{{ $t('map.updateObj') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
@ -247,24 +247,24 @@ export default {
|
|||||||
field: '',
|
field: '',
|
||||||
addRules: {
|
addRules: {
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: '请选择区段名称', trigger: 'change' }
|
{ required: true, message: this.$t('rules.pleaseSelectSectionName'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
splitOffset: [
|
splitOffset: [
|
||||||
{ required: true, message: '请填写偏移量', trigger: 'blur' },
|
{ required: true, message: this.$t('rules.pleaseFillOffset'), trigger: 'blur' },
|
||||||
{ type: 'number', message: '请填写数值', min: '20' }
|
{ type: 'number', message: this.$t('rules.pleaseFillValue'), min: '20' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
mergeRules: {
|
mergeRules: {
|
||||||
lsectioncode: [
|
lsectioncode: [
|
||||||
{ required: true, message: '请选择左侧区段名称', trigger: 'change' }
|
{ required: true, message: this.$t('rules.pleaseSelectLeftSectionName'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
rsectioncode: [
|
rsectioncode: [
|
||||||
{ required: true, message: '请选择右侧区段名称', trigger: 'change' }
|
{ required: true, message: this.$t('rules.pleaseSelectRightSectionName'), trigger: 'change' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
editRule: {
|
editRule: {
|
||||||
pointY: [
|
pointY: [
|
||||||
{ required: true, message: '请输入坐标Y值', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.pleaseEnterYValue'), trigger: 'blur' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -283,68 +283,68 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '160px',
|
labelWidth: '160px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'stationCode', label: '所属设备集中站:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', disabled: this.isStationCodeDisabled, options: this.stationList },
|
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', disabled: this.isStationCodeDisabled, options: this.stationList },
|
||||||
{ prop: 'parentCode', label: '关联物理区段:', type: 'select', optionLabel: 'code&&name', optionValue: 'code', disabled: true, options: this.sectionList, isHidden: !this.isParentCode },
|
{ prop: 'parentCode', label: this.$t('map.associatedSection'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', disabled: true, options: this.sectionList, isHidden: !this.isParentCode },
|
||||||
{ prop: 'code', label: '区段编码:', type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.sectionList, change: true, deviceChange: this.deviceChange },
|
{ prop: 'code', label: this.$t('map.blockCoding'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.sectionList, change: true, deviceChange: this.deviceChange },
|
||||||
{ prop: 'type', label: '区段类型:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionTypeList },
|
{ prop: 'type', label: this.$t('map.sectionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionTypeList },
|
||||||
{ prop: 'name', label: '区段名称:', type: 'input' },
|
{ prop: 'name', label: this.$t('map.sectionNameColon'), type: 'input' },
|
||||||
{ prop: 'namePoint', label: '区段名称偏移量:', type: 'coordinate', width: '150px', children: [
|
{ prop: 'namePoint', label: this.$t('map.sectionNameOffset'), type: 'coordinate', width: '150px', children: [
|
||||||
{ prop: 'namePoint.x', firstLevel: 'namePoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
|
{ prop: 'namePoint.x', firstLevel: 'namePoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
|
||||||
{ prop: 'namePoint.y', firstLevel: 'namePoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
|
{ prop: 'namePoint.y', firstLevel: 'namePoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
|
||||||
] },
|
] },
|
||||||
{ prop: 'kmRangeLeft', label: '左侧公里标(米):', type: 'number', min: 0 },
|
{ prop: 'kmRangeLeft', label: this.$t('map.leftKilometerMark'), type: 'number', min: 0 },
|
||||||
{ prop: 'kmRangeRight', label: '右侧公里标(米):', type: 'number', min: 0 },
|
{ prop: 'kmRangeRight', label: this.$t('map.rightKilometerMark'), type: 'number', min: 0 },
|
||||||
{ prop: 'region', label: '区间:', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.regionList },
|
{ prop: 'region', label: this.$t('map.sectionColon'), type: 'select', optionLabel: 'label', optionValue: 'value', options: this.regionList },
|
||||||
{ prop: 'nameShow', label: '是否显示区段名称:', type: 'checkbox', isHidden: !this.isSectionType },
|
{ prop: 'nameShow', label: this.$t('map.displayExtentName'), type: 'checkbox', isHidden: !this.isSectionType },
|
||||||
{ prop: 'axleShow', label: '是否显示计轴:', type: 'checkbox', disabled: this.isStationAxleShow, isHidden: !this.isSectionType},
|
{ prop: 'axleShow', label: this.$t('map.displayAxleCounter'), type: 'checkbox', disabled: this.isStationAxleShow, isHidden: !this.isSectionType},
|
||||||
{ prop: 'logicSectionShow', label: '是否显示逻辑区段:', type: 'checkbox', isHidden: !this.isSectionType },
|
{ prop: 'logicSectionShow', label: this.$t('map.displayLogicalExtents'), type: 'checkbox', isHidden: !this.isSectionType },
|
||||||
{ prop: 'logicSectionNameShow', label: '是否显示逻辑区段名称:', type: 'checkbox', disabled: this.islogicSectionNameShow, isHidden: !this.isSectionType },
|
{ prop: 'logicSectionNameShow', label: this.$t('map.displayLogicalWxtentNames'), type: 'checkbox', disabled: this.islogicSectionNameShow, isHidden: !this.isSectionType },
|
||||||
{ prop: 'isStandTrack', label: '是否站台轨:', type: 'checkbox', isHidden: !this.isSectionType },
|
{ prop: 'isStandTrack', label: this.$t('map.isStandTrack'), type: 'checkbox', isHidden: !this.isSectionType },
|
||||||
{ prop: 'standTrackName', label: '站台轨名称:', type: 'input', isHidden: !this.isstandTrackNameShow },
|
{ prop: 'standTrackName', label: this.$t('map.standTrackName'), type: 'input', isHidden: !this.isstandTrackNameShow },
|
||||||
{ prop: 'standTrackNamePosition', label: '站台轨名称偏移量:', type: 'coordinate', width: '150px', isHidden: !this.isstandTrackNameShow, children: [
|
{ prop: 'standTrackNamePosition', label: this.$t('map.standTrackNamePosition'), type: 'coordinate', width: '150px', isHidden: !this.isstandTrackNameShow, children: [
|
||||||
{ prop: 'standTrackNamePosition.x', firstLevel: 'standTrackNamePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px'},
|
{ prop: 'standTrackNamePosition.x', firstLevel: 'standTrackNamePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px'},
|
||||||
{ prop: 'standTrackNamePosition.y', firstLevel: 'standTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px'}
|
{ prop: 'standTrackNamePosition.y', firstLevel: 'standTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px'}
|
||||||
] },
|
] },
|
||||||
{ prop: 'relStandCode', label: '站台编码:', type: 'selectHover', optionLabel: 'code&&name', optionValue: 'code', options: this.stationStandList, hover: this.hover, buttonType: 'relStandCode', buttonShowType: this.isButtonType, isHidden: !this.isrelStandCode },
|
{ prop: 'relStandCode', label: this.$t('map.relStandCode'), type: 'selectHover', optionLabel: 'code&&name', optionValue: 'code', options: this.stationStandList, hover: this.hover, buttonType: 'relStandCode', buttonShowType: this.isButtonType, isHidden: !this.isrelStandCode },
|
||||||
{ prop: 'isReentryTrack', label: '是否折返轨:', type: 'checkbox', isHidden: !this.isSectionType },
|
{ prop: 'isReentryTrack', label: this.$t('map.isReentryTrack'), type: 'checkbox', isHidden: !this.isSectionType },
|
||||||
{ prop: 'reentryTrackName', label: '折返轨名称:', type: 'input', isHidden: !this.isreentryTrackName },
|
{ prop: 'reentryTrackName', label: this.$t('map.reentryTrackName'), type: 'input', isHidden: !this.isreentryTrackName },
|
||||||
{ prop: 'reentryTrackNamePosition', label: '折返轨名称偏移量:', type: 'coordinate', width: '150px', isHidden: !this.isreentryTrackName, children: [
|
{ prop: 'reentryTrackNamePosition', label: this.$t('map.reentryTrackNamePosition'), type: 'coordinate', width: '150px', isHidden: !this.isreentryTrackName, children: [
|
||||||
{ prop: 'reentryTrackNamePosition.x', firstLevel: 'reentryTrackNamePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px'},
|
{ prop: 'reentryTrackNamePosition.x', firstLevel: 'reentryTrackNamePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px'},
|
||||||
{ prop: 'reentryTrackNamePosition.y', firstLevel: 'reentryTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px'}
|
{ prop: 'reentryTrackNamePosition.y', firstLevel: 'reentryTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px'}
|
||||||
] },
|
] },
|
||||||
{ prop: 'isTransferTrack', label: '是否转换轨:', type: 'checkbox', isHidden: !this.isSectionType },
|
{ prop: 'isTransferTrack', label: this.$t('map.isTransferTrack'), type: 'checkbox', isHidden: !this.isSectionType },
|
||||||
{ prop: 'transferTrackName', label: '转换轨名称:', type: 'input', isHidden: !this.istransferTrackName },
|
{ prop: 'transferTrackName', label: this.$t('map.transferTrackName'), type: 'input', isHidden: !this.istransferTrackName },
|
||||||
{ prop: 'transferTrackNamePosition', label: '转换轨名称偏移量:', type: 'coordinate', width: '150px', isHidden: !this.istransferTrackName, children: [
|
{ prop: 'transferTrackNamePosition', label: this.$t('map.transferTrackNamePosition'), type: 'coordinate', width: '150px', isHidden: !this.istransferTrackName, children: [
|
||||||
{ prop: 'transferTrackNamePosition.x', firstLevel: 'transferTrackNamePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px'},
|
{ prop: 'transferTrackNamePosition.x', firstLevel: 'transferTrackNamePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px'},
|
||||||
{ prop: 'transferTrackNamePosition.y', firstLevel: 'transferTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px'}
|
{ prop: 'transferTrackNamePosition.y', firstLevel: 'transferTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px'}
|
||||||
] },
|
] },
|
||||||
{ prop: 'destinationCode', label: '目的地码:', type: 'input', isHidden: !this.isdestinationCode },
|
{ prop: 'destinationCode', label: this.$t('map.destinationCode'), type: 'input', isHidden: !this.isdestinationCode },
|
||||||
{ prop: 'destinationCodePoint', label: '目的地码坐标:', type: 'coordinate', width: '150px', isHidden: !this.isdestinationCode, children: [
|
{ prop: 'destinationCodePoint', label: this.$t('map.destinationCodePoint'), type: 'coordinate', width: '150px', isHidden: !this.isdestinationCode, children: [
|
||||||
{ prop: 'destinationCodePoint.x', firstLevel: 'destinationCodePoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px'},
|
{ prop: 'destinationCodePoint.x', firstLevel: 'destinationCodePoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px'},
|
||||||
{ prop: 'destinationCodePoint.y', firstLevel: 'destinationCodePoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px'}
|
{ prop: 'destinationCodePoint.y', firstLevel: 'destinationCodePoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px'}
|
||||||
] },
|
] },
|
||||||
{ prop: 'destinationCodeShow', label: '是否显示目的地码:', type: 'checkbox', isHidden: !this.isdestinationCode },
|
{ prop: 'destinationCodeShow', label: this.$t('map.destinationCodeShow'), type: 'checkbox', isHidden: !this.isdestinationCode },
|
||||||
{ prop: 'leftStopPointOffset', label: '左向停车点偏移量:', type: 'number', min: 0, isHidden: !this.isStopPointOffset },
|
{ prop: 'leftStopPointOffset', label: this.$t('map.leftStopPointOffset'), type: 'number', min: 0, isHidden: !this.isStopPointOffset },
|
||||||
{ prop: 'rightStopPointOffset', label: '右向停车点偏移量:', type: 'number', min: 0, isHidden: !this.isStopPointOffset },
|
{ prop: 'rightStopPointOffset', label: this.$t('map.rightStopPointOffset'), type: 'number', min: 0, isHidden: !this.isStopPointOffset },
|
||||||
{ prop: 'isSwitchSection', label: '是否道岔区段:', type: 'checkbox', isHidden: !this.isSectionType },
|
{ prop: 'isSwitchSection', label: this.$t('map.isSwitchSection'), type: 'checkbox', isHidden: !this.isSectionType },
|
||||||
{ prop: 'relSwitchCode', label: '关联道岔Code:', type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.switchList, change: true, deviceChange: this.deviceChange, isHidden: !this.isRelSwitchCode },
|
{ prop: 'relSwitchCode', label: this.$t('map.relSwitchCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.switchList, change: true, deviceChange: this.deviceChange, isHidden: !this.isRelSwitchCode },
|
||||||
{ prop: 'logicSectionNameSort', label: '逻辑区段排序:', type: 'radio', isHidden: !this.isLogicSectionNameSort, radioList: [
|
{ prop: 'logicSectionNameSort', label: this.$t('map.logicSectionNameSort'), type: 'radio', isHidden: !this.isLogicSectionNameSort, radioList: [
|
||||||
{value: true, label: '从小到大'},
|
{value: true, label: this.$t('map.fromSmallToLarge')},
|
||||||
{value: false, label: '从大到小'}
|
{value: false, label: this.$t('map.fromLargeToSmall')}
|
||||||
] },
|
] },
|
||||||
{ prop: 'linkCode', label: '关联的Link:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.linkList, disabled: true, isHidden: !this.isSectionType },
|
{ prop: 'linkCode', label: this.$t('map.relevanceLinkCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.linkList, disabled: true, isHidden: !this.isSectionType },
|
||||||
{ prop: 'sepTypeLeft', label: '左侧分隔符类型:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSectionType },
|
{ prop: 'sepTypeLeft', label: this.$t('map.sepTypeLeft'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSectionType },
|
||||||
{ prop: 'offsetLeft', label: '左侧Link偏移量:', type: 'number', min: 0, placeholder: '米', isHidden: !this.isSectionType },
|
{ prop: 'offsetLeft', label: this.$t('map.sectionOffsetLeft'), type: 'number', min: 0, placeholder: '米', isHidden: !this.isSectionType },
|
||||||
{ prop: 'sepTypeRight', label: '右侧分隔符类型:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSectionType },
|
{ prop: 'sepTypeRight', label: this.$t('map.sepTypeRight'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSectionType },
|
||||||
{ prop: 'offsetRight', label: '右侧Link偏移量:', type: 'number', min: 0, placeholder: '米', isHidden: !this.isSectionType },
|
{ prop: 'offsetRight', label: this.$t('map.sectionOffsetRight'), type: 'number', min: 0, placeholder: '米', isHidden: !this.isSectionType },
|
||||||
{ prop: 'isSegmentation', label: '是否分割:', type: 'checkbox', isHidden: !this.isSectionType },
|
{ prop: 'isSegmentation', label: this.$t('map.isSegmentation'), type: 'checkbox', isHidden: !this.isSectionType },
|
||||||
{ prop: 'segmentationPosition', label: '默认背景:', type: 'coordinate', width: '150px', isHidden: !this.issegmentationPosition, children: [
|
{ prop: 'segmentationPosition', label: this.$t('map.segmentationPosition'), type: 'coordinate', width: '150px', isHidden: !this.issegmentationPosition, children: [
|
||||||
{ prop: 'segmentationPosition.x', firstLevel: 'segmentationPosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px', disabled: true },
|
{ prop: 'segmentationPosition.x', firstLevel: 'segmentationPosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px', disabled: true },
|
||||||
{ prop: 'segmentationPosition.y', firstLevel: 'segmentationPosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px', disabled: true }
|
{ prop: 'segmentationPosition.y', firstLevel: 'segmentationPosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px', disabled: true }
|
||||||
] },
|
] },
|
||||||
{ prop: 'isCurve', label: '是否曲线:', type: 'checkbox', isHidden: !this.isSectionType },
|
{ prop: 'isCurve', label: this.$t('map.isCurve'), type: 'checkbox', isHidden: !this.isSectionType },
|
||||||
{ prop: 'points', label: '区段显示坐标:', type: 'points', width: '160px', isHidden: !this.isPointsShow, pointDisabled: this.pointDisabledName, addPoint: this.addPoint, delPoint: this.delPoint },
|
{ prop: 'points', label: this.$t('map.sectionPoints'), type: 'points', width: '160px', isHidden: !this.isPointsShow, pointDisabled: this.pointDisabledName, addPoint: this.addPoint, delPoint: this.delPoint },
|
||||||
{ prop: 'trainPosType', label: '列车所在方向:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.TrainPositionTypeList, isHidden: !this.isSectionType }
|
{ prop: 'trainPosType', label: this.$t('map.trainPosType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.TrainPositionTypeList, isHidden: !this.isSectionType }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return form;
|
return form;
|
||||||
@ -352,52 +352,52 @@ export default {
|
|||||||
rules() {
|
rules() {
|
||||||
const rules = {
|
const rules = {
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: '请选择设备', trigger: 'change' }
|
{ required: true, message: this.$t('rules.selectEquipment'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '请输入区段名称', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.pleaseEnterSectionName'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
type: [
|
type: [
|
||||||
{ required: true, message: '请输入区段类型', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.pleaseEnterSectionType'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
relStandCode: [
|
relStandCode: [
|
||||||
{ required: true, message: '请选择关联站台', trigger: 'change' }
|
{ required: true, message: this.$t('rules.pleaseSelectAssociatedPlatform'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
leftStopPointOffset: [
|
leftStopPointOffset: [
|
||||||
{ required: true, message: '请输入左向停车点偏移量', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.pleaseEnterLeftStopPointOffset'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
rightStopPointOffset: [
|
rightStopPointOffset: [
|
||||||
{ required: true, message: '请输入右向停车点偏移量', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.rightStopPointOffset'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
destinationCode: [
|
destinationCode: [
|
||||||
{ required: true, message: '请输入目的地码', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.destinationCode'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
'destinationCodePoint.x': [
|
'destinationCodePoint.x': [
|
||||||
{ required: true, message: '请输入目的地码坐标X', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.destinationCodePointX'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
'destinationCodePoint.y': [
|
'destinationCodePoint.y': [
|
||||||
{ required: true, message: '请输入目的地码坐标Y', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.destinationCodePointY'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
'namePoint.x': [
|
'namePoint.x': [
|
||||||
{ required: true, message: '请输入区段名称坐标X', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.sectionNamePointX'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
'namePoint.y': [
|
'namePoint.y': [
|
||||||
{ required: true, message: '请输入区段名称坐标Y', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.sectionNamePointY'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
logicSectionNameSort: [
|
logicSectionNameSort: [
|
||||||
{ required: true, message: '请选择逻辑区段名称排序', trigger: 'change' }
|
{ required: true, message: this.$t('rules.logicSectionNameSort'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
offsetLeft: [
|
offsetLeft: [
|
||||||
{ required: true, message: '请输入左侧Link偏移量', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.sectionOffsetLeft'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
sepTypeLeft: [
|
sepTypeLeft: [
|
||||||
{ required: true, message: '请选择左侧分隔符', trigger: 'change' }
|
{ required: true, message: this.$t('rules.sectionSepTypeLeft'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
offsetRight: [
|
offsetRight: [
|
||||||
{ required: true, message: '请输入右侧Link偏移量', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.sectionOffsetRight'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
sepTypeRight: [
|
sepTypeRight: [
|
||||||
{ required: true, message: '请选择右侧分隔符', trigger: 'change' }
|
{ required: true, message: this.$t('rules.sectionSepTypeRight'), trigger: 'change' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
// 清空表单验证提示信息
|
// 清空表单验证提示信息
|
||||||
@ -857,9 +857,9 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const _that = this;
|
const _that = this;
|
||||||
this.$confirm('是否确认批量生成?', '提示', {
|
this.$confirm(this.$t('tip.confirmBatchGeneration'), this.$t('tip.hint'), {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: this.$t('tip.confirm'),
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: this.$t('tip.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
_that.$emit('delMapModel', remove);
|
_that.$emit('delMapModel', remove);
|
||||||
@ -867,7 +867,7 @@ export default {
|
|||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
message: '已取消批量生成'
|
message: this.$t('tip.cancelGeneration')
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -973,15 +973,15 @@ export default {
|
|||||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||||
const _that = this;
|
const _that = this;
|
||||||
this.$confirm('是否确认删除?', '提示', {
|
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: this.$t('tip.confirm'),
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: this.$t('tip.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
_that.$emit('delMapModel', selected);
|
_that.$emit('delMapModel', selected);
|
||||||
_that.deviceSelect();
|
_that.deviceSelect();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
_that.$message.info('已取消删除');
|
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1117,13 +1117,13 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (!rsection || !lsection) {
|
if (!rsection || !lsection) {
|
||||||
this.$messageBox('存在非物理区段,不能合并');
|
this.$messageBox(this.$t('tip.cannotMerged'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rsection && lsection) {
|
if (rsection && lsection) {
|
||||||
if (lsection.linkCode !== rsection.linkCode) {
|
if (lsection.linkCode !== rsection.linkCode) {
|
||||||
this.$messageBox('不在同一Link上的物理区段不能合并');
|
this.$messageBox(this.$t('tip.linkCannotMerged'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const uid = getUID('Section');
|
const uid = getUID('Section');
|
||||||
|
@ -1,19 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
|
|
||||||
<el-tabs v-model="activeName">
|
<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-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<el-button-group class="map-draft-group">
|
<el-button-group class="map-draft-group">
|
||||||
<el-button type="primary" @click="edit">修改</el-button>
|
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
<el-button type="primary" @click="deleteObj">删除</el-button>
|
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</el-tab-pane>
|
</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-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<el-form ref="make" label-width="130px" :model="addModel" size="mini" :rules="mergeRules">
|
<el-form ref="make" label-width="130px" :model="addModel" size="mini" :rules="mergeRules">
|
||||||
<el-form-item label="物理区段名称:" prop="sectionCode">
|
<el-form-item :label="$t('map.physicalSegmentName')" prop="sectionCode">
|
||||||
<el-select v-model="addModel.sectionCode" filterable>
|
<el-select v-model="addModel.sectionCode" filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in PhysicalSectionList"
|
v-for="item in PhysicalSectionList"
|
||||||
@ -23,7 +22,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="形式方向:" prop="directionType">
|
<el-form-item :label="$t('map.directionType')" prop="directionType">
|
||||||
<el-select v-model="addModel.directionType" filterable>
|
<el-select v-model="addModel.directionType" filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in SignalDirectionTypeList"
|
v-for="item in SignalDirectionTypeList"
|
||||||
@ -33,7 +32,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="左右位置:" prop="leftOrRight">
|
<el-form-item :label="$t('map.leftOrRight')" prop="leftOrRight">
|
||||||
<el-select v-model="addModel.leftOrRight" filterable>
|
<el-select v-model="addModel.leftOrRight" filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in SignalLeftOrRightList"
|
v-for="item in SignalLeftOrRightList"
|
||||||
@ -43,7 +42,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="上下位置:" prop="positionType">
|
<el-form-item :label="$t('map.positionType')" prop="positionType">
|
||||||
<el-select v-model="addModel.positionType" filterable>
|
<el-select v-model="addModel.positionType" filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in SignalPositionTypeList"
|
v-for="item in SignalPositionTypeList"
|
||||||
@ -56,7 +55,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<el-button-group class="map-draft-group">
|
<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-button-group>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
@ -129,8 +128,8 @@ export default {
|
|||||||
{ code: '08', name: '复位信号机' }
|
{ code: '08', name: '复位信号机' }
|
||||||
*/
|
*/
|
||||||
failTypes: [
|
failTypes: [
|
||||||
{ code: '00', name: '正常' },
|
{ code: '00', name: this.$t('map.normal') },
|
||||||
{ code: '01', name: '灯丝报警' }
|
{ code: '01', name: this.$t('map.signalFilamentAlarm') }
|
||||||
],
|
],
|
||||||
editModel: {
|
editModel: {
|
||||||
code: '',
|
code: '',
|
||||||
@ -174,7 +173,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mergeRules: {
|
mergeRules: {
|
||||||
sectionCode: [
|
sectionCode: [
|
||||||
{ required: true, message: '请选择物理区段名称', trigger: 'change' }
|
{ required: true, message: this.$t('rules.selectPhysicalExtentName'), trigger: 'change' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -198,30 +197,30 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '150px',
|
labelWidth: '150px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'stationCode', label: '所属设备集中站:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
|
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
|
||||||
{ prop: 'code', label: '信号机编码:', type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.signalList, change: true, deviceChange: this.deviceChange },
|
{ prop: 'code', label: this.$t('map.signalCodeColon'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.signalList, change: true, deviceChange: this.deviceChange },
|
||||||
{ prop: 'name', label: '信号机名称:', type: 'input' },
|
{ prop: 'name', label: this.$t('map.signalNameColon'), type: 'input' },
|
||||||
{ prop: 'uniqueName', label: '信号机唯一名称:', type: 'input' },
|
{ prop: 'uniqueName', label: this.$t('map.signalUniqueName'), type: 'input' },
|
||||||
{ prop: 'nameShow', label: '是否显示信号机名称:', type: 'checkbox' },
|
{ prop: 'nameShow', label: this.$t('map.signalDisplayName'), type: 'checkbox' },
|
||||||
{ prop: 'lampPostType', label: '灯柱类型:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalLampPostTypeList },
|
{ prop: 'lampPostType', label: this.$t('map.lampPostType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalLampPostTypeList },
|
||||||
{ prop: 'lampPositionType', label: '灯位类型:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalLampPositionTypeList },
|
{ prop: 'lampPositionType', label: this.$t('map.lampPositionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalLampPositionTypeList },
|
||||||
{ prop: 'useType', label: '用途类型:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalUseTypeList },
|
{ prop: 'useType', label: this.$t('map.signalUseType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalUseTypeList },
|
||||||
{ prop: 'potLampType', label: '点灯类型:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalPotLampTypeList },
|
{ prop: 'potLampType', label: this.$t('map.potLampType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalPotLampTypeList },
|
||||||
{ prop: 'directionType', label: '方向类型:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalDirectionTypeList },
|
{ prop: 'directionType', label: this.$t('map.signalDirectionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalDirectionTypeList },
|
||||||
{ prop: 'positionType', label: '信号机位置类型:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalPositionTypeList },
|
{ prop: 'positionType', label: this.$t('map.signalPositionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalPositionTypeList },
|
||||||
{ prop: 'linkCode', label: 'LinkCode:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.linkList },
|
{ prop: 'linkCode', label: 'LinkCode:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.linkList },
|
||||||
{ prop: 'offset', label: '偏移量:', type: 'number', min: 0, placeholder: '米' },
|
{ prop: 'offset', label: this.$t('map.signalOffset'), type: 'number', min: 0, placeholder: this.$t('tip.meter') },
|
||||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: '信号机x:', type: 'number', placeholder: '米' },
|
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: this.$t('map.signalPositionX'), type: 'number', placeholder: this.$t('tip.meter') },
|
||||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: '信号机y:', type: 'number', placeholder: '米' },
|
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: this.$t('map.signalPositionY'), type: 'number', placeholder: this.$t('tip.meter') },
|
||||||
{ prop: 'rotate', label: '旋转角度:', type: 'number', min: -90, max: 90, placeholder: '度' },
|
{ prop: 'rotate', label: this.$t('map.signalRotate'), type: 'number', min: -90, max: 90, placeholder: this.$t('tip.angle') },
|
||||||
{ prop: 'namePosition.x', firstLevel: 'namePosition', secondLevel: 'x', label: '信号机名字偏移量 x:', type: 'number', placeholder: 'px' },
|
{ prop: 'namePosition.x', firstLevel: 'namePosition', secondLevel: 'x', label: this.$t('map.signalNamePositionX'), type: 'number', placeholder: 'px' },
|
||||||
{ prop: 'namePosition.y', firstLevel: 'namePosition', secondLevel: 'x', label: '信号机名字偏移量 y:', type: 'number', placeholder: 'px' },
|
{ prop: 'namePosition.y', firstLevel: 'namePosition', secondLevel: 'x', label: this.$t('map.signalNamePositionY'), type: 'number', placeholder: 'px' },
|
||||||
{ prop: 'buttonShow', label: '是否显示按钮:', type: 'checkbox' },
|
{ prop: 'buttonShow', label: this.$t('map.signalButtonShow'), type: 'checkbox' },
|
||||||
{ prop: 'buttonPosition.x', firstLevel: 'buttonPosition', secondLevel: 'x', label: '按钮x:', type: 'number', placeholder: 'px' },
|
{ prop: 'buttonPosition.x', firstLevel: 'buttonPosition', secondLevel: 'x', label: this.$t('map.signalButtonPositionX'), type: 'number', placeholder: 'px' },
|
||||||
{ prop: 'buttonPosition.y', firstLevel: 'buttonPosition', secondLevel: 'x', label: '按钮y:', type: 'number', placeholder: 'px' },
|
{ prop: 'buttonPosition.y', firstLevel: 'buttonPosition', secondLevel: 'x', label: this.$t('map.signalButtonPositionY'), type: 'number', placeholder: 'px' },
|
||||||
{ prop: 'guideShow', label: '是否显示引导信号灯:', type: 'checkbox' },
|
{ prop: 'guideShow', label: this.$t('map.signalGuideShow'), type: 'checkbox' },
|
||||||
{ prop: 'guidePosition.x', firstLevel: 'guidePosition', secondLevel: 'x', label: '引导信号x:', type: 'number', placeholder: 'px' },
|
{ prop: 'guidePosition.x', firstLevel: 'guidePosition', secondLevel: 'x', label: this.$t('map.signalGuidePositionX'), type: 'number', placeholder: 'px' },
|
||||||
{ prop: 'guidePosition.y', firstLevel: 'guidePosition', secondLevel: 'x', label: '引导信号y:', type: 'number', placeholder: 'px' }
|
{ prop: 'guidePosition.y', firstLevel: 'guidePosition', secondLevel: 'x', label: this.$t('map.signalGuidePositionY'), type: 'number', placeholder: 'px' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return form;
|
return form;
|
||||||
@ -229,37 +228,37 @@ export default {
|
|||||||
rules() {
|
rules() {
|
||||||
const rules = {
|
const rules = {
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: '请选择设备', trigger: 'change' }
|
{ required: true, message: this.$t('rules.selectEquipment'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '请输入信号灯名称', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.pleaseEnterSemaphoreName'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
uniqueName: [
|
uniqueName: [
|
||||||
{ required: true, message: '请输入信号机唯一名称', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.pleaseEnterSignalName'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
offset: [
|
offset: [
|
||||||
{ required: true, message: '请输入偏移量', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.pleaseEnterSignalOffset'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
stationCode: [
|
stationCode: [
|
||||||
{ required: true, message: '请输入设备集中站', trigger: 'change' }
|
{ required: true, message: this.$t('rules.pleaseEnterSignalStation'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
'position.x': [
|
'position.x': [
|
||||||
{ required: true, message: '信号机x', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.pleaseEnterSignalPositionX'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
'position.y': [
|
'position.y': [
|
||||||
{ required: true, message: '信号机y', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.pleaseEnterSignalPositionY'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
'buttonPosition.x': [
|
'buttonPosition.x': [
|
||||||
{ required: true, message: '请输入按钮x', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.signalButtonPositionX'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
'buttonPosition.y': [
|
'buttonPosition.y': [
|
||||||
{ required: true, message: '请输入按钮y', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.signalButtonPositionY'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
'guidePosition.x': [
|
'guidePosition.x': [
|
||||||
{ required: true, message: '请输入引导信号x', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.signalGuidePositionX'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
'guidePosition.y': [
|
'guidePosition.y': [
|
||||||
{ required: true, message: '请输入引导信号y', trigger: 'blur' }
|
{ required: true, message: this.$t('rules,signalGuidePositionY'), trigger: 'blur' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
// 清空表单验证提示信息
|
// 清空表单验证提示信息
|
||||||
@ -422,7 +421,7 @@ export default {
|
|||||||
|
|
||||||
this.$emit('addOrUpdateMapModel', model);
|
this.$emit('addOrUpdateMapModel', model);
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox('选择的区段为空');
|
this.$messageBox(this.$t('tip.selectedSectionEmpty'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -478,15 +477,15 @@ export default {
|
|||||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||||
if (selected && selected._type === 'Signal') {
|
if (selected && selected._type === 'Signal') {
|
||||||
const _that = this;
|
const _that = this;
|
||||||
this.$confirm('是否确认删除?', '提示', {
|
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: this.$t('tip.confirm'),
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: this.$t('tip.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
_that.$emit('delMapModel', selected);
|
_that.$emit('delMapModel', selected);
|
||||||
_that.deviceSelect();
|
_that.deviceSelect();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
_that.$message.info('已取消删除');
|
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -495,5 +494,4 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-tabs v-model="activeName">
|
<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-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<el-button-group class="map-draft-group">
|
<el-button-group class="map-draft-group">
|
||||||
<el-button type="primary" @click="edit">修改</el-button>
|
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
<el-button type="primary" @click="deleteObj">删除</el-button>
|
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</el-tab-pane>
|
</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-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<el-form ref="make" label-width="140px" :model="addModel" size="mini" :rules="mergeRules">
|
<el-form ref="make" label-width="140px" :model="addModel" size="mini" :rules="mergeRules">
|
||||||
<el-form-item label="物理区段名称:" prop="sectionCode">
|
<el-form-item :label="$t('map.physicalSegmentName')" prop="sectionCode">
|
||||||
<el-select v-model="addModel.sectionCode" filterable>
|
<el-select v-model="addModel.sectionCode" filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in PhysicalSectionList"
|
v-for="item in PhysicalSectionList"
|
||||||
@ -26,7 +26,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<el-button-group class="map-draft-group">
|
<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-button-group>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
@ -85,7 +85,7 @@ export default {
|
|||||||
skins: [],
|
skins: [],
|
||||||
mergeRules: {
|
mergeRules: {
|
||||||
sectionCode: [
|
sectionCode: [
|
||||||
{ required: true, message: '请选择物理区段名称', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.selectPhysicalExtentName'), trigger: 'blur' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -101,22 +101,22 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '150px',
|
labelWidth: '150px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'concentrateStationCode', label: '所属联锁站编码:', type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.stationList },
|
{ prop: 'concentrateStationCode', label: this.$t('map.concentrateStationCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.stationList },
|
||||||
{ prop: 'code', label: '车站编码:', type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.stationList, change: true, deviceChange: this.deviceChange },
|
{ prop: 'code', label: this.$t('map.stationCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.stationList, change: true, deviceChange: this.deviceChange },
|
||||||
{ prop: 'zcCode', label: '所属zc区域编码:', type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.zcList },
|
{ prop: 'zcCode', label: this.$t('map.zcCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.zcList },
|
||||||
{ prop: 'centralized', label: '是否集中站:', type: 'checkbox' },
|
{ prop: 'centralized', label: this.$t('map.centralized'), type: 'checkbox' },
|
||||||
{ prop: 'name', label: '车站名称:', type: 'input' },
|
{ prop: 'name', label: this.$t('map.stationNameColon'), type: 'input' },
|
||||||
{ prop: 'runPlanName', label: '真实名称:', type: 'input' },
|
{ prop: 'runPlanName', label: this.$t('map.stationRunPlanName'), type: 'input' },
|
||||||
{ prop: 'visible', label: '是否显示:', type: 'checkbox' },
|
{ prop: 'visible', label: this.$t('map.stationVisible'), type: 'checkbox' },
|
||||||
{ prop: 'nameFont', label: '车站字体:', type: 'font', placeholder: '车站字体' },
|
{ prop: 'nameFont', label: this.$t('map.stationNameFont'), type: 'font', placeholder: this.$t('tip.stationFont') },
|
||||||
{ prop: 'nameFontColor', label: '车站字体颜色:', type: 'color' },
|
{ prop: 'nameFontColor', label: this.$t('map.stationNameFontColor'), type: 'color' },
|
||||||
{ prop: 'kmPostShow', label: '是否显示公里标名称:', type: 'checkbox' },
|
{ prop: 'kmPostShow', label: this.$t('map.stationKmPostShow'), type: 'checkbox' },
|
||||||
{ prop: 'kmRange', label: '公里标距离:', type: 'number', min: 0, placeholder: '米' },
|
{ prop: 'kmRange', label: this.$t('map.stationKmRange'), type: 'number', min: 0, placeholder: this.$t('tip.meter') },
|
||||||
{ prop: 'kmPost', label: '公里标名称:', type: 'input' },
|
{ prop: 'kmPost', label: this.$t('map.stationKmPost'), type: 'input' },
|
||||||
{ prop: 'kmPostFont', label: '公里标字体:', type: 'font', placeholder: '公里标字体' },
|
{ prop: 'kmPostFont', label: this.$t('map.stationKmPostFont'), type: 'font', placeholder: this.$t('tip.kilometerFont') },
|
||||||
{ prop: 'kmPostFontColor', label: '公里标字体颜色:', type: 'color' },
|
{ prop: 'kmPostFontColor', label: this.$t('map.stationKmPostFontColor'), type: 'color' },
|
||||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x坐标:', type: 'number', placeholder: 'px' },
|
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: this.$t('map.stationPositionX'), type: 'number', placeholder: 'px' },
|
||||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y坐标:', type: 'number', placeholder: 'px' }
|
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: this.$t('map.stationPositionY'), type: 'number', placeholder: 'px' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return form;
|
return form;
|
||||||
@ -124,22 +124,22 @@ export default {
|
|||||||
rules() {
|
rules() {
|
||||||
const rules = {
|
const rules = {
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: '请选择设备', trigger: 'change' }
|
{ required: true, message: this.$t('rules.selectEquipment'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '请输入车站名称', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.stationName'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
kmRange: [
|
kmRange: [
|
||||||
{ required: true, message: '请输入公里标距离', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.stationKmRange'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
kmPost: [
|
kmPost: [
|
||||||
{ required: true, message: '请输入公里标名称', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.stationKmPost'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
'position.x': [
|
'position.x': [
|
||||||
{ required: true, message: '请输入x坐标', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.stationPositionX'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
'position.y': [
|
'position.y': [
|
||||||
{ required: true, message: '请输入y坐标', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.stationPositionY'), trigger: 'blur' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
// 清空表单验证提示信息
|
// 清空表单验证提示信息
|
||||||
@ -287,15 +287,15 @@ export default {
|
|||||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||||
if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
|
||||||
const _that = this;
|
const _that = this;
|
||||||
this.$confirm('是否确认删除?', '提示', {
|
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: this.$t('tip.confirm'),
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: this.$t('tip.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
_that.$emit('delMapModel', selected);
|
_that.$emit('delMapModel', selected);
|
||||||
_that.deviceSelect();
|
_that.deviceSelect();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
_that.$message.info('已取消删除');
|
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-tabs v-model="activeName">
|
<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-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<el-button-group class="map-draft-group">
|
<el-button-group class="map-draft-group">
|
||||||
<el-button type="primary" @click="edit">修改</el-button>
|
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
<el-button type="primary" @click="deleteObj">删除</el-button>
|
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</el-tab-pane>
|
</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-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
<el-form ref="make" :model="addModel" label-width="120px" size="mini" :rules="makeRules">
|
<el-form ref="make" :model="addModel" label-width="120px" size="mini" :rules="makeRules">
|
||||||
<el-form-item label="车站名称:" prop="stationCode">
|
<el-form-item :label="$t('map.stationNameColon')" prop="stationCode">
|
||||||
<el-select v-model="addModel.stationCode" filterable>
|
<el-select v-model="addModel.stationCode" filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in stationList"
|
v-for="item in stationList"
|
||||||
@ -26,7 +26,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<el-button-group class="map-draft-group">
|
<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-button-group>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
@ -77,7 +77,7 @@ export default {
|
|||||||
},
|
},
|
||||||
makeRules: {
|
makeRules: {
|
||||||
stationCode: [
|
stationCode: [
|
||||||
{ required: true, message: '请选择车站名称', trigger: 'change' }
|
{ required: true, message: this.$t('rules.stationControlStationName'), trigger: 'change' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -92,16 +92,16 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '160px',
|
labelWidth: '160px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'stationCode', label: '所属设备集中站:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
|
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
|
||||||
{ prop: 'code', label: '控制模式编码:', type: 'select', optionLabel: 'code', optionValue: 'code', options: this.stationControlList, change: true, deviceChange: this.deviceChange },
|
{ prop: 'code', label: this.$t('map.stationControlCode'), type: 'select', optionLabel: 'code', optionValue: 'code', options: this.stationControlList, change: true, deviceChange: this.deviceChange },
|
||||||
{ prop: 'zcCode', label: '所属zc区域编码:', type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.zcList },
|
{ prop: 'zcCode', label: this.$t('map.zcCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.zcList },
|
||||||
{ prop: 'name', label: '控制模式名称:', type: 'input' },
|
{ prop: 'name', label: this.$t('map.stationControlName'), type: 'input' },
|
||||||
{ prop: 'zokContent', label: '中控内容:', type: 'input' },
|
{ prop: 'zokContent', label: this.$t('map.zokContent'), type: 'input' },
|
||||||
{ prop: 'zakContent', label: '站控内容:', type: 'input' },
|
{ prop: 'zakContent', label: this.$t('map.zakContent'), type: 'input' },
|
||||||
{ prop: 'jjzkContent', label: '紧急站控/总报警内容:', type: 'input' },
|
{ prop: 'jjzkContent', label: this.$t('map.jjzkContent'), type: 'input' },
|
||||||
{ prop: 'zzkContent', label: '站中控内容:', type: 'input' },
|
{ prop: 'zzkContent', label: this.$t('map.zzkContent'), type: 'input' },
|
||||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: '坐标 x:', type: 'number', placeholder: 'px' },
|
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: this.$t('map.stationControlPositionX'), type: 'number', placeholder: 'px' },
|
||||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: '坐标 y:', type: 'number', placeholder: 'px' }
|
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: this.$t('map.stationControlPositionY'), type: 'number', placeholder: 'px' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return form;
|
return form;
|
||||||
@ -109,28 +109,28 @@ export default {
|
|||||||
rules() {
|
rules() {
|
||||||
const rules = {
|
const rules = {
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: '请选择设备', trigger: 'change' }
|
{ required: true, message: this.$t('rules.selectEquipment'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
stationCode: [
|
stationCode: [
|
||||||
{ required: true, message: '请选择所属车站', trigger: 'change' }
|
{ required: true, message: this.$t('rules.stationControlStationCode'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
zokContent: [
|
zokContent: [
|
||||||
{ required: true, message: '请输入中控内容', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.stationControlZokContent'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
zakContent: [
|
zakContent: [
|
||||||
{ required: true, message: '请输入站控内容', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.stationControlZakContent'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
jjzkContent: [
|
jjzkContent: [
|
||||||
{ required: true, message: '请输入紧急站控内容', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.stationControlJjzkContent'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
zzkContent: [
|
zzkContent: [
|
||||||
{ required: true, message: '请输入站中控内容', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.stationControlZzkContent'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
'position.x': [
|
'position.x': [
|
||||||
{ required: true, message: '请输入坐标x', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.stationControlPositionX'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
'position.y': [
|
'position.y': [
|
||||||
{ required: true, message: '请输入坐标y', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.stationControlPositionY'), trigger: 'blur' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
// 清空表单验证提示信息
|
// 清空表单验证提示信息
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
import { getPublishMapList, delPublishMap, getPublishMapExport, putMapOnLine, putMapOffLine } from '@/api/jmap/map';
|
import { getPublishMapList, delPublishMap, getPublishMapExport, putMapOnLine, putMapOffLine } from '@/api/jmap/map';
|
||||||
import { getSkinStyleList } from '@/api/management/mapskin';
|
import { getSkinStyleList } from '@/api/management/mapskin';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
|
import deviceType from '@/jmap/constant/deviceType';
|
||||||
import localStore from 'storejs';
|
import localStore from 'storejs';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -68,7 +69,7 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
title: '操作',
|
title: '操作',
|
||||||
width: '380',
|
width: '420',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: '上架',
|
name: '上架',
|
||||||
@ -95,6 +96,11 @@ export default {
|
|||||||
{
|
{
|
||||||
name: '导出地图',
|
name: '导出地图',
|
||||||
handleClick: this.handleExportMap
|
handleClick: this.handleExportMap
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '导出',
|
||||||
|
handleClick: this.handleExportMapSame,
|
||||||
|
showControl: () => { return process.env.NODE_ENV === 'development'; }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -217,6 +223,24 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 部分导出
|
||||||
|
async handleExportMapSame(index, row) {
|
||||||
|
const res = await getPublishMapExport(row.id);
|
||||||
|
const resultData = res.data;
|
||||||
|
if (resultData === false) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const self = this;
|
||||||
|
import('@/utils/Export2Excel').then(excel => {
|
||||||
|
self.queryExportDataSame(resultData).then(data => {
|
||||||
|
excel.export_json_excel(data, resultData.name);
|
||||||
|
}).catch(error => {
|
||||||
|
self.$message.error('导出执行异常:' + error.message);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
formatJson(filterVal, jsonData) {
|
formatJson(filterVal, jsonData) {
|
||||||
return jsonData.map(v => filterVal.map(j => v[j]));
|
return jsonData.map(v => filterVal.map(j => v[j]));
|
||||||
},
|
},
|
||||||
@ -245,6 +269,101 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
result.base.push(obj);
|
||||||
|
resolve(result);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 格式化数据列表
|
||||||
|
queryExportDataSame(data) {
|
||||||
|
const mapProps = {};
|
||||||
|
const switchType = `${deviceType.Switch.toLowerCase()}List`;
|
||||||
|
const signalType = `${deviceType.Signal.toLowerCase()}List`;
|
||||||
|
const sectionType = `${deviceType.Section.toLowerCase()}List`;
|
||||||
|
|
||||||
|
mapProps[switchType] = {
|
||||||
|
filter: item => { return true; },
|
||||||
|
propList: {
|
||||||
|
'name': item =>{
|
||||||
|
return item.name;
|
||||||
|
},
|
||||||
|
'code': item => {
|
||||||
|
return item.code;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
mapProps[signalType] = {
|
||||||
|
filter: item => { return true; },
|
||||||
|
propList: {
|
||||||
|
'name': item =>{
|
||||||
|
return item.name;
|
||||||
|
},
|
||||||
|
'code': item => {
|
||||||
|
return item.code;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
mapProps[sectionType] = {
|
||||||
|
filter: item => { return item.type == '01'; },
|
||||||
|
propList: {
|
||||||
|
'name': (item, devices) =>{
|
||||||
|
let name = item.name;
|
||||||
|
if (item.isSwitchSection) {
|
||||||
|
const swchList = devices[switchType];
|
||||||
|
const swch = swchList.find(elem => { return item.relSwitchCode == elem.code; });
|
||||||
|
if (swch) {
|
||||||
|
if (item.code == swch.sectionACode) {
|
||||||
|
name = `${name} (${swch.name}-A)`;
|
||||||
|
} else if (item.code == swch.sectionBCode) {
|
||||||
|
name = `${name} (${swch.name}-B)`;
|
||||||
|
} else if (item.code == swch.sectionCCode) {
|
||||||
|
name = `${name} (${swch.name}-C)`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return name;
|
||||||
|
},
|
||||||
|
'code': item => {
|
||||||
|
return item.code;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
const result = {
|
||||||
|
base: []
|
||||||
|
};
|
||||||
|
const obj = {};
|
||||||
|
for (const i in data) {
|
||||||
|
if (i == 'devices') {
|
||||||
|
for (const v in data[i]) {
|
||||||
|
if (data[i][v].length) {
|
||||||
|
if (mapProps[v]) {
|
||||||
|
const list = [];
|
||||||
|
data[i][v].forEach(device => {
|
||||||
|
if (mapProps[v].filter(device)) {
|
||||||
|
const obj = {};
|
||||||
|
Object.keys(mapProps[v].propList || []).forEach(key => {
|
||||||
|
obj[key] = mapProps[v].propList[key](device, data[i]);
|
||||||
|
});
|
||||||
|
list.push(obj);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
result[v] = list;
|
||||||
|
}
|
||||||
|
} else if (v == 'skinVO') {
|
||||||
|
result[v] = [data[i][v]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (data[i] instanceof Object || typeof data[i] != 'object') {
|
||||||
|
obj[i] = data[i];
|
||||||
|
} else if (data[i] instanceof Array) {
|
||||||
|
if (data[i].length) {
|
||||||
|
obj[i] = [...data[i]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
result.base.push(obj);
|
result.base.push(obj);
|
||||||
resolve(result);
|
resolve(result);
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
;
|
|
||||||
// import { getBasePathConfig } from '@/utils/baseUrl'
|
// import { getBasePathConfig } from '@/utils/baseUrl'
|
||||||
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
@ -13,7 +13,6 @@ function resolve(dir) {
|
|||||||
const name = defaultSettings.title; // page title
|
const name = defaultSettings.title; // page title
|
||||||
const port = 9527; // dev port
|
const port = 9527; // dev port
|
||||||
|
|
||||||
|
|
||||||
// All configuration item explanations can be find in https://cli.vuejs.org/config/
|
// All configuration item explanations can be find in https://cli.vuejs.org/config/
|
||||||
module.exports = {
|
module.exports = {
|
||||||
/**
|
/**
|
||||||
@ -144,6 +143,6 @@ module.exports = {
|
|||||||
config.optimization.runtimeChunk('single');
|
config.optimization.runtimeChunk('single');
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user