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