Merge remote-tracking branch 'origin/dev'

This commit is contained in:
fan 2019-08-20 19:00:10 +08:00
commit 30eea97bdf
135 changed files with 3150 additions and 2833 deletions

1
.gitignore vendored
View File

@ -6,6 +6,7 @@ yarn-debug.log*
yarn-error.log*
package-lock.json
tests/**/coverage/
src/utils/baseUrl*
# Editor directories and files
.idea

View File

@ -420,10 +420,11 @@ export function getSimulationInfo(group) {
}
/** 获取可用的设备指令*/
export function getAvailableDeviceCommand() {
export function getAvailableDeviceCommand(params) {
return request({
url: `/api/simulation/deviceCommand/available`,
method: 'get'
method: 'get',
params
});
}

View File

@ -44,6 +44,12 @@ export default {
createDetailFailed: 'Failed to create details',
updateDetailFailed: 'Failed to update details',
addFailed: 'Failure to add',
updateFailed: 'Failure to update'
updateFailed: 'Failure to update',
exportException: 'Export exception',
operationFailure: 'Operation Failure',
createCommonRunPlanFailed: 'Failed to create a common run plan',
templateHasBeUse: 'The template has been used by the load plan and cannot be deleted',
setFailed: 'Setup failed',
deleteException: 'To remove exceptions, contact your administrator',
paperHasUseNotDel: 'The paper has been used and cannot be deleted'
};

View File

@ -34,6 +34,9 @@ export default {
distributeExamPermission: 'Distribution of Examination Authority',
distributeSimulationPermission: 'Distribution of simulation privileges',
distributeScreenPermission: 'Large Screen Privilege Distribution',
email: 'Email',
nickName: 'nickname',
mobile: 'mobile',
name: 'Name',
code: 'Code',
status: 'Status',
@ -64,7 +67,8 @@ export default {
toBeDeveloped: 'Functions to be developed',
yuan: '¥',
filteringKeywords: 'Enter keywords for filtering',
previousStep: 'PreviousStep',
lastStep: 'Last Step',
nextStep: 'Next Step ',
skip: 'Skip',
modify: 'Modify',
language: 'Language',
@ -75,10 +79,17 @@ export default {
synthesisTrainingTitle: 'Synthesis Training Fast Entrance',
pleaseChooseRoom: 'You did not choose a room',
inviteJoinRoom: 'Invite you to join the synthesis training!',
trainingHasStart: "(name)'s room has begun",
trainingNotStart: "(name)'s room hasn't started yet",
trainingHasStart: "{name}'s room has begun",
trainingNotStart: "{name}'s room hasn't started yet",
inputRoomNumber: 'Please enter the room number.',
chooseRoom: 'Choose Room',
month: 'month'
month: 'month',
putaway: 'Putaway',
soldOut: 'Sold out',
exportMap: 'Export Map',
preview: 'Preview',
notBeUse: 'This function is not enabled for the time being',
fastCreate: 'Quickly Create',
duration: 'duration',
isTry: 'Try'
};

View File

@ -9,6 +9,10 @@ import scriptRecord from './scriptRecord';
import tip from './tip';
import system from './system';
import orderAuthor from './orderAuthor';
import publish from './publish';
import permission from './permission';
import replay from './replay';
import planMonitor from './planMonitor';
export default {
...enLocale,
@ -21,5 +25,9 @@ export default {
scriptRecord,
tip,
system,
orderAuthor
orderAuthor,
publish,
permission,
replay,
planMonitor
};

View File

@ -468,6 +468,7 @@ export default {
startStationCodeColon: 'Originating station:',
startStationCode: 'The starting platform',
endStationCode: 'Into the platform',
destination: 'destination',
routingDirection: 'The direction of',
remarks: 'describe',
remarksColon: 'describe:',

View File

@ -12,7 +12,7 @@ export default {
setupFailure: 'Setup failure',
setupEffective: 'Setup effective',
organizationOrEnterprise: 'Organization/Enterprise',
userName: 'UserName',
userName: 'User Name',
permissionType: 'Permission type',
permissionNumber: 'Permission number',
permanenceOrNot: 'Permanence or not',

View File

@ -0,0 +1,19 @@
export default {
permissionPack: 'Package',
setSuccess: 'Set successfully',
isSureSetBelonger: 'Are you sure to set {name} to be the owner of the permission?',
setBelonger: 'Set Owner',
lessonName: 'Lesson Name',
mapName: 'Map Name',
mapProductName: 'Product Name',
permissionType: 'Permission Type',
permissionStatus: 'Permission Status',
permissionUseType: 'Public/Private',
permissionTotal: 'Total',
permissionRemains: 'Remains',
isForever: 'Permanent',
startTime: 'Start Time',
endTime: 'End Time',
belonger: 'Owner',
userList: 'User List'
};

View File

@ -0,0 +1,3 @@
export default {
};

View File

@ -0,0 +1,47 @@
export default {
city: 'City',
skinType: 'Skin Type',
mapName: 'Map Name',
lessonName: 'Lesson Name',
updateMapName: 'Update Map Name',
updateTime: 'Update Time',
operationSuccess: 'Operate successfully',
deleteSuccess: 'Delete successfully',
wellDelType: 'This action deletes the type. Do you want to continue?',
wellPutawayMap: 'This will launch the map. Do you want to continue?',
wellSoldOutMap: 'This operation will remove this map. Do you want to continue?',
productName: 'Product Name',
productType: 'Product Type',
productCode: 'Product Code',
lessonIntroduction: 'Lesson Introduction',
updateSuccess: 'Update successfully',
wellPutawayTraining: 'Will this operation continue on the last sortie?',
wellSoldOutTraining: 'Will this operation continue for the next sortie?',
wellPutawayProduct: 'This operation will put the product on the shelf. Do you want to continue?',
wellSoldOutProduct: 'This operation will be removed from the shelves. Do you want to continue?',
runPlanName: 'Run Plan Name',
runEveryDayTime: 'Daily Running Time',
userId: 'User Id',
wellDelRunPlanEveryDay: 'This action deletes the daily running plan. Do you want to continue?',
taskName: 'Task Name',
createTime: 'Creation Time',
detail: 'Detail',
generateRunPlan: 'Generate Daily Paln',
selectTemplateRunPlan: 'Select Template Run Plan',
pleaseSelectTemplate: 'Please Select Template Run Plan',
selectMap: 'Select Map',
createCommonRunPlan: 'Create Common Run Plan',
createCommonSuccess: 'Creation of a common run plan was successful',
wellGenerateEveryRunPlan: 'This operation generates a daily running diagram. Do you want to continue?',
wellDelTemplate: 'This action deletes the diagram template. Do you want to continue?',
fullMark: 'Full Mark',
passScore: 'Passing Score',
examTime: 'Exam Time',
creator: 'Creator',
paperName: 'Name Of Test Paper',
setSuccess: 'Set successfully',
wellPutawayPaper: 'This operation puts the paper on the shelf. Do you want to continue?',
wellSoldOutPaper: 'This operation removes the paper from the shelf. Do you want to continue?',
wellDelPaper: 'This operation will delete the paper. Do you want to continue?'
};

View File

@ -0,0 +1,9 @@
export default {
replay: 'Play',
mapName: 'Map Name',
creatorId: 'Creator of ID',
createTime: 'Create Time',
deleteSuccess: 'Delete successfully',
wellDelReplay: 'This action will delete the playback. Do you want to continue?'
};

View File

@ -211,6 +211,7 @@ export default {
linkWidthInputPrompt: 'Please enter a valid Link width',
sectionWidthInput: 'Please enter section width',
sectionWidthInputPrompt: 'Please enter a valid segment width',
selectShowWatermark: 'Select whether or not to watermark'
selectShowWatermark: 'Select whether or not to watermark',
pleaseInputMapName: 'Please enter a new name for the map',
inputTemplateRunPlan: 'Please select the template run diagram'
};

View File

@ -6,13 +6,11 @@ export default {
createDirectory: 'Create dictionary',
editDictionary: 'Edit dictionary',
deleteSuccess: 'Successful deletion',
dleeteTipContext: 'This operation will delete the type. Do you want to continue?',
createSuccess: 'Create successful',
updateSuccess: 'Update successful',
destory: 'Destory',
simulationGroup: 'Simulation Group',
userName: 'User Name',
mobile: 'Cell-phone Number',
skinCode: 'Skin Code',
prdType: 'Product Type',
simulationType: 'Simulation Type',
@ -21,7 +19,7 @@ export default {
isError: 'Is Error',
isSuspend: 'Is Suspend',
isDrivingAsplanned: 'Whether to drive as planned',
delUserSimulationIsContinue: 'This operation will delete the user simulation data. Do you want to continue?',
wellDelUserSimulation: 'This operation will delete the user simulation data. Do you want to continue?',
createDetail: 'Create details',
editDetail: 'Editorial details',
mapName: 'Map Name',
@ -36,13 +34,12 @@ export default {
examScore: 'Examination Score',
examResult: 'Examination Results',
examName: 'Paper Name',
delExamResultIsContinue: 'This operation will delete the test result. Do you want to continue?',
wellDelExamResult: 'This operation will delete the test result. Do you want to continue?',
editExamDetail: 'Edit exam details',
subscribeMap: 'Subscribe',
roles: 'Roles',
email: 'Email',
nickname: 'Nickname',
delTypeIsContinue: 'This operation will delete the type. Do you want to continue?',
wellDelType: 'This operation will delete the type. Do you want to continue?',
permission: 'Permission',
editUserPermission: 'Edit User Rights',
lessonName: 'Lesson Name',

View File

@ -1,79 +1,79 @@
export default {
confirm: '确 定',
cancel: '取 消',
creatingSuccessful: '创建成功!',
creatingFailed: '创建失败',
confirmDeletion: '是否确认删除?',
confirmBatchGeneration: '是否确认批量生成?',
hint: '提示',
cancelledDelete: '已取消删除',
cancelGeneration: '已取消批量生成',
confirm: 'confirm',
cancel: 'cancel',
creatingSuccessful: 'Created successfully!',
creatingFailed: 'Create a failure',
confirmDeletion: 'Confirm deletion?',
confirmBatchGeneration: 'Is batch generation confirmed?',
hint: 'hint',
cancelledDelete: 'Cancelled delete',
cancelGeneration: 'Batch generation has been cancelled',
updateSuccessfully: '更新成功',
saveSuccessfully: '保存成功',
saveFailed: '保存失败',
updateFailed: '更新失败',
successfullyDelete: '删除成功',
failDelete: '删除失败',
operationAbnormal: '操作异常',
createSuccess: '创建成功',
updateSuccessfully: 'The update is successful',
saveSuccessfully: 'Save success',
saveFailed: 'Save failed',
updateFailed: 'Update failed',
successfullyDelete: 'Delete the success',
failDelete: 'Delete failed',
operationAbnormal: 'Abnormal operation',
createSuccess: 'Creating a successful',
cannotCoincide: '起始坐标和结束坐标不能重合',
cannotMerged: '存在非物理区段,不能合并',
linkCannotMerged: '不在同一Link上的物理区段不能合并',
cannotCoincide: 'The starting and ending coordinates cannot coincide',
cannotMerged: 'Non-physical extents exist and cannot be merged',
linkCannotMerged: 'Physical extents that are not on the same Link cannot be merged',
selectedSectionEmpty: '选择的区段为空',
selectedStationEmpty: '选择的车站为空',
selectedSectionEmpty: 'The selected section is empty',
selectedStationEmpty: 'The selected station is empty',
selectMap: '请先选择地图',
selectTrainType: '请选择查看的列车模型',
selectMap: 'Please select the map first',
selectTrainType: 'Please select the train model to view',
stationFont: '车站字体',
kilometerFont: '公里标字体',
meter: '',
angle: '',
stationFont: 'The font',
kilometerFont: 'Kilometer mark font',
meter: 'meter',
angle: 'angle',
operationSuccessfully: '操作成功',
operationFailed: '操作失败',
setupSuccessfully: '设置成功',
setupFailed: '设置失败',
recoveryPrivilegesSuccessful: '回收权限成功',
recoveryPrivilegesFailed: '回收权限失败',
unpackingSuccessful: '解包成功',
unpackingFailed: '解包失败',
pleaseEnterNameQuery: '请输入名称查询',
routeSameID: '相同ID的数据已存在',
operationSuccessfully: 'Operation is successful',
operationFailed: 'The operation failure',
setupSuccessfully: 'Set up the success',
setupFailed: 'Setup failed',
recoveryPrivilegesSuccessful: 'Successful recovery authority',
recoveryPrivilegesFailed: 'Recovery authority failed',
unpackingSuccessful: 'Unpack the success',
unpackingFailed: 'Unpack the failure',
pleaseEnterNameQuery: 'Please enter name query',
routeSameID: 'Data with the same ID already exists',
skinDeleteSuccessfully: '删除皮肤成功',
skinDeleteFailed: '删除皮肤失败',
publishedOperationalGraphSuccessfully: '发布运行图成功',
publishedOperationalGraphFailed: '发布运行图失败',
deleteOperationGraphFailed: '删除运行图失败',
importOperationGraphSuccessfully: '导入运行图成功!',
importOperationGraphFailed: '导入运行图失败!',
parsingOperationGraphFailed: '解析运行图失败!',
productCreationSuccessfully: '创建产品成功',
productCreationFailed: '创建产品失败',
updateProductSuccessfully: '更新产品成功',
updateProductFailed: '更新产品失败',
deleteProductSuccessfully: '删除产品成功',
deleteProductFailed: '删除产品失败',
cannotDeleteProduct: '产品已被使用无法删除',
pathCreationSuccessful: '创建交路成功!',
createRoutingFailed: '创建交路失败',
pathUpdataSuccessful: '更新交路成功!',
pathUpdataFailed: '更新交路失败',
skinDeleteSuccessfully: 'Skin removed successfully',
skinDeleteFailed: 'Failed to remove skin',
publishedOperationalGraphSuccessfully: 'Published operational diagram successfully',
publishedOperationalGraphFailed: 'Failed to publish operation diagram',
deleteOperationGraphFailed: 'Failed to delete operation diagram',
importOperationGraphSuccessfully: 'The operation diagram was successfully imported!',
importOperationGraphFailed: 'Failed to import operation diagram!',
parsingOperationGraphFailed: 'Failed to parse the operational diagram!',
productCreationSuccessfully: 'Product creation success',
productCreationFailed: 'Failed to create product',
updateProductSuccessfully: 'Product update is successful.',
updateProductFailed: 'Product update failed',
deleteProductSuccessfully: 'Product deleted successfully',
deleteProductFailed: 'Product deletion failed',
cannotDeleteProduct: 'The product has been used and cannot be deleted',
pathCreationSuccessful: 'Create road successfully!',
createRoutingFailed: 'Failed to create junction',
pathUpdataSuccessful: 'Road update successful!',
pathUpdataFailed: 'Update traffic failed',
failedLoadMap: '加载地图数据失败',
sectionPointsDeficiency: '区段坐标缺失',
failedLoadMap: 'Failed to load map data',
sectionPointsDeficiency: 'Segment coordinates missing',
dataValidationFailed: '数据校验不通过',
dataValidationSuccess: '数据校验通过!',
dataValidationFailed: 'Data validation failed',
dataValidationSuccess: 'Data verified!',
requestFailed: '请求失败',
requestFailed: 'The request failed',
dataQuestion: '有问题数据',
dataList: '数据列表',
dataQuestion: 'Data in question',
dataList: 'Data list',
updateProductTip: 'Will this operation modify the commodity status?',
deleteProductTip: 'This operation will delete the item. Do you want to continue?',

View File

@ -44,6 +44,13 @@ export default {
createDetailFailed: '创建明细失败',
updateDetailFailed: '更新明细失败',
addFailed: '添加失败',
updateFailed: '更新失败'
updateFailed: '更新失败',
exportException: '导出异常',
operationFailure: '操作失败',
createCommonRunPlanFailed: '创建通用运行图失败',
templateHasBeUse: '该模板已被加载计划使用,无法删除',
setFailed: '设置失败',
deleteException: '删除异常,请联系管理员',
paperHasUseNotDel: '该试卷已被使用,不能删除'
};

View File

@ -34,6 +34,9 @@ export default {
distributeExamPermission: '考试权限分发',
distributeSimulationPermission: '仿真权限分发',
distributeScreenPermission: '大屏权限分发',
email: '邮箱',
nickName: '昵称',
mobile: '手机号',
name: '名称',
code: '编码',
status: '状态',
@ -65,7 +68,8 @@ export default {
choose: '选 择',
yuan: '元',
filteringKeywords: '输入关键字进行过滤',
previousStep: '上一步',
lastStep: '上一步',
nextStep: '下一步',
skip: '跳过',
modify: '修改',
language: '语言',
@ -76,9 +80,18 @@ export default {
synthesisTrainingTitle: '综合演练快速入口',
pleaseChooseRoom: '您没有选择房间',
inviteJoinRoom: '邀请你加入综合演练!',
trainingHasStart: '{{name}}的房间已开始',
trainingNotStart: '{{name}}的房间未开始',
trainingHasStart: '{name}的房间已开始',
trainingNotStart: '{name}的房间未开始',
inputRoomNumber: '请输入房间号',
chooseRoom: '选择房间',
month: '月'
month: '月',
putaway: '上 架',
soldOut: '下 架',
exportMap: '导出地图',
preview: '预览',
notBeUse: '该功能暂时未开启',
fastCreate: '快速创建',
duration: '时长',
isTry: '是否试用'
};

View File

@ -9,6 +9,10 @@ import scriptRecord from './scriptRecord';
import tip from './tip';
import system from './system';
import orderAuthor from './orderAuthor';
import publish from './publish';
import permission from './permission';
import replay from './replay';
import planMonitor from './planMonitor';
export default {
...cnLocale,
@ -21,5 +25,9 @@ export default {
scriptRecord,
tip,
system,
orderAuthor
orderAuthor,
publish,
permission,
replay,
planMonitor
};

View File

@ -142,6 +142,7 @@ export default {
meter: '米',
code: '编码:',
codeC: '编码',
imageName: '图片名称:',
imageWidth: '图片宽度:',
imageHeight: '图片高度:',
@ -329,6 +330,7 @@ export default {
trainCode: '列车编号:',
groupNumber: '车组号:',
trainNumber: '车组号',
modelCode: '车类型:',
trainmodelCreate: '新建车类型',
@ -468,6 +470,7 @@ export default {
startStationCodeColon: '起始站:',
startStationCode: '起始站台',
endStationCode: '终到站台',
destination: '目的地码',
routingDirection: '方向',
remarks: '描述',
remarksColon: '描述:',

View File

@ -0,0 +1,19 @@
export default {
permissionPack: '权限打包',
setSuccess: '设置成功',
isSureSetBelonger: '是否确定设置{name}为权限所属人?',
setBelonger: '设置归属人',
lessonName: '课程名称',
mapName: '地图名称',
mapProductName: '产品名称',
permissionType: '权限类型',
permissionStatus: '权限状态',
permissionUseType: '公用/专用',
permissionTotal: '权限总数',
permissionRemains: '生于权限',
isForever: '是否永久',
startTime: '开始时间',
endTime: '结束时间',
belonger: '归属人',
userList: '用户列表'
};

View File

@ -0,0 +1,3 @@
export default {
};

View File

@ -0,0 +1,47 @@
export default {
city: '所属城市',
skinType: '皮肤类型',
mapName: '地图名称',
lessonName: '课程名称',
updateMapName: '更新地图名称',
updateTime: '更新时间',
operationSuccess: '操作成功',
deleteSuccess: '删除成功',
wellDelType: '此操作将删除该类型, 是否继续?',
wellPutawayMap: '此操作将上架此地图, 是否继续?',
wellSoldOutMap: '此操作将下架此地图, 是否继续?',
productName: '产品名称',
productType: '产品类型',
productCode: '产品编码',
lessonIntroduction: '课程简介',
updateSuccess: '更新成功',
wellPutawayTraining: '此操作将上架此实训, 是否继续?',
wellSoldOutTraining: '此操作将下架此实训, 是否继续?',
wellPutawayProduct: '此操作将上架此产品, 是否继续?',
wellSoldOutProduct: '此操作将下架此产品, 是否继续?',
runPlanName: '运行图名称',
runEveryDayTime: '每日运行时间',
userId: '用户Id',
wellDelRunPlanEveryDay: '此操作将删除每日运行图, 是否继续?',
taskName: '任务名称',
createTime: '创建时间',
detail: '详情',
generateRunPlan: '生成每日运行图',
selectTemplateRunPlan: '选择模板运行图',
pleaseSelectTemplate: '请选择模板运行图',
selectMap: '选择地图',
createCommonRunPlan: '创建通用运行图',
createCommonSuccess: '创建通用运行图成功',
wellGenerateEveryRunPlan: '此操作将生成每日运行图, 是否继续?',
wellDelTemplate: '此操作将删除此运行图模板, 是否继续?',
fullMark: '满分',
passScore: '及格分',
examTime: '考试时间',
creator: '创建人',
paperName: '试卷名称',
setSuccess: '设置成功',
wellPutawayPaper: '此操作将此试卷上架, 是否继续?',
wellSoldOutPaper: '此操作将此试卷下架, 是否继续?',
wellDelPaper: '此操作将删除该试卷, 是否继续?'
};

View File

@ -0,0 +1,8 @@
export default {
replay: '回放',
mapName: '地图名称',
creatorId: '创建人ID',
createTime: '创建时间',
deleteSuccess: '删除成功',
wellDelReplay: '此操作将删除该回放, 是否继续?'
};

View File

@ -210,5 +210,8 @@ export default {
linkWidthInputPrompt: '请输入有效Link宽度',
sectionWidthInput: '请输入区段宽度',
sectionWidthInputPrompt: '请输入有效区段宽度',
selectShowWatermark: '请选择是否水印'
selectShowWatermark: '请选择是否水印',
pleaseInputMapName: '请输入地图新名称',
inputTemplateRunPlan: '请选择模板运行图'
};

View File

@ -6,13 +6,11 @@ export default {
createDirectory: '创建目录',
editDictionary: '编辑目录',
deleteSuccess: '删除成功',
dleeteTipContext: '此操作将删除该类型, 是否继续?',
createSuccess: '创建成功',
updateSuccess: '更新成功',
destory: '销 毁',
simulationGroup: '仿真Group',
userName: '用户名',
mobile: '手机号',
skinCode: '皮肤编号',
prdType: '产品类型',
simulationType: '仿真类型',
@ -21,7 +19,7 @@ export default {
isError: '是否错误',
isSuspend: '是否暂停',
isDrivingAsplanned: '是否按计划行车',
delUserSimulationIsContinue: '此操作将删除此用户仿真数据, 是否继续?',
wellDelUserSimulation: '此操作将删除此用户仿真数据, 是否继续?',
createDetail: '创建明细',
editDetail: '编辑明细',
mapName: '地图名称',
@ -36,13 +34,12 @@ export default {
examScore: '考试成绩',
examResult: '考试结果',
examName: '试卷名称',
delExamResultIsContinue: '此操作将删除此考试结果, 是否继续?',
wellDelExamResult: '此操作将删除此考试结果, 是否继续?',
editExamDetail: '编辑考试详情',
subscribeMap: '订阅地图',
roles: '角色',
email: '邮箱',
nickname: '昵称',
delTypeIsContinue: '此操作将删除该类型, 是否继续?',
wellDelType: '此操作将删除该类型, 是否继续?',
permission: '权限',
editUserPermission: '编辑用户权限',
lessonName: '课程名称',

View File

@ -48,12 +48,20 @@ export function JLmapDriving(dom, data, skinCode) {
const renderer = SetRender(dom);
renderer.domElement.style.position = 'absolute';
renderer.domElement.style.top = '0';
var renderercctv = new THREE.WebGLRenderer();
renderercctv.setSize(dom.offsetWidth*0.2, dom.offsetHeight*0.2);
renderercctv.domElement.style.position = 'absolute';
renderercctv.domElement.style.top = '0';
document.getElementById('jlsimulation').appendChild(renderer.domElement);
document.getElementById('jlcctv').appendChild(renderercctv.domElement);
// 定义相机
let camera = SetCamera(dom);
// 定义场景(渲染容器)
const scene = SetScene();
const speed = 0;
let drivingcode = null;
@ -80,6 +88,8 @@ export function JLmapDriving(dom, data, skinCode) {
this.atospeed = null;
this.trainnum = null;
this.stime = null;
this.drivecount = 0;
this.drivedata = null;
this.webwork=new Worker('../../static/workertest/trainworker.js');
// 地图模型数据
@ -91,6 +101,12 @@ export function JLmapDriving(dom, data, skinCode) {
const controls3 = new MouseControls(camera2, 1.6);
controls3.enabled = true;
scene.add(controls3.getObject());
let cameracctv = new THREE.PerspectiveCamera(70, dom.clientWidth/dom.clientHeight, 1, 20);
cameracctv.position.set( 5, 1,27 );
cameracctv.rotation.y = Math.PI/5*3;
camera2.add(cameracctv);
// 订阅仿真socket
this.Subscribe = new Jl3dDriving(scope);
// 连接到通信
@ -122,7 +138,9 @@ export function JLmapDriving(dom, data, skinCode) {
if (scope.animateswitch == true) {
// 根据相机渲染场景
renderer.render(scene, camera2);
renderercctv.render(scene,cameracctv);
// updatcontrols();
// renderercctv
controls3.update();
// 检测动画构造器播放动画
@ -176,6 +194,10 @@ export function JLmapDriving(dom, data, skinCode) {
this.updatestoptime = function(stime) {
scope.stime = stime;
};
this.updatedrivedata = function(drivedata){
scope.drivecount += 1;
scope.drivedata = drivedata;
};
this.updatedrivingcode = function(code) {
drivingcode = code;

View File

@ -93,12 +93,13 @@ export function Jl3dDriving(jlmap3d) {
//
//
// }
if (data.type == 'Simulation_Driver_Change') {
drivingcode = data.body.code;
jlmap3d.updatedrivingcode( data.body.code);
}
if(data.type == 'Simulation_Drive_Data_Routing'){
jlmap3d.updatedrivedata(data.body);
}
if (data.type == 'Simulation_TrainSpeed') {
if (trainlisttest) {
@ -167,14 +168,14 @@ export function Jl3dDriving(jlmap3d) {
} else {
syncdata.percent = sectionlist.sections.datalist[data.body[i].sectionCode].lstop/trainlisttest.list[code].len;
}
scope.teststomp.send('/app/topic/simulation/wgu3d', syncdata);
//scope.teststomp.send('/app/topic/simulation/wgu3d', syncdata);
} else {
if (data.body[i].directionType == '02') {
syncdata.percent = trainlisttest.list[code].progress;
} else {
syncdata.percent = 1 - trainlisttest.list[code].progress;
}
scope.teststomp.send('/app/topic/simulation/wgu3d', syncdata);
//scope.teststomp.send('/app/topic/simulation/wgu3d', syncdata);
}
if (data.body[i].parkRemainTime>0) {

View File

@ -564,6 +564,7 @@ THREE.FBXLoader = ( function () {
if ( parameters.opacity < 1.0 ) {
parameters.transparent = true;
parameters.alphaTest = 0.1;
}
if ( materialNode.ReflectionFactor ) {
@ -634,6 +635,7 @@ THREE.FBXLoader = ( function () {
case 'TransparentColor':
parameters.alphaMap = self.getTexture( textureMap, child.ID );
parameters.transparent = true;
parameters.alphaTest = 0.1;
break;
case 'AmbientColor':

View File

@ -1,183 +1,188 @@
<template>
<el-dialog class="batong-01__systerm view-train-id" title="列车识别号显示设置" :visible.sync="show" width="420px" :before-close="doClose"
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">计划车显示模式</span>
<el-radio-group v-model="planMode">
<el-row>
<el-col :span="10">
<el-radio :label="1">表号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="2">表号+车组号</el-radio>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-radio :label="3">目的地号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="4">目的地号+车组号</el-radio>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-radio :label="5">目的地号+表号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="6">目的地号+表号+车组号</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray; margin: 20px 0px;">
<span class="base-label">头码车显示模式</span>
<el-radio-group v-model="headMode">
<el-row>
<el-col :span="10">
<el-radio :label="3">目的地号+车次号</el-radio>
</el-col>
<el-col :span="6" :offset="8">
<el-radio :label="4">目的地号+车组号</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">字体大小</span>
<el-row>
<el-col :span="10">
<el-input v-model="fontSize" size="small" min="16" max="99"></el-input>
</el-col>
<el-col :span="10" :offset="1">
<span style="height:32px; line-height:32px;">范围16-99</span>
</el-col>
</el-row>
</div>
<el-row class="button-group">
<el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="4" :offset="8">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
<el-dialog
class="batong-01__systerm view-train-id"
title="列车识别号显示设置"
:visible.sync="show" width="420px" :before-close="doClose"
:z-index="2000"
v-dialogDrag :modal="false" :close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">计划车显示模式</span>
<el-radio-group v-model="planMode">
<el-row>
<el-col :span="10">
<el-radio :label="1">表号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="2">表号+车组号</el-radio>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
<el-row>
<el-col :span="10">
<el-radio :label="3">目的地号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="4">目的地号+车组号</el-radio>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-radio :label="5">目的地号+表号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="6">目的地号+表号+车组号</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray; margin: 20px 0px;">
<span class="base-label">头码车显示模式</span>
<el-radio-group v-model="headMode">
<el-row>
<el-col :span="10">
<el-radio :label="3">目的地号+车次号</el-radio>
</el-col>
<el-col :span="6" :offset="8">
<el-radio :label="4">目的地号+车组号</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">字体大小</span>
<el-row>
<el-col :span="10">
<el-input v-model="fontSize" size="small" min="16" max="99" />
</el-col>
<el-col :span="10" :offset="1">
<span style="height:32px; line-height:32px;">范围16-99</span>
</el-col>
</el-row>
</div>
<el-row class="button-group">
<el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="4" :offset="8">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'ViewTrainId',
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: '',
planMode: 5,
headMode: 5,
fontSize: 16,
}
},
components: {
NoticeInfo
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.setTrainDispaly();
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
export default {
name: 'ViewTrainId',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: '',
planMode: 5,
headMode: 5,
fontSize: 16
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.setTrainDispaly();
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
//
if (!this.dialogShow) {
this.loading = false;
}
//
if (!this.dialogShow) {
this.loading = false;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
})
},
commit() {
let operate = {
over: true,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
val: [this.planMode, this.headMode, this.fontSize].join('::')
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
over: true,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
val: [this.planMode, this.headMode, this.fontSize].join('::')
};
this.loading = true
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false
if (valid) {
this.setTrainDispaly();
this.doClose();
}
}).catch(error => {
this.loading = false;
})
},
setTrainDispaly() {
let updatList = [];
let trainList = this.$store.getters['training/viewTrainList'];
if (trainList && trainList.length > 0) {
let nameFormat = this.trainNameFormatBy(this.planMode);
let nameFontSize = this.fontSize;
updatList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameFormat, nameFontSize })); //
});
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.setTrainDispaly();
this.doClose();
}
}).catch(error => {
this.loading = false;
});
},
setTrainDispaly() {
const updatList = [];
const trainList = this.$store.getters['training/viewTrainList']();
if (trainList && trainList.length > 0) {
const nameFormat = this.trainNameFormatBy(this.planMode);
const nameFontSize = this.fontSize;
updatList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameFormat, nameFontSize })); //
});
this.$store.dispatch('map/updateMapDevices', updatList);
}
},
trainNameFormatBy(mode) {
switch (mode.toString()) {
case '1': return 'serverNo:trainNo'; //+
case '2': return 'serverNo:trainNumber'; //+
case '3': return 'targetCode:trainNo'; //+
case '4': return 'targetCode:trainNumber'; //+
case '5': return 'targetCode:serverNo:trainNo'; //++
case '6': return 'targetCode:serverNo:trainNumber'; //++
}
return ''; //
}
}
}
this.$store.dispatch('map/updateMapDevices', updatList);
}
},
trainNameFormatBy(mode) {
switch (mode.toString()) {
case '1': return 'serverNo:trainNo'; // +
case '2': return 'serverNo:trainNumber'; // +
case '3': return 'targetCode:trainNo'; // +
case '4': return 'targetCode:trainNumber'; // +
case '5': return 'targetCode:serverNo:trainNo'; // ++
case '6': return 'targetCode:serverNo:trainNumber'; // ++
}
return ''; //
}
}
};
</script>

View File

@ -1,77 +1,84 @@
<template>
<el-dialog class="beijing-01__systerm view-train-id" title="列车识别号显示设置" :visible.sync="show" width="420px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">计划车显示模式</span>
<el-radio-group v-model="planMode">
<el-row>
<el-col :span="10">
<el-radio :label="1">表号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="2">表号+车组号</el-radio>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-radio :label="3">目的地号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="4">目的地号+车组号</el-radio>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-radio :label="5">目的地号+表号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="6">目的地号+表号+车组号</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray; margin: 20px 0px;">
<span class="base-label">头码车显示模式</span>
<el-radio-group v-model="headMode">
<el-row>
<el-col :span="10">
<el-radio :label="3">目的地号+车次号</el-radio>
</el-col>
<el-col :span="6" :offset="8">
<el-radio :label="4">目的地号+车组号</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">字体大小</span>
<el-row>
<el-col :span="10">
<el-input v-model="fontSize" size="small" min="16" max="99"></el-input>
</el-col>
<el-col :span="10" :offset="1">
<span style="height:32px; line-height:32px;">范围16-99</span>
</el-col>
</el-row>
</div>
<el-row class="button-group">
<el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="4" :offset="8">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
<el-dialog
class="beijing-01__systerm view-train-id"
title="列车识别号显示设置" :visible.sync="show" width="420px"
:before-close="doClose"
:z-index="2000" :modal="false" v-dialogDrag :close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">计划车显示模式</span>
<el-radio-group v-model="planMode">
<el-row>
<el-col :span="10">
<el-radio :label="1">表号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="2">表号+车组号</el-radio>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
<el-row>
<el-col :span="10">
<el-radio :label="3">目的地号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="4">目的地号+车组号</el-radio>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-radio :label="5">目的地号+表号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="6">目的地号+表号+车组号</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray; margin: 20px 0px;">
<span class="base-label">头码车显示模式</span>
<el-radio-group v-model="headMode">
<el-row>
<el-col :span="10">
<el-radio :label="3">目的地号+车次号</el-radio>
</el-col>
<el-col :span="6" :offset="8">
<el-radio :label="4">目的地号+车组号</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">字体大小</span>
<el-row>
<el-col :span="10">
<el-input v-model="fontSize" size="small" min="16" max="99"/>
</el-col>
<el-col :span="10" :offset="1">
<span style="height:32px; line-height:32px;">范围16-99</span>
</el-col>
</el-row>
</div>
<el-row class="button-group">
<el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="4" :offset="8">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"/>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'ViewTrainId',
export default {
name: 'ViewTrainId',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
@ -83,101 +90,98 @@
fontSize: 16,
}
},
components: {
NoticeInfo
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.setTrainDispaly();
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.setTrainDispaly();
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
//
if (!this.dialogShow) {
this.loading = false;
}
//
if (!this.dialogShow) {
this.loading = false;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
})
},
commit() {
let operate = {
over: true,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
val: [this.planMode, this.headMode, this.fontSize].join('::')
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
over: true,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
val: [this.planMode, this.headMode, this.fontSize].join('::')
};
this.loading = true
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false
if (valid) {
this.setTrainDispaly();
this.doClose();
}
}).catch(error => {
this.loading = false;
})
},
setTrainDispaly() {
let updatList = [];
let trainList = this.$store.getters['training/viewTrainList'];
if (trainList && trainList.length > 0) {
let nameFormat = this.trainNameFormatBy(this.planMode);
let nameFontSize = this.fontSize;
updatList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameFormat, nameFontSize })); //
});
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.setTrainDispaly();
this.doClose();
}
}).catch(error => {
this.loading = false;
});
},
setTrainDispaly() {
const updatList = [];
const trainList = this.$store.getters['training/viewTrainList']();
if (trainList && trainList.length > 0) {
const nameFormat = this.trainNameFormatBy(this.planMode);
const nameFontSize = this.fontSize;
updatList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameFormat, nameFontSize })); //
});
this.$store.dispatch('map/updateMapDevices', updatList);
}
},
trainNameFormatBy(mode) {
switch (mode.toString()) {
case '1': return 'serviceNumber:tripNumber'; //+
case '2': return 'serviceNumber:groupNumber'; //+
case '3': return 'targetCode:tripNumber'; //+
case '4': return 'targetCode:groupNumber'; //+
case '5': return 'targetCode:serviceNumber:tripNumber'; //++
case '6': return 'targetCode:serviceNumber:groupNumber'; //++
}
return ''; //
}
}
}
this.$store.dispatch('map/updateMapDevices', updatList);
}
},
trainNameFormatBy(mode) {
switch (mode.toString()) {
case '1': return 'serviceNumber:tripNumber'; // +
case '2': return 'serviceNumber:groupNumber'; // +
case '3': return 'targetCode:tripNumber'; // +
case '4': return 'targetCode:groupNumber'; // +
case '5': return 'targetCode:serviceNumber:tripNumber'; // ++
case '6': return 'targetCode:serviceNumber:groupNumber'; // ++
}
return ''; //
}
}
};
</script>

View File

@ -1,77 +1,84 @@
<template>
<el-dialog class="chengdou-03__systerm view-train-id" title="列车识别号显示设置" :visible.sync="show" width="420px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">计划车显示模式</span>
<el-radio-group v-model="planMode">
<el-row>
<el-col :span="10">
<el-radio :label="1">表号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="2">表号+车组号</el-radio>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-radio :label="3">目的地号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="4">目的地号+车组号</el-radio>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-radio :label="5">目的地号+表号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="6">目的地号+表号+车组号</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray; margin: 20px 0px;">
<span class="base-label">头码车显示模式</span>
<el-radio-group v-model="headMode">
<el-row>
<el-col :span="10">
<el-radio :label="3">目的地号+车次号</el-radio>
</el-col>
<el-col :span="6" :offset="8">
<el-radio :label="4">目的地号+车组号</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">字体大小</span>
<el-row>
<el-col :span="10">
<el-input v-model="fontSize" size="small" min="16" max="99"></el-input>
</el-col>
<el-col :span="10" :offset="1">
<span style="height:32px; line-height:32px;">范围16-99</span>
</el-col>
</el-row>
</div>
<el-row class="button-group">
<el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="4" :offset="8">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
<el-dialog
class="chengdou-03__systerm view-train-id"
title="列车识别号显示设置" :visible.sync="show" width="420px"
:before-close="doClose"
:z-index="2000" :modal="false" v-dialogDrag :close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">计划车显示模式</span>
<el-radio-group v-model="planMode">
<el-row>
<el-col :span="10">
<el-radio :label="1">表号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="2">表号+车组号</el-radio>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
<el-row>
<el-col :span="10">
<el-radio :label="3">目的地号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="4">目的地号+车组号</el-radio>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-radio :label="5">目的地号+表号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="6">目的地号+表号+车组号</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray; margin: 20px 0px;">
<span class="base-label">头码车显示模式</span>
<el-radio-group v-model="headMode">
<el-row>
<el-col :span="10">
<el-radio :label="3">目的地号+车次号</el-radio>
</el-col>
<el-col :span="6" :offset="8">
<el-radio :label="4">目的地号+车组号</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">字体大小</span>
<el-row>
<el-col :span="10">
<el-input v-model="fontSize" size="small" min="16" max="99"/>
</el-col>
<el-col :span="10" :offset="1">
<span style="height:32px; line-height:32px;">范围16-99</span>
</el-col>
</el-row>
</div>
<el-row class="button-group">
<el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="4" :offset="8">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"/>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'ViewTrainId',
export default {
name: 'ViewTrainId',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
@ -83,101 +90,98 @@
fontSize: 16,
}
},
components: {
NoticeInfo
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.setTrainDispaly();
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.setTrainDispaly();
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
//
if (!this.dialogShow) {
this.loading = false;
}
//
if (!this.dialogShow) {
this.loading = false;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
})
},
commit() {
let operate = {
over: true,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
val: [this.planMode, this.headMode, this.fontSize].join('::')
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
over: true,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
val: [this.planMode, this.headMode, this.fontSize].join('::')
};
this.loading = true
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false
if (valid) {
this.setTrainDispaly();
this.doClose();
}
}).catch(error => {
this.loading = false;
})
},
setTrainDispaly() {
let updatList = [];
let trainList = this.$store.getters['training/viewTrainList'];
if (trainList && trainList.length > 0) {
let nameFormat = this.trainNameFormatBy(this.planMode);
let nameFontSize = this.fontSize;
trainList.forEach(elem => {
updatList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameFormat, nameFontSize }));
});
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.setTrainDispaly();
this.doClose();
}
}).catch(error => {
this.loading = false;
});
},
setTrainDispaly() {
const updatList = [];
const trainList = this.$store.getters['training/viewTrainList']();
if (trainList && trainList.length > 0) {
const nameFormat = this.trainNameFormatBy(this.planMode);
const nameFontSize = this.fontSize;
trainList.forEach(elem => {
updatList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameFormat, nameFontSize }));
});
this.$store.dispatch('map/updateMapDevices', updatList);
}
},
trainNameFormatBy(mode) {
switch (mode.toString()) {
case '1': return 'serviceNumber:tripNumber'; //+
case '2': return 'serviceNumber:groupNumber'; //+
case '3': return 'targetCode:tripNumber'; //+
case '4': return 'targetCode:groupNumber'; //+
case '5': return 'targetCode:serviceNumber:tripNumber'; //++
case '6': return 'targetCode:serviceNumber:groupNumber'; //++
}
return ''; //
}
}
}
this.$store.dispatch('map/updateMapDevices', updatList);
}
},
trainNameFormatBy(mode) {
switch (mode.toString()) {
case '1': return 'serviceNumber:tripNumber'; // +
case '2': return 'serviceNumber:groupNumber'; // +
case '3': return 'targetCode:tripNumber'; // +
case '4': return 'targetCode:groupNumber'; // +
case '5': return 'targetCode:serviceNumber:tripNumber'; // ++
case '6': return 'targetCode:serviceNumber:groupNumber'; // ++
}
return ''; //
}
}
};
</script>

View File

@ -166,7 +166,7 @@ export default {
},
setTrainDispaly() {
const updatlist = [];
const trainList = this.$store.getters['training/viewTrainList'];
const trainList = this.$store.getters['training/viewTrainList']();
if (trainList && trainList.length > 0) {
const nameFormat = this.trainNameFormatBy(this.planMode);
const nameFontSize = this.fontSize;

View File

@ -3,8 +3,8 @@ import * as throttleUtil from '@/utils/throttle';
export default {
data() {
return {
_clientWidth: '',
_clientHeight: ''
_clientWidth: 0,
_clientHeight: 0
};
},
beforeMount() {

View File

@ -40,6 +40,7 @@ import Lessoncategory from '@/views/lesson/lessoncategory/index';
import Scriptmanage from '@/views/scriptManage/index';
import ScriptmanageHome from '@/views/scriptManage/home';
import ScriptDisplay from '@/views/scriptManage/display/index';
import ScriptDetail from '@/views/scriptManage/detail/index';
import Teach from '@/views/teach/index';
@ -133,6 +134,7 @@ export const userPlan = '015'; // 计划系统
export const UrlConfig = {
display: '/display',
scriptDisplay: '/scriptDisplay',
examRuleDraft: '/examRule/draft',
examRuleManage: '/examRule/manage',
map: {
@ -211,7 +213,8 @@ export const UrlConfig = {
},
script: {
prefix: '/script',
detail: '/script/detail'
detail: '/script/detail',
display: '/script/display'
}
};
@ -310,6 +313,13 @@ export const asyncRouter = [
},
hidden: true
},
{
path: '/scriptDisplay/:mode',
component: ScriptDisplay,
meta: {
},
hidden: true
},
{
path: '/trainroom',
component: TrainRoom,

View File

@ -36,6 +36,7 @@ export const translate = {
{ key: 'code', tHeader: '交路编号', formatter: (val) => { return val || ''; } },
{ key: 'name', tHeader: '交路名称', formatter: (val) => { return val || ''; } },
{ key: 'directionCode', tHeader: '方向码', formatter: (val) => { return val || 0; } },
{ key: 'destinationCode', tHeader: '目的地码', formatter: (val) => { return val || ''; } },
{ key: 'startSectionCode', tHeader: '起始区段', formatter: (val) => { return val || ''; } },
{ key: 'startStationCode', tHeader: '起始车站', formatter: (val) => { return val || ''; } },
{ key: 'endSectionCode', tHeader: '终到区段', formatter: (val) => { return val || ''; } },

View File

@ -2,37 +2,48 @@
* 实训状态数据
*/
const scriptRecord = {
namespaced: true,
state: {
mapLocation: {}, //地图定位,
simulationPause: true ,
},
getters: {
mapLocation: (state)=>{
return state.mapLocation;
},
simulationPause:(state)=>{
return state.simulationPause;
},
},
mutations: {
setMapLocation: (state, mapLocation) => {
namespaced: true,
state: {
mapLocation: {}, // 地图定位,
simulationPause: true,
scriptId: ''
},
getters: {
mapLocation: (state)=>{
return state.mapLocation;
},
simulationPause: (state)=>{
return state.simulationPause;
},
scriptId: (state)=>{
return state.scriptId;
}
},
mutations: {
setMapLocation: (state, mapLocation) => {
state.mapLocation = mapLocation;
},
setSimulationPause: (state, simulationPause) => {
},
setSimulationPause: (state, simulationPause) => {
state.simulationPause = simulationPause;
},
},
actions: {
/**
},
setscriptId: (state, scriptId) => {
state.scriptId = scriptId;
}
},
actions: {
/**
* 设置地图定位
*/
updateMapLocation: ({ commit }, mapLocation) => {
updateMapLocation: ({ commit }, mapLocation) => {
commit('setMapLocation', mapLocation);
},
updateSimulationPause: ({ commit }, simulationPause) => {
},
updateSimulationPause: ({ commit }, simulationPause) => {
commit('setSimulationPause', simulationPause);
},
}
},
updateScriptId: ({ commit }, scriptId) => {
commit('setscriptId', scriptId);
}
}
};
export default scriptRecord;

View File

@ -88,6 +88,8 @@ function handle(state, data) {
case 'Simulation_Quest_Finish': // 任务结束标志
state.tipOperateCount++;
break;
case 'Simulation_Control_Pause': // 暂停中
store.dispatch('scriptRecord/updateSimulationPause', msg);
}
}

View File

@ -78,7 +78,7 @@ const training = {
return state.roles;
},
// 视图中的列车列表
viewTrainList: (state) => {
viewTrainList: (state) => () =>{
const trainList = [];
const mapDevice = Vue.prototype.$jlmap.mapDevice;
Object.values(mapDevice).forEach(device => {

View File

@ -4,6 +4,7 @@ const I18N_LANG = 'user_lang';
export default {
setLang(lang) {
Cookies.set(I18N_LANG, lang);
window.location.reload();
},
getLang(defaultLang) {
const localLang = Cookies.get(I18N_LANG);

View File

@ -1,86 +1,93 @@
<template>
<div class="digit" :style="{width: 11*zoom+'px', height: 20*zoom+'px', top: top+'px'}">
<div class="segment on"
:style="{ background: color, 'border-radius': zoom+'px', opacity: opacity(isShowOne), top: zoom+'px', left: zoom*2+'px', right: zoom*2+'px', height: zblod+'px'}">
</div>
<div class="segment on"
:style="{ background: color, 'border-radius': zoom+'px', opacity: opacity(isShowTwo), top: zoom*2+'px', right: zoom+'px', width: zblod+'px', height: zoom*7.5+'px'}">
</div>
<div class="segment on"
:style="{ background: color, 'border-radius': zoom+'px', opacity: opacity(isShowThee), bottom: zoom*2+'px', right: zoom+'px', width: zblod+'px', height: zoom*7.5+'px'}">
</div>
<div class="segment on "
:style="{ background: color, 'border-radius': zoom+'px', opacity: opacity(isShowFour), bottom: zoom+'px', right: zoom*2+'px', height: zblod+'px', left: zoom*2+'px' }">
</div>
<div class="segment on "
:style="{ background: color, 'border-radius': zoom+'px', opacity: opacity(isShowFive), bottom: zoom*2+'px', left: zoom+'px', width: zblod+'px', height: zoom*7.5+'px'}">
</div>
<div class="segment on "
:style="{ background: color, 'border-radius': zoom+'px', opacity: opacity(isShowSix), top: zoom*2+'px', left: zoom+'px',width: zblod+'px', height: zoom*7.5+'px'}">
</div>
<div class="segment "
:style="{ background: color, 'border-radius': zoom+'px', opacity: opacity(isShowSeven), left: zoom*2+'px', right: zoom*2+'px', height: zblod+'px', bottom: zoom*9.5+'px'}">
</div>
</div>
<div class="digit" :style="{width: 11*zoom+'px', height: 20*zoom+'px', top: top+'px'}">
<div
class="segment on"
:style="{ background: color, 'border-radius': zoom+'px', opacity: opacity(isShowOne), top: zoom+'px', left: zoom*2+'px', right: zoom*2+'px', height: zblod+'px'}"
/>
<div
class="segment on"
:style="{ background: color, 'border-radius': zoom+'px', opacity: opacity(isShowTwo), top: zoom*2+'px', right: zoom+'px', width: zblod+'px', height: zoom*7.5+'px'}"
/>
<div
class="segment on"
:style="{ background: color, 'border-radius': zoom+'px', opacity: opacity(isShowThee), bottom: zoom*2+'px', right: zoom+'px', width: zblod+'px', height: zoom*7.5+'px'}"
/>
<div
class="segment on "
:style="{ background: color, 'border-radius': zoom+'px', opacity: opacity(isShowFour), bottom: zoom+'px', right: zoom*2+'px', height: zblod+'px', left: zoom*2+'px' }"
/>
<div
class="segment on "
:style="{ background: color, 'border-radius': zoom+'px', opacity: opacity(isShowFive), bottom: zoom*2+'px', left: zoom+'px', width: zblod+'px', height: zoom*7.5+'px'}"
/>
<div
class="segment on "
:style="{ background: color, 'border-radius': zoom+'px', opacity: opacity(isShowSix), top: zoom*2+'px', left: zoom+'px',width: zblod+'px', height: zoom*7.5+'px'}"
/>
<div
class="segment "
:style="{ background: color, 'border-radius': zoom+'px', opacity: opacity(isShowSeven), left: zoom*2+'px', right: zoom*2+'px', height: zblod+'px', bottom: zoom*9.5+'px'}"
/>
</div>
</template>
<script>
export default {
name: 'digit',
props: {
top: {
type: Number,
required: true
},
zoom: {
type: Number,
required: true
},
number: {
type: Number,
required: true
},
fine: {
type: Number,
required: true,
},
color: {
type: String,
required: true,
}
},
computed: {
zblod() {
return parseInt(this.fine * this.zoom)
},
isShowOne() {
return [2, 3, 5, 6, 7, 8, 9, 0].indexOf(this.number) != -1;
},
isShowTwo() {
return [1, 2, 3, 4, 7, 8, 9, 0].indexOf(this.number) != -1;
},
isShowThee() {
return [1, 3, 4, 5, 6, 7, 8, 9, 0].indexOf(this.number) != -1;
},
isShowFour() {
return [2, 3, 5, 6, 8, 9, 0].indexOf(this.number) != -1;
},
isShowFive() {
return [2, 6, 8, 0].indexOf(this.number) != -1;
},
isShowSix() {
return [4, 5, 6, 8, 9, 0].indexOf(this.number) != -1;
},
isShowSeven() {
return [2, 3, 4, 5, 6, 8, 9].indexOf(this.number) != -1;
},
},
methods: {
opacity(show) {
return show ? 1 : 0.2;
}
}
}
export default {
name: 'Digit',
props: {
top: {
type: Number,
required: true
},
zoom: {
type: Number,
required: true
},
number: {
type: Number,
required: true
},
fine: {
type: Number,
required: true
},
color: {
type: String,
required: true
}
},
computed: {
zblod() {
return parseInt(this.fine * this.zoom);
},
isShowOne() {
return [2, 3, 5, 6, 7, 8, 9, 0].indexOf(this.number) != -1;
},
isShowTwo() {
return [1, 2, 3, 4, 7, 8, 9, 0].indexOf(this.number) != -1;
},
isShowThee() {
return [1, 3, 4, 5, 6, 7, 8, 9, 0].indexOf(this.number) != -1;
},
isShowFour() {
return [2, 3, 5, 6, 8, 9, 0].indexOf(this.number) != -1;
},
isShowFive() {
return [2, 6, 8, 0].indexOf(this.number) != -1;
},
isShowSix() {
return [4, 5, 6, 8, 9, 0].indexOf(this.number) != -1;
},
isShowSeven() {
return [2, 3, 4, 5, 6, 8, 9].indexOf(this.number) != -1;
}
},
methods: {
opacity(show) {
return show ? 1 : 0.2;
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -1,75 +1,84 @@
<template>
<div class="system-time-box"
:style="{background: background, width: width+'px', height: height+'px', 'line-height': height+'px'}">
<template v-for="(item,index) in time">
<digit v-if="Number.isInteger(parseInt(item))" :number="parseInt(item)" :color="color" :fine="fine"
:zoom="time.length - index > 2? zoom: zoom* 0.6" :top="top"></digit>
<separator v-if="!Number.isInteger(parseInt(item))" :color="color" :zoom="zoom" :fine="fine"></separator>
</template>
</div>
<div
class="system-time-box"
:style="{background: background, width: width+'px', height: height+'px', 'line-height': height+'px'}"
>
<template v-for="(item,index) in time">
<digit
v-if="Number.isInteger(parseInt(item))"
:key="index"
:number="parseInt(item)"
:color="color"
:fine="fine"
:zoom="time.length - index > 2? zoom: zoom* 0.6"
:top="top"
/>
<separator v-if="!Number.isInteger(parseInt(item))" :key="index" :color="color" :zoom="zoom" :fine="fine" />
</template>
</div>
</template>
<script>
import Digit from './digit';
import Separator from './separator';
import Digit from './digit';
import Separator from './separator';
export default {
name: 'SystenTime',
props: {
background: {
type: String,
default() {
return '#000';
}
},
color: {
type: String,
default() {
return '#00FF00'
}
},
time: {
type: String,
default() {
return '12:3456'
}
},
zoom: {
type: Number,
default() {
return 4;
}
},
width: {
type: Number,
default() {
return 280;
}
},
height: {
type: Number,
default() {
return 80;
}
},
fine: {
type: Number,
default() {
return 1;
}
},
top: {
type: Number,
default() {
return 1;
}
}
},
components: {
Digit,
Separator
}
}
export default {
name: 'SystenTime',
components: {
Digit,
Separator
},
props: {
background: {
type: String,
default() {
return '#000';
}
},
color: {
type: String,
default() {
return '#00FF00';
}
},
time: {
type: String,
default() {
return '12:3456';
}
},
zoom: {
type: Number,
default() {
return 4;
}
},
width: {
type: Number,
default() {
return 280;
}
},
height: {
type: Number,
default() {
return 80;
}
},
fine: {
type: Number,
default() {
return 1;
}
},
top: {
type: Number,
default() {
return 1;
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -1,38 +1,39 @@
<template>
<div class="point"
:style="{background: color, width: zblod+'px', height: zblod+'px', top: top+'px', 'border-radius': 0.5*zblod+'px'}">
</div>
<div
class="point"
:style="{background: color, width: zblod+'px', height: zblod+'px', top: top+'px', 'border-radius': 0.5*zblod+'px'}"
/>
</template>
<script>
export default {
name: 'point',
props: {
top: {
type: Number,
required: true,
},
zoom: {
type: Number,
required: true,
},
fine: {
type: Number,
required: true,
},
color: {
type: String,
required: true,
}
},
computed: {
zblod() {
return parseInt(this.fine * this.zoom)
}
},
methods: {
}
}
export default {
name: 'Point',
props: {
top: {
type: Number,
required: true
},
zoom: {
type: Number,
required: true
},
fine: {
type: Number,
required: true
},
color: {
type: String,
required: true
}
},
computed: {
zblod() {
return parseInt(this.fine * this.zoom);
}
},
methods: {
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -189,11 +189,11 @@ export default {
checkDisabled(role) {
if (this.$route.query.prdType == '01') {
return role !== 'Attendant';
return role !== 'Attendant' && role !== 'no';
} else if (this.$route.query.prdType == '02') {
return role !== 'Dispatcher';
return role !== 'Dispatcher'&& role !== 'no';
} else if (this.$route.query.prdType == '04') {
return role !== 'Driver';
return role !== 'Driver' && role !== 'no';
}
},

View File

@ -267,7 +267,7 @@ export default {
group: this.group,
conversationId: this.conversationId
};
const res = await postDataBd(param).catch(error => {
await postDataBd(param).catch(error => {
this.sending = false;
const message = JSON.parse(error.message);
if (message.err_no == 3301) {

View File

@ -26,10 +26,10 @@
<menu-replay v-if="isReplay" ref="menuReplay" :offset="offset" :group="group" />
<menu-script v-if="isTask" ref="menuScript" :offset="offset" :group="group" />
<menu-script v-if="isScript" ref="menuScript" :offset="offset" :group="group" />
<menu-schema
v-if="isDemon || isPlan || isTask "
v-if="isDemon || isPlan || isScript "
ref="menuSchema"
:offset="offset"
:group="group"
@ -40,7 +40,7 @@
@switchMode="switchMode"
/>
<menu-system-time ref="menuSystemTime" :offset="offset" :group="group" />
<menu-system-time ref="menuSystemTime" :offset="offset" :right="right" :group="group" />
</div>
<Jl3d-Simulation v-show="simulationShow" ref="Jl3dSimulation" :panel-show="simulationShow" @showpanel="showpanel" />
@ -107,6 +107,14 @@ export default {
Jl3dDrive
},
mixins: [WindowResizeHandler],
props: {
size: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
mode: '',
@ -114,6 +122,7 @@ export default {
timeDemonNum: 0,
checkLine: null,
offset: 15,
right: 0,
mouseNum: 1,
ierval: null,
mouseNumTime: 0,
@ -146,6 +155,18 @@ export default {
...mapGetters('config', [
'canvasId'
]),
trainingId() {
return this.$route.query.trainingId;
},
skinCode() {
return this.$route.query.skinCode;
},
mapId() {
return this.$route.query.mapId;
},
prdType() {
return this.$route.query.prdType;
},
isLesson() {
return this.mode === 'teach' || this.mode === 'record' || this.mode === 'manage';
},
@ -161,17 +182,14 @@ export default {
isReplay() {
return this.mode === 'replay';
},
isTask() {
isScript() {
return this.mode === 'script';
},
isPlan() {
return this.mode === 'plan';
},
isDrive() {
return this.$route.query.prdType == '04';
},
trainingId() {
return this.$route.query.trainingId;
return this.prdType == '04';
}
},
watch: {
@ -199,7 +217,9 @@ export default {
});
},
$route() {
this.initLoadData();
this.$nextTick(() => {
this.initLoadData();
});
}
},
async created() {
@ -224,9 +244,10 @@ export default {
},
methods: {
resizeHandler() {
const width = this._clientWidth;
const height = this._clientHeight;
const width = this.size ? this.size.width : this._clientWidth;
const height = this.size ? this.size.height : this._clientHeight;
this.right = width /2 - 55;
this.$store.dispatch('config/resize', { width, height });
this.$nextTick(() => {
@ -315,19 +336,18 @@ export default {
async loadSimulationInfo() {
const resp = await getSimulationInfo(this.group);
if (resp && resp.code == 200) {
this.$store.dispatch('scriptRecord/updateSimulationPause',resp.data.pause);
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause);
this.questId = Number(resp.data.questId) || 0;
}
},
//
async initLoadData() {
const width = document.documentElement.clientWidth;
const height = document.documentElement.clientHeight + 200;
this.$store.dispatch('config/resize', { width, height });
this.$store.dispatch('training/reset');
try {
await this.loadSimulationInfo();
if (!this.isReplay) {
await this.loadSimulationInfo();
}
if (this.isReplay) {
await this.initLoadReplayData();
@ -337,7 +357,7 @@ export default {
await this.initLoadScreenData();
} else if (this.isPlan) {
await this.initLoadTestRunData();
} else if (this.isTask) {
} else if (this.isScript) {
await this.initLoadTaskData();
} else {
await this.initLoadLessonOrExamData();
@ -381,9 +401,8 @@ export default {
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); //
this.$store.dispatch('training/setPrdType', '');
const skinCode = this.$route.query.skinCode;
if (parseInt(skinCode)) {
await this.loadMapData(skinCode);
if (parseInt(this.skinCode)) {
await this.loadMapData(this.skinCode);
} else {
this.endViewLoading();
@ -393,11 +412,10 @@ export default {
async initLoadDemonData() {
this.$store.dispatch('training/end', TrainingMode.NORMAL);
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); //
this.$store.dispatch('training/setPrdType', this.prdTypeMap[this.$route.query.prdType]);
this.$store.dispatch('training/setPrdType', this.prdTypeMap[this.prdType]);
const skinCode = this.$route.query.skinCode;
if (parseInt(skinCode)) {
await this.loadMapData(skinCode);
if (parseInt(this.skinCode)) {
await this.loadMapData(this.skinCode);
} else {
this.endViewLoading();
@ -409,9 +427,8 @@ export default {
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); //
this.$store.dispatch('training/setPrdType', '01');
const skinCode = this.$route.query.skinCode;
if (parseInt(skinCode)) {
await this.loadMapData(skinCode);
if (parseInt(this.skinCode)) {
await this.loadMapData(this.skinCode);
} else {
this.endViewLoading();
@ -423,9 +440,8 @@ export default {
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); //
this.switchMode('01');
const mapId = this.$route.query.mapId;
if (parseInt(mapId)) {
await this.loadMapDataById(mapId);
if (parseInt(this.mapId)) {
await this.loadMapDataById(this.mapId);
} else {
this.endViewLoading();
}
@ -436,9 +452,8 @@ export default {
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); //
this.$store.dispatch('training/setPrdType', '01');
const skinCode = this.$route.query.skinCode;
if (parseInt(skinCode)) {
await this.loadMapData(skinCode);
if (parseInt(this.skinCode)) {
await this.loadMapData(this.skinCode);
} else {
this.endViewLoading();
@ -510,7 +525,7 @@ export default {
await this.$refs.menuScreen.back();
} else if (this.isPlan) {
await this.$refs.menuPlan.back();
} else if (this.isTask) {
} else if (this.isScript) {
await this.$refs.menuScript.back();
}
},
@ -531,11 +546,11 @@ export default {
if (this.isDrive) {
this.panelShow = false;
this.drivingShow = true;
this.$refs.Jl3dDrive.show(this.$route.query.skinCode);
this.$refs.Jl3dDrive.show(this.skinCode);
} else {
this.panelShow = false;
this.simulationShow = true;
this.$refs.Jl3dSimulation.show(this.$route.query.skinCode);
this.$refs.Jl3dSimulation.show(this.skinCode);
}
},
showpanel() {

View File

@ -62,7 +62,7 @@ export default {
startLoading: false,
speed: '1X',
level: 1,
isPlay: true,
isPlay: false,
time: '',
timeInterval: null,
progress: 0,
@ -95,6 +95,11 @@ export default {
return this.isPlay ? '暂停' : '播放';
}
},
watch: {
'$store.state.map.mapViewLoadedCount': function() {
this.isPlay = true;
}
},
mounted() {
EventBus.$emit('showChat');
this.time = (+new Date(this.$route.query.destroyTime) - +new Date(this.$route.query.createTime)) / 1000;

View File

@ -7,9 +7,9 @@
<el-button-group>
<el-button v-if="isDemon" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">加载剧本
</el-button>
<el-button v-if="runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">运行图预览</el-button>
<el-button v-if="notScript && runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">运行图预览</el-button>
<el-button
v-if="!runing && !isPlan"
v-if="!runing && !isPlan && notScript"
size="small"
:disabled="viewDisabled"
type="warning"
@ -59,11 +59,15 @@ export default {
...mapGetters('runPlan', [
'stations'
]),
notScript() {
return this.$route.params.mode !== 'script';
},
isPlan() {
return this.$route.params.mode === 'plan';
},
isScript() {
return this.$route.params.mode === 'script';
// return this.$route.params.mode === 'script';
return false;
},
isDemon() {
return this.$route.params.mode === 'demon';

View File

@ -13,14 +13,12 @@
</el-button-group>
</div>
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
<tip-script-record ref="tipTaskRecord" :group="group" />
</div>
</template>
<!-- 单人仿真 -->
<script>
import SetTime from './demon/setTime';
import TipScriptRecord from './tipScriptRecord';
// import { mapGetters } from 'vuex';
import { Notification } from 'element-ui';
// import { getGoodsTryUse } from '@/api/management/goods';
@ -37,7 +35,6 @@ export default {
name: 'MenuTask',
components: {
SetTime,
TipScriptRecord
},
props: {
group: {
@ -45,7 +42,8 @@ export default {
required: true
},
offset: {
type: Number
type: Number,
required: true
}
},
data() {
@ -101,7 +99,7 @@ export default {
selectBeginTime() {
this.$refs.setTime.doShow();
},
resetBeginTime(){
resetBeginTime() {
this.isDisable = false;
},
start(model) {

View File

@ -1,18 +1,22 @@
<template>
<div v-if="isShowSystemTime" class="display-card" :style="{top: offset+'px'}">
<system-time
v-if="isShowSystemTime"
class="time"
:time="time"
:zoom="1.3"
:width="110"
:height="32"
:fine="2"
:top="2"
/>
<div v-if="isShowSystemTime" class="display-card" :style="{top: offset+'px', right: right+'px'}">
<template v-if="pause">
<span class="display-pause">暂停中</span>
</template>
<template v-else>
<system-time
class="display-time"
:time="time"
:zoom="1.3"
:width="110"
:height="32"
:fine="2"
:top="2"
/>
</template>
</div>
</template>
<script>
import { prefixIntrger } from '@/utils/date';
import SystemTime from '@/views/components/systemTime/index';
@ -26,6 +30,10 @@ export default {
offset: {
type: Number,
required: true
},
right: {
type: Number,
required: true
}
},
data() {
@ -35,7 +43,14 @@ export default {
},
computed: {
isShowSystemTime() {
return this.$route.params.mode == 'demon' || this.$route.params.mode == 'dp' || this.$route.params.mode == 'plan' || !this.$route.params.mode;
return this.$route.params.mode == 'demon' ||
this.$route.params.mode == 'dp' ||
this.$route.params.mode == 'plan' ||
this.$route.params.mode == 'script' ||
!this.$route.params.mode;
},
pause() {
return this.$store.state.scriptRecord.simulationPause;
}
},
watch: {
@ -53,34 +68,21 @@ export default {
z-index: 9;
display: inline;
position: absolute;
}
.display-pause {
font-size: 21px;
font-weight: bold;
color: yellow;
}
.display-time{
border: 2px solid white;
border-radius: 4px;
left: calc(50% - 55px);
}
}
.display-card .el-row {
line-height: 32px !important;
}
.display-score {
background-color: white;
display: -moz-inline-box;
display: inline-block;
text-align: left;
height: 32px;
line-height: 24px;
border-radius: 4px;
padding-left: 2px;
margin-left: 10px;
font-family: "Microsoft" !important;
font-size: 18px !important;
color: #fff;
}
.display-draft {
position: absolute;
float: right;
right: 40px;
bottom: 28px;
}
</style>

View File

@ -1,351 +0,0 @@
<template>
<div>
<el-form :model="modalData" ref="modalData" :rules="rules" label-width="100px" class="actionInfo" label-position="right">
<el-form-item label="主体角色" class="conditionVO" prop="actionVO.memberId">
<el-select v-model="modalData.actionVO.memberId" placeholder="请选择主体角色" :disabled="isPause&&isNotModify">
<el-option v-for="member in memberList" :key="member.id" :label="member.role+(member.name==undefined?'':member.name)" :value="member.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="动作类型" class="conditionVO" prop="actionVO.type" >
<el-select v-model="modalData.actionVO.type " placeholder="请选择动作类型" @change="changeType" :disabled="deviceTypeReadOnly||isPause">
<el-option v-for="actionType in actionTypeList" :key="actionType.label" :label="actionType.label" :value="actionType.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="目标角色" class="conditionVO" prop="actionVO.targetId" v-if="isConversitionAdd">
<el-select v-model="modalData.actionVO.targetId" placeholder="请选择目标角色" :disabled="isPause&&isNotModify">
<el-option v-for="member in memberList" :key="member.id" :label="member.role+(member.name==undefined?'':member.name)" :value="member.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="内容" class="conditionVO" prop="actionVO.reply" v-if="isConversitionAdd">
<el-input v-model="modalData.actionVO.reply" type="textarea" class="textareaStyle" rows="3" :disabled="isPause&&isNotModify"></el-input>
</el-form-item>
<el-form-item label="设备指令" class="conditionVO" prop="actionVO.deviceCommand" v-if="isCommandAdd">
<el-select v-model="modalData.actionVO.deviceCommand " placeholder="请选择设备指令" @change="changeCommand" class="inputStyle" :disabled="isPause&&isModify">
<el-option v-for="deviceCommand in deviceCommandList" :key="deviceCommand.deviceCommand" :label="deviceCommand.label" :value="deviceCommand.deviceCommand"></el-option>
</el-select>
</el-form-item>
<el-form-item label="起始站台" class="conditionVO" v-if="isJinLu" prop="param.startStation">
<el-select v-model="modalData.param.startStation " placeholder="请选择起始站台" class="inputStyle" :disabled="isPause&&isNotModify">
<el-option v-for="station in stationList" :key="station.code" :label="station.name" :value="station.code"></el-option>
</el-select>
</el-form-item>
<el-form-item label="终点站台" class="conditionVO" v-if="isJinLu" prop="param.endStation">
<el-select v-model="modalData.param.endStation " placeholder="请选择终点站台" class="inputStyle" :disabled="isPause&&isNotModify">
<el-option v-for="station in stationList" :key="station.code" :label="station.name" :value="station.code"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="addScriptActionInfo('modalData')" :disabled="isPause&&isNotModify" :loading="modifying">{{buttonName}}</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
import Vue from 'vue';
import DeviceTypeDic from '@/scripts/DeviceTypeDic';
// import CommandForm from "./commandForm";
import ConstConfig from '@/scripts/ConstConfig';
import {addScriptAction,modifyScriptAction,getAvailableDeviceCommand,getDeviceCodeByDeviceType,getScriptMemberData} from '@/api/simulation';
export default {
name: 'addAction',
props: {
group: {
type: String,
required: true
},
buttonName:{
type:String,
required: true
},
operateType:{
type:String,
required: true
}
},
// components:{
// CommandForm,
// },
watch:{
'$store.state.socket.simulationStart': function (val) {
if(val)
{
this.initData();
}
},
'$store.state.map.mapViewLoadedCount': function (val) {
Vue.prototype.$jlmap.setOptions(this.$store.state.scriptRecord.mapLocation);
this.isPause=!(this.$store.state.scriptRecord.simulationPause);
this.$parent.$parent.$parent.setIsParse(this.isPause);
},
'$store.state.scriptRecord.simulationPause': function(val){
this.isPause=!(this.$store.state.scriptRecord.simulationPause);
this.$parent.$parent.$parent.setIsParse(this.isPause);
},
},
data() {
return {
modalData:{
actionVO:{
memberId:"",
targetId:"",
reply:"",
type:"Conversation",
deviceCommand:"",
commandParamList:[]
},
param:{
startStation:"",
endStation:"",
}
},
deviceTypeReadOnly:false,
isPause:false,
isNotModify:true,
modifying:false,
isConversitionAdd:true,
isCommandAdd:false,
actionTypeList:DeviceTypeDic.ConstSelect.actionType,
isJinLu:false,
stationList:[],
memberList:[],
deviceCommandList:[],
rules:{
actionVO:{
memberId:[
{ required: true, message: '请选择主体角色', trigger: 'change' }
],
reply:[
{ required: true, message: '请输入内容', trigger: 'blur' }
],
targetId:[
{ required: true, message: '请选择目标角色', trigger: 'change' }
]
},
param:{
startStation:[
{ required: true, message: '请选择起始站台', trigger: 'change' }
],
endStation:[
{ required: true, message: '请选择终点站台', trigger: 'change' }
]
}
}
}
},
mounted(){
this.initData();
},
methods:{
initData(){
getScriptMemberData(this.group).then(resp => {
let roleTypeList=ConstConfig.ConstSelect.roleType;
let lastData=JSON.stringify(resp.data);
roleTypeList.forEach(function(element){
let rolename=element.value;
lastData=lastData.replace(new RegExp(rolename,'g'),element.label);
});
lastData=JSON.parse(lastData);
this.memberList=lastData;
getAvailableDeviceCommand().then(response=>{
this.deviceCommandList=response.data;
this.getDeviceCode();
});
}).catch(error => {})
},
getDeviceCode(){
let params = {deviceType:"StationStand"};
let group=this.group;
getDeviceCodeByDeviceType(group,params).then(response =>{
let resultData=response.data;
resultData=JSON.parse(JSON.stringify(response.data).replace(/groupNumber/g,"name"));
this.stationList=resultData;
})
},
addScriptActionInfo(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
let group=this.group;
if(this.modalData.actionVO.deviceCommand==""){
delete this.modalData.actionVO.deviceCommand;
}
if(this.modalData.actionVO.deviceCommand=="Train_Manual_Route_Blocking_Drive")
{this.modalData.actionVO.commandParamList=[this.modalData.param.startStation,this.modalData.param.endStation];}
let data=this.modalData.actionVO;
let obj=this;
this.modifying=true;
if(this.$props.operateType=="add")
{
addScriptAction(group,data).then(response=>{
this.modifying=false;
this.$message.success('添加动作成功');
this.$emit('create');
// this.resetDisabled();
this.initActionData();
}).catch(error => {
this.modifying=false;
this.$messageBox(`添加动作失败: ${error.message}`);
});
}
else
{
let actionId=this.modalData.actionVO.id;
modifyScriptAction(group,actionId,data).then(response=>{
this.modifying=false;
this.isNotModify=true;
this.$parent.$parent.$parent.setDisabled(this.isNotModify);
this.$emit('modifyButtonName');
this.$message.success('修改动作成功');
this.$emit('create');
// this.resetDisabled();
this.initActionData();
}).catch(error => {
this.modifying=false;
this.$messageBox(`修改动作失败: ${error.message}`);
});
}
}
else {
console.log('error submit!!');
return false;
}
});
},
resetDisabled(){
if(this.$refs['modalData'])
{
this.$refs['modalData'].resetFields();
// this.$nextTick(function(){
this.deviceTypeReadOnly=false;
this.modalData.actionVO.type="Conversation";
this.modalData.actionVO.memberId="";
this.modalData.actionVO.targetId="";
// this.modalData.actionVO.deviceCommand="";
this.modalData.actionVO.reply="";
this.modalData.param.startStation="";
this.isConversitionAdd=true;
this.isCommandAdd=false;
this.isJinLu=false;
this.modalData.param.endStation="";
// });
}
},
clearValidate(){
if(this.$refs['modalData'])
{
this.$refs['modalData'].clearValidate();
}
},
initActionData(){
this.resetDisabled();
},
changeType(index){
switch(index)
{
case "Conversation":{
this.isConversitionAdd=true;
this.isCommandAdd=false;
this.isJinLu=false;
this.clearValidate();
break;
}
case "Command":{
this.isConversitionAdd=false;
this.isCommandAdd=true;
//
if(this.modalData.actionVO.deviceCommand=="Train_Manual_Route_Blocking_Drive")
{
this.isJinLu=true;
}
else
{
this.isJinLu=false;
}
this.clearValidate();
break;
}
default:{
this.clearValidate();
break;
}
}
},
changeCommand(index){
this.modalData.actionVO.deviceCommand
switch(index)
{
case "Train_Manual_Route_Blocking_Drive":{
this.isJinLu=true;
this.getDeviceCode();
this.clearValidate();
break;
}
default:{
this.isJinLu=false;
this.clearValidate();
break;
}
}
},
doShow(data){
if(data)
{
this.clearValidate();
this.isNotModify=false;
this.$parent.$parent.$parent.setDisabled(this.isNotModify);
this.initData();
this.modalData.actionVO.id=data.id;
this.modalData.actionVO.memberId=data.memberId;
this.modalData.actionVO.type=data.type;
this.deviceTypeReadOnly=true;
// this.modalData.actionVO.time=data.time;
if(data.type=="Conversation")
{
this.isJinLu=false;
this.modalData.actionVO.targetId=data.targetId;
this.isConversitionAdd=true;
this.isCommandAdd=false;
this.modalData.actionVO.reply=data.reply;
}
else if(data.type=="Command")
{
this.isJinLu=false;
this.isConversitionAdd=false;
this.isCommandAdd=true;
this.modalData.actionVO.reply="";
this.modalData.actionVO.deviceCommand=data.deviceCommand;
if(this.modalData.actionVO.deviceCommand=="Train_Manual_Route_Blocking_Drive")
{
this.isJinLu=true;
this.modalData.param.startStation=data.commandParamList[0];
this.modalData.param.endStation=data.commandParamList[1];
}
}
}
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.addAction{
margin-top: 20px;
margin-left: 5px;
font-size: 15px;
}
.actionInfo{
margin-top:10px;
margin-left: 5px;
font-size: 15px;
// width:98%;
}
.inputStyle{
width:300px;
height:30px;
}
.textareaStyle{
width:300px;
}
</style>

View File

@ -1,5 +1,5 @@
<template>
<div class="jlmap-canvas" :style="{ width: width+'px', height: height+28+'px' }">
<div class="jlmap-canvas" :style="{ width: width+'px', height: height+'px' }">
<div :id="canvasId" style="background: #000;" />
<progress-bar ref="progressBar" />
<zoom-box v-if="!isScreen" :scale-rate="dataZoom.scaleRate" @setShrink="setShrink" @setMagnify="setMagnify" />
@ -60,7 +60,7 @@ export default {
return canvasId;
},
show() {
if (this.mode === TrainingMode.EDIT || this.mode === TrainingMode.MAP_EDIT) {
if (this.mode == TrainingMode.EDIT || this.mode == TrainingMode.MAP_EDIT) {
return true;
}
return false;
@ -116,6 +116,7 @@ export default {
EventBus.$off('refresh');
EventBus.$off('viewLoading');
EventBus.$off('viewProgressAt');
this.$store.dispatch('map/mapClear');
if (this.$jlmap) {
this.$jlmap.dispose();
}

View File

@ -19,6 +19,8 @@
<div id="jlsimulation" class="jlmap3ddraw">
<canvas id="canvastexture" />
</div>
<div id="jlcctv" class="jlmap3cctv">
</div>
<Drive-Mmi v-if="mmishow" ref="mmiui" />
@ -124,6 +126,13 @@ export default {
this.stoptimes = newVal;
}
}
},
'jlmap3d.drivecount': {
handler: function (newVal, oldVal) {
if (newVal != oldVal) {
this.$refs.mmiui.updatedrivedata(this.jlmap3d.drivedata);
}
}
}
},
beforeDestroy() {
@ -287,6 +296,17 @@ export default {
z-index: -1;
}
.jlmap3cctv{
float: left;
left: 0;
top:0;
//left:20%;
width: 20%;
height: 20%;
position:absolute;
z-index: -1;
}
#canvastexture {
position: absolute;
float: left;

View File

@ -112,21 +112,37 @@ export default {
nowatpspeed:0,
nowatospeed:0,
mmimodel:null,
nstate:"tiaoting",
nimage:null,
dstate:"info",
dimage:null,
m1state:"rm",
m1image:null,
m2state:"cbtc",
m2image:null,
m3state:"zhefan",
m3image:null,
m4state:"out",
m4image:null,
m5state:"state15",
m5image:null,
m6state:"fache",
m6image:null,
m7state:"aoac",
m7image:null,
m8state:"jinjizhidong",
m8image:null,
m9state:"ato",
m9image:null,
m10state:"jinduan",
m10image:null,
c1state:"qianyin",
c1image:null,
c2state:"rm",
c2image:null,
c3state:"normal",
c3image:null,
c5state:"normal",
c5image:null,
images:null,
}
@ -204,6 +220,75 @@ export default {
this.mmimodel.updateato(atospeed);
}
},
updatedrivedata(drivedata){
console.log(drivedata);
if(drivedata == "breaker"){
}
if(drivedata == "carwash"){
}
if(drivedata == "aircom"){
}
if(drivedata == "atb"){
}
if(drivedata == "bm"){
}
if(drivedata == "rm"){
if(this.m1state == "start"){
this.m1state = 'rm';
this.m1image = this.images.m1[this.m1state];
}else if(this.m1state == "rm"){
this.m1state = 'am';
this.m1image = this.images.m1[this.m1state];
}else if(this.m1state == "am"){
this.m1state = 'cm';
this.m1image = this.images.m1[this.m1state];
}else if(this.m1state == "cm"){
this.m1state = 'start';
this.m1image = this.images.m1[this.m1state];
}
}
if(drivedata == "cbtc"){
if(this.m2state == "start"){
this.m2state = 'il';
this.m2image = this.images.m2[this.m2state];
}else if(this.m2state == "il"){
this.m2state = 'itc';
this.m2image = this.images.m2[this.m2state];
}else if(this.m2state == "itc"){
this.m2state = 'cbtc';
this.m2image = this.images.m2[this.m2state];
}else if(this.m2state == "cbtc"){
this.m2state = 'start';
this.m2image = this.images.m2[this.m2state];
}
}
//doormode
if(drivedata == "AA"){
this.m7state = 'aoac';
this.m7image = this.images.m7[this.m7state];
}
if(drivedata == "AM"){
this.m7state = 'aomc';
this.m7image = this.images.m7[this.m7state];
}
if(drivedata == "MM"){
this.m7state = 'momc';
this.m7image = this.images.m7[this.m7state];
}
if(drivedata == "elflute"){
}
if(drivedata == "relieve"){
}
},
updatelen(len) {
//this.malen = 150+"px";
if(len>=750){

View File

@ -297,7 +297,7 @@ export default {
},
//
updateTrainList() {
const list = this.$store.getters['training/viewTrainList'];
const list = this.$store.getters['training/viewTrainList']();
if (this.treeData[4].children.length != list.length) {
this.treeData[4].children = [];
if (list && list.length) {

View File

@ -89,7 +89,10 @@ export default {
]),
...mapGetters('config', [
'canvasId'
])
]),
skinCode() {
return this.$route.query.skinCode;
}
},
watch: {
'$store.state.config.menuBarLoadedCount': function (val) {
@ -123,7 +126,9 @@ export default {
}
},
$route() {
this.initLoadData();
this.$nextTick(() => {
this.initLoadData();
});
}
},
async created() {
@ -268,8 +273,7 @@ export default {
this.$store.dispatch('training/end', TrainingMode.NORMAL);
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); //
const skinCode = this.$route.query.skinCode;
if (skinCode) {
if (this.skinCode) {
// 01 02 ''
const resp = await this.getUserRole();
if (resp && resp.code == 200) {
@ -285,7 +289,7 @@ export default {
case 'Repair': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'Repair'); break;
}
}
await this.getTrainDetail(skinCode);
await this.getTrainDetail(this.skinCode);
} else {
this.endViewLoading();
}
@ -318,7 +322,7 @@ export default {
hidepanel() {
this.panelShow = false;
this.drivingShow = true;
this.$refs.Jl3dDrive.show(this.$route.query.skinCode);
this.$refs.Jl3dDrive.show(this.skinCode);
},
messageInfo(message, type) {

View File

@ -114,7 +114,7 @@ export default {
},
handleDelete(index, row) {
this.$confirm(this.$t('global.dleeteTipContext'), this.$t('global.tips'), {
this.$confirm(this.$t('global.wellDelType'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning'

View File

@ -32,7 +32,7 @@ export default {
},
mobile: {
type: 'text',
label: this.$t('system.mobile')
label: this.$t('global.mobile')
},
skinCode: {
type: 'select',
@ -68,7 +68,7 @@ export default {
prop: 'creator.name'
},
{
title: this.$t('system.mobile'),
title: this.$t('global.mobile'),
prop: 'creator.mobile'
},
{
@ -170,7 +170,7 @@ export default {
return sessionId;
},
handleDelete(index, row) {
this.$confirm(this.$t('system.delUserSimulationIsContinue'), this.$t('global.tips'), {
this.$confirm(this.$t('system.wellDelUserSimulation'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning'

View File

@ -55,11 +55,11 @@ export default {
prop: 'nickname'
},
{
title: this.$t('system.mobile'),
title: this.$t('global.mobile'),
prop: 'mobile'
},
{
title: this.$t('system.email'),
title: this.$t('system.global.email'),
prop: 'email'
},
{
@ -100,7 +100,7 @@ export default {
//
handleUserDelete(index, row) {
this.$confirm(this.$t('system.delTypeIsContinue'), this.$t('global.tips'), {
this.$confirm(this.$t('system.wellDelType'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning'

View File

@ -75,7 +75,7 @@ export default {
prop: 'userName'
},
{
title: this.$t('system.mobile'),
title: this.$t('global.mobile'),
prop: 'userMobile'
},
{
@ -115,7 +115,7 @@ export default {
//
handleDelete(index, row) {
this.$confirm(this.$t('system.delExamResultIsContinue'), this.$t('global.tips'), {
this.$confirm(this.$t('system.wellDelExamResult'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning'

View File

@ -53,7 +53,7 @@ export default {
prop: 'userName'
},
{
title: this.$t('system.mobile'),
title: this.$t('global.mobile'),
prop: 'userMobile'
},
{
@ -135,7 +135,7 @@ export default {
//
handleDelete(index, row) {
this.$confirm(this.$t('system.delUserSimulationIsContinue'), this.$t('global.tips'), {
this.$confirm(this.$t('system.wellDelUserSimulation'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning'

View File

@ -48,7 +48,7 @@ export default {
prop: 'userName'
},
{
title: this.$t('system.mobile'),
title: this.$t('global.mobile'),
prop: 'userMobile'
},
{
@ -121,7 +121,7 @@ export default {
//
handleDelete(index, row) {
this.$confirm(this.$t('system.delExamResultIsContinue'), this.$t('global.tips'), {
this.$confirm(this.$t('system.wellDelExamResult'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning'

View File

@ -7,8 +7,8 @@
<i class="el-icon-close" />
</div>
</div>
<el-row type="flex" justify="center">
<el-form label-width="100px" class="demo-ruleForm">
<el-row type="flex" justify="center" class="content_box">
<el-form label-width="80px" class="demo-ruleForm">
<el-form-item :label="$t('map.viewShows')">
<el-checkbox-group v-model="viewSelect" :min="1" @change="handleSelectView">
<el-checkbox :label="ViewMode.LOGIC">{{ $t('map.logicalView') }}</el-checkbox>
@ -28,6 +28,12 @@
{{ view.name }}</el-checkbox>
</el-checkbox-group>
</el-row>
<el-row v-if=" viewSelect.length == 2" class="physical-view" type="flex" justify="center" style="width: 100%;">
<el-checkbox-group v-model="hybridLevelsSelect" @change="handleSelectHybridView">
<el-checkbox v-for="view in HybridViewTypeList" :key="view.code" :label="view.code">
{{ view.name }}</el-checkbox>
</el-checkbox-group>
</el-row>
</el-form-item>
</el-form>
</el-row>
@ -53,8 +59,15 @@ export default {
{ code: 'Signal', name: this.$t('map.signal') },
{ code: 'Switch', name: this.$t('map.switch') }
],
HybridViewTypeList: [],
defaultLogicalSelect: [],
defaultPhysicalSelect: [],
defaultHybridSelect: [],
logicalLevelsSelect: [],
physicalLevelsSelect: []
physicalLevelsSelect: [],
hybridLevelsSelect: [] //
};
},
watch: {
@ -75,22 +88,40 @@ export default {
initPage() {
this.$Dictionary.logicalViewType().then(list => {
this.LogicalViewTypeList = list;
list.forEach(v => {
this.HybridViewTypeList.push(v);
this.hybridLevelsSelect.push(v.code);
this.defaultHybridSelect.push(v.code);
});
this.LogicalViewTypeList.forEach(elem => {
this.logicalLevelsSelect.push(elem.code);
this.defaultLogicalSelect.push(elem.code);
});
});
this.$Dictionary.physicalViewType().then(list => {
this.PhysicalViewTypeList = list;
list.forEach(v => {
this.HybridViewTypeList.push(v);
this.hybridLevelsSelect.push(v.code);
this.defaultHybridSelect.push(v.code);
});
this.PhysicalViewTypeList.forEach(elem => {
this.physicalLevelsSelect.push(elem.code);
this.defaultPhysicalSelect.push(elem.code);
});
});
},
handleSelectView(value) {
if (value.length == 2) {
this.$emit('handleSelectView', '03');
this.hybridLevelsSelect = this.copyList(this.defaultHybridSelect);
} else {
this.$emit('handleSelectView', value);
if (this.viewSelect[0] == this.ViewMode.LOGIC) {
this.logicalLevelsSelect = this.copyList(this.defaultLogicalSelect);
} else {
this.physicalLevelsSelect = this.copyList(this.defaultPhysicalSelect);
}
}
},
handleSelectLogicalView(handle) {
@ -98,6 +129,12 @@ export default {
},
handleSelectPhysicalView(handle) {
this.$emit('handleSelectPhysicalView', handle);
},
handleSelectHybridView(handle) {
this.$emit('handleSelectHybridView', handle);
},
copyList(list) {
return JSON.parse(JSON.stringify(list));
}
}
};
@ -126,11 +163,11 @@ export default {
right: 24px;
top: 43px;
z-index: 10;
padding: 15px;
.title{
margin-bottom: 8px;
overflow: hidden;
border-bottom: 1px solid #ccc;
padding: 9px;
.fl-title{
float: left;
}
@ -140,17 +177,23 @@ export default {
}
}
.content_box{
padding: 15px;
padding-top: 4px;
}
/deep/{
.el-dialog__body{
padding: 0 8px 8px 21px;
}
.el-checkbox{
margin-right: 14px;
margin-right: 10px;
width: 75px;
}
.el-form-item{
margin-bottom: 2px;
margin-bottom: -4px;
}
}
}

View File

@ -28,7 +28,7 @@
@click="showMap"
>{{ $t('map.viewLayer') }}</el-button>
</div>
<el-tabs v-model="enabledTab" type="card" @tab-click="changePane">
<el-tabs v-model="enabledTab" type="card" class="map_card" @tab-click="changePane">
<el-tab-pane label="进路" name="route">
<route-operate
ref="routeOperate"
@ -228,6 +228,12 @@ export default {
margin-right: 30px;
}
}
/deep/ {
.map_card .el-tabs__header .el-tabs__item.is-active {
border-bottom-color: #f5f7fa;
background: #f5f7fa;
}
}
/deep/ .map-draft-group {
float: right;

View File

@ -97,7 +97,7 @@ export default {
prop: 'stationCode'
},
{
title: this.$t('map.routeType'),
title: this.$t('map.accessType'),
prop: 'natureType'
},
@ -129,7 +129,7 @@ export default {
},
{
type: 'button',
title: this.$t('map.routeSideTurnoutData'),
title: this.$t('map.accessSideTurnoutData'),
buttons: [
{
name: this.$t('map.preview'),
@ -165,7 +165,7 @@ export default {
{
type: 'button',
title: this.$t('map.routePhysical'),
title: this.$t('map.accessPhysical'),
buttons: [
{
name: this.$t('map.preview'),

View File

@ -27,7 +27,7 @@
<span>s</span>
</el-form-item>
<el-form-item :label="$t('map.routeTypeColon')" prop="natureType">
<el-form-item :label="$t('map.accessType')" prop="natureType">
<el-select v-model="addModel.natureType" :filterable="true">
<el-option
v-for="item in RouteNatureTypeList"
@ -457,10 +457,10 @@ export default {
{ required: true, message: this.$t('rules.proximitySection'), trigger: 'change' }
],
natureType: [
{ required: true, message: this.$t('rules.routePropertyType'), trigger: 'change' }
{ required: true, message: this.$t('rules.accessPropertyType'), trigger: 'change' }
],
autoType: [
{ required: true, message: this.$t('rules.autoRouteType'), trigger: 'change' }
{ required: true, message: this.$t('rules.autoAccessType'), trigger: 'change' }
],
routeSectionList: [
{ required: true, message: '请选择进路物理区段数据', trigger: 'change' }

View File

@ -92,6 +92,10 @@ export default {
columnValue: (row) => { return this.$ConstSelect.translate(row.directionCode, 'DirectionCodeList'); },
tagType: (row) => { if (row.directionCode === '0') { return 'primary'; } else { return 'success'; } }
},
{
title: this.$t('map.destination'),
prop: 'destinationCode'
},
{
title: this.$t('map.remarks'),
prop: 'remarks'

View File

@ -62,6 +62,9 @@
@click="hover('endSectionCode')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item :label="$t('map.destinationCode')" prop="destinationCode">
<el-input v-model="addModel.destinationCode" />
</el-form-item>
<el-form-item :label="$t('map.routingDirection')" prop="directionCode">
<el-select v-model="addModel.directionCode" clearable :filterable="true" :placeholder="$t('map.pleaseSelect')">
<el-option
@ -208,6 +211,9 @@ export default {
name: [
{ required: true, message: this.$t('map.routingName'), trigger: 'change' }
],
destinationCode: [
{ required: true, message: this.$t('map.destinationCode'), trigger: 'change' }
],
startStationCode: [
{ required: true, message: this.$t('map.startStationCode'), trigger: 'change' }
],
@ -289,6 +295,7 @@ export default {
this.addModel.startSectionCode = selected.code;
} else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'endSectionCode'.toUpperCase()) {
this.addModel.endSectionCode = selected.code;
this.addModel.destinationCode = selected.destinationCode || '';
} else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() == 'routingSection'.toUpperCase()) {
this.sectionCode = selected.code;
} else if (selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field.toUpperCase() == 'routingStation'.toUpperCase()) {

View File

@ -4,15 +4,14 @@
<div class="map-view">
<jlmap-visual ref="jlmapVisual" @onSelect="clickEvent" @onMenu="onContextmenu" />
</div>
<div v-loading="loading" class="map-draft">
<div v-if="viewDraft==='draft'">
<div class="map-draft">
<div v-show="viewDraft==='draft'">
<map-operate
ref="mapOperate"
:card-height="cardHeight"
:map-info="mapInfo"
:selected="selected"
:map-saveing="mapSaveing"
@hook:mounted="loading = false"
@handleSelectLogicalView="handleSelectLogicalView"
@handleSelectPhysicalView="handleSelectPhysicalView"
@saveMapEvent="saveMapEvent"
@ -24,14 +23,13 @@
@showMap="showMap"
/>
</div>
<div v-if="viewDraft != 'draft'">
<div v-show="viewDraft != 'draft'">
<data-relation
ref="dataRelation"
:card-height="cardHeight"
:map-info="mapInfo"
:selected="selected"
@selectView="selectViewDraft"
@hook:mounted="loading = false"
@showMap="showMap"
/>
</div>
@ -40,6 +38,7 @@
@handleSelectView="handleSelectView"
@handleSelectLogicalView="handleSelectLogicalView"
@handleSelectPhysicalView="handleSelectPhysicalView"
@handleSelectHybridView="handleSelectHybridView"
/>
</div>
</div>
@ -57,7 +56,6 @@ import { EventBus } from '@/scripts/event-bus';
import ConfigMap from './configMap';
import DataRelation from './dataRelation/index';
import { setTimeout } from 'timers';
export default {
name: 'MapView',
@ -80,8 +78,7 @@ export default {
autoSaveTask: null,
selected: null,
mapInfo: { name: this.$t('map.pleaseSelectMap') },
timeDemon: null,
loading: false
timeDemon: null
};
},
watch: {
@ -89,7 +86,9 @@ export default {
this.initAutoSaveTask();
},
$route() {
this.loadInitPage();
this.$nextTick(() => {
this.loadInitPage();
});
}
},
mounted() {
@ -123,10 +122,7 @@ export default {
this.$refs.configMap.doShow();
},
selectViewDraft(data) {
this.loading = true;
setTimeout(() => {
this.viewDraft = data;
}, 300);
this.viewDraft = data;
},
loadInitPage() {
this.$store.dispatch('training/changeMode', { mode: TrainingMode.MAP_EDIT });
@ -178,6 +174,11 @@ export default {
this.$refs.jlmapVisual.setLevelVisible(handle);
}
},
handleSelectHybridView(handle) {
if (this.$refs && this.$refs.jlmapVisual) {
this.$refs.jlmapVisual.setLevelVisible(handle);
}
},
clickEvent(em) {
var device = this.getDeviceByEm(em);
this.onSelect(device);

View File

@ -1,22 +1,26 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="form" :form="dataForm" :form-model="editModel" :rules="rules" />
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-data ref="make" :form="makeForm" :form-model="addModel" :rules="createRules" />
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -109,6 +113,10 @@ export default {
const form = {
labelWidth: '150px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
@ -169,8 +177,10 @@ export default {
this.deviceSelect(val);
},
$route() {
this.$refs.form.resetFields();
this.activeName = 'first';
this.$nextTick(() => {
this.$refs.form.resetFields();
this.activeName = 'first';
});
}
},
mounted() {
@ -269,7 +279,11 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
.coordinate {
overflow: hidden;

View File

@ -1,7 +1,7 @@
<template>
<el-form ref="form" :label-width="form.labelWidth" size="mini" :rules="rules" :model="formModel">
<el-form ref="form" :label-width="form.labelWidth" size="mini" :rules="rules" :model="formModel" class="form_data">
<template v-for="(items, index) in form.items">
<div v-if="items.item.length" :key="index" class="card">
<div v-if="items.item.length" :key="index" class="card" :class="{'card_code' : !items.name}">
<div class="card_title">{{ items.name }}</div>
<template v-for="item in items.item">
<template v-if="checkFieldType(item, 'select')">
@ -305,14 +305,16 @@ export default {
width: 110px;
}
.el-form{
.form_data{
padding: 10px;
padding-bottom: 0;
padding-top: 6px;
padding-bottom: 10px;
}
.card{
border: 1px solid #ccc;
padding: 10px;
padding-top: 18px;
box-sizing: border-box;
position: relative;
margin-bottom: 15px;
@ -329,6 +331,10 @@ export default {
padding: 0px 5px;
}
}
.card_code{
border: 0px solid #ccc;
padding: 0px;
}
/deep/ {
.input-with-select .el-input-group__prepend {
background-color: #fff;

View File

@ -1,14 +1,16 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
<el-button-group class="map-draft-group">
<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>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
@ -35,9 +37,11 @@
</el-form-item>
</el-form>
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -135,6 +139,10 @@ export default {
const form = {
labelWidth: '120px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
@ -162,8 +170,10 @@ export default {
this.deviceSelect(val);
},
$route() {
this.$refs.form.resetFields();
this.activeName = 'first';
this.$nextTick(() => {
this.$refs.form.resetFields();
this.activeName = 'first';
});
}
},
mounted() {
@ -267,4 +277,9 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
</style>

View File

@ -1,14 +1,16 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="form" :form="form" :form-model="editModel" :rules="editRules" />
</el-scrollbar>
<el-button-group class="map-draft-group">
<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>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
@ -25,9 +27,11 @@
</el-form-item>
</el-form>
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -117,6 +121,10 @@ export default {
const form = {
labelWidth: '120px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
@ -144,8 +152,10 @@ export default {
this.deviceSelect(val);
},
$route() {
this.$refs.form.resetFields();
this.activeName = 'first';
this.$nextTick(() => {
this.$refs.form.resetFields();
this.activeName = 'first';
});
}
},
mounted() {
@ -248,4 +258,9 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
</style>

View File

@ -329,7 +329,7 @@ export default {
},
resizeCardHeight() {
var padding = 0;
this.cardHeights = this.cardHeight - padding - 90;
this.cardHeights = this.cardHeight - padding - 74;
},
handleSelectControlPage(device) {
const type = device._type;
@ -394,7 +394,7 @@ export default {
/deep/ .map-draft-group {
float: right;
margin: 10px 5px;
margin: 6px 5px;
}
/deep/ .view-control {
@ -405,6 +405,19 @@ export default {
.mapEdit .el-tabs__nav-wrap.is-scrollable {
padding: 0 20px;
}
.mapEdit .el-tabs__header .el-tabs__item.is-active {
border-bottom-color: #f5f7fa;
background: #f5f7fa;
}
.mapEdit .el-tabs__active-bar{
background: transparent;
}
.card .el-tabs__nav .el-tabs__item.is-active {
border-bottom: 2px solid #E4E7ED;
background: #409eff;
color: #fff;
}
.mapEdit .el-tabs__nav-prev {
width: 20px;

View File

@ -1,14 +1,16 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
<el-button-group class="map-draft-group">
<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>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
@ -37,9 +39,11 @@
</div>
</el-form>
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -127,6 +131,10 @@ export default {
const form = {
labelWidth: '150px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
@ -153,8 +161,10 @@ export default {
this.deviceSelect(val);
},
$route() {
this.$refs.form.resetFields();
this.activeName = 'first';
this.$nextTick(() => {
this.$refs.form.resetFields();
this.activeName = 'first';
});
}
},
mounted() {
@ -238,7 +248,11 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
.coordinate {
overflow: hidden;

View File

@ -1,22 +1,26 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
<el-button-group class="map-draft-group">
<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>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-data ref="make" :form="formMake" :form-model="addModel" :rules="createRules" />
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -93,6 +97,10 @@ export default {
const form = {
labelWidth: '150px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
@ -144,8 +152,10 @@ export default {
this.deviceSelect(val);
},
$route() {
this.$refs.form.resetFields();
this.activeName = 'first';
this.$nextTick(() => {
this.$refs.form.resetFields();
this.activeName = 'first';
});
}
},
mounted() {
@ -229,7 +239,11 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
.coordinate {
overflow: hidden;

View File

@ -1,13 +1,13 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
@ -69,7 +69,7 @@
</el-form>
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</el-tab-pane>
</el-tabs>
@ -150,6 +150,10 @@ export default {
const form = {
labelWidth: '120px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
@ -177,8 +181,10 @@ export default {
this.deviceSelect(val);
},
$route() {
this.$refs.form.resetFields();
this.activeName = 'first';
this.$nextTick(() => {
this.$refs.form.resetFields();
this.activeName = 'first';
});
}
},
mounted() {
@ -274,7 +280,11 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
.view-control {
overflow-y: auto;
}

View File

@ -1,14 +1,16 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<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">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
@ -36,11 +38,13 @@
</template>
</el-form>
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button v-if="isNew" type="primary" @click="isNewCreate">{{ $t('map.create') }}</el-button>
<el-button v-if="isFd" type="primary" @click="isFdCreate">{{ $t('map.create') }}</el-button>
<el-button v-if="isSd" type="primary" @click="isSdCreate">{{ $t('map.create') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button v-if="isNew" type="primary" size="small" @click="isNewCreate">{{ $t('map.create') }}</el-button>
<el-button v-if="isFd" type="primary" size="small" @click="isFdCreate">{{ $t('map.create') }}</el-button>
<el-button v-if="isSd" type="primary" size="small" @click="isSdCreate">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -157,6 +161,10 @@ export default {
const form = {
labelWidth: '130px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
@ -568,6 +576,12 @@ export default {
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
.coordinate {
overflow: hidden;

View File

@ -1,14 +1,16 @@
<template>
<div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tabs v-model="activeName" class="card" @tab-click="handleClick">
<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">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.create')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
@ -25,9 +27,11 @@
</el-form-item>
</el-form>
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.splitMerge')" name="three">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight+60+'px' }">
@ -43,6 +47,7 @@
</el-select>
<el-button
:type="field === 'splitSection' ? 'danger' : 'primary'"
size="small"
@click="hover('splitSection')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
@ -67,6 +72,7 @@
</el-select>
<el-button
:type="field === 'leftSection' ? 'danger' : 'primary'"
size="small"
@click="hover('leftSection')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
@ -81,6 +87,7 @@
</el-select>
<el-button
:type="field === 'rightSection' ? 'danger' : 'primary'"
size="small"
@click="hover('rightSection')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
@ -113,9 +120,11 @@
</el-table-column>
</el-table>
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="editSectionNum">{{ $t('map.updateObj') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="editSectionNum">{{ $t('map.updateObj') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.switchSection')" name="five">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight+60+'px' }">
@ -145,9 +154,11 @@
</el-form-item>
</el-form>
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="editSectionTrain">{{ $t('map.updateObj') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="editSectionTrain">{{ $t('map.updateObj') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -284,13 +295,17 @@ export default {
const form = {
labelWidth: '160px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
{ prop: 'code', label: this.$t('map.blockCoding'), type: 'select', mode: false, optionLabel: 'name&&code', optionValue: 'code', options: this.sectionList, change: true, deviceChange: this.deviceChange },
{ prop: 'name', label: this.$t('map.sectionNameColon'), type: 'input' },
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: this.isStationCodeDisabled, options: this.stationList },
{ prop: 'parentCode', label: this.$t('map.associatedSection'), type: 'select', mode: true, optionLabel: 'code&&name', optionValue: 'code', disabled: true, options: this.sectionList, isHidden: !this.isParentCode },
{ prop: 'code', label: this.$t('map.blockCoding'), type: 'select', mode: false, optionLabel: 'code&&name', optionValue: 'code', options: this.sectionList, change: true, deviceChange: this.deviceChange },
{ 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' }
@ -1360,7 +1375,11 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
.el-transfer {
text-align: left;
}

View File

@ -1,13 +1,15 @@
<template>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<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">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
@ -54,9 +56,11 @@
</el-form-item>
</el-form>
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</template>
@ -197,12 +201,16 @@ export default {
const form = {
labelWidth: '150px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
{ 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: 'code', label: this.$t('map.signalCodeColon'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.signalList, change: true, deviceChange: this.deviceChange },
{ prop: 'name', label: this.$t('map.signalNameColon'), type: 'input' },
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
{ 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 },
@ -269,7 +277,7 @@ export default {
{ required: true, message: this.$t('rules.signalGuidePositionX'), trigger: 'blur' }
],
'guidePosition.y': [
{ required: true, message: this.$t('rules,signalGuidePositionY'), trigger: 'blur' }
{ required: true, message: this.$t('rules.signalGuidePositionY'), trigger: 'blur' }
]
};
//
@ -286,8 +294,10 @@ export default {
this.deviceSelect(val);
},
$route() {
this.$refs.dataform.resetFields();
this.activeName = 'first';
this.$nextTick(() => {
this.$refs.dataform.resetFields();
this.activeName = 'first';
});
}
},
mounted() {
@ -506,4 +516,9 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
</style>

View File

@ -1,14 +1,16 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<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">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
@ -25,9 +27,11 @@
</el-form-item>
</el-form>
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -101,12 +105,16 @@ export default {
const form = {
labelWidth: '150px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
{ 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: 'code', label: this.$t('map.stationCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, change: true, deviceChange: this.deviceChange },
{ prop: 'name', label: this.$t('map.stationName'), type: 'input' },
{ prop: 'concentrateStationCode', label: this.$t('map.concentrateStationCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.stationList },
{ 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' },
@ -173,8 +181,10 @@ export default {
this.deviceSelect(val);
},
$route() {
this.$refs.dataform.resetFields();
this.activeName = 'first';
this.$nextTick(() => {
this.$refs.dataform.resetFields();
this.activeName = 'first';
});
}
},
methods: {
@ -315,4 +325,9 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
</style>

View File

@ -1,14 +1,16 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<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">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
@ -25,9 +27,11 @@
</el-form-item>
</el-form>
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -92,12 +96,16 @@ export default {
const form = {
labelWidth: '160px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
{ 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: 'name', label: this.$t('map.stationControlName'), type: 'input' },
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
{ 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' },
@ -157,8 +165,10 @@ export default {
this.deviceSelect(val);
},
$route() {
this.$refs.dataform.resetFields();
this.activeName = 'first';
this.$nextTick(() => {
this.$refs.dataform.resetFields();
this.activeName = 'first';
});
}
},
mounted() {
@ -270,4 +280,9 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
</style>

View File

@ -1,14 +1,16 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<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">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
@ -48,9 +50,11 @@
</el-form-item>
</el-form>
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -122,12 +126,16 @@ export default {
const form = {
labelWidth: '130px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
{ prop: 'deviceStationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.stationList },
{ prop: 'code', label: this.$t('map.relStandCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.stationStandList, change: true, deviceChange: this.deviceChange },
{ prop: 'code', label: this.$t('map.relStandCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationStandList, change: true, deviceChange: this.deviceChange },
{ prop: 'name', label: this.$t('map.stationstandNameColon'), type: 'input', disabled: true },
{ prop: 'deviceStationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.stationList },
{ prop: 'direction', label: this.$t('map.stationstandTopBottom'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.RunDirectionTypeList },
{ prop: 'visible', label: this.$t('map.stationVisible'), type: 'checkbox' },
{ prop: 'nameShow', label: this.$t('map.stationstandShowName'), type: 'checkbox' },
@ -176,10 +184,10 @@ export default {
{ required: true, message: this.$t('rules.stationstandHeight'), trigger: 'change' }
],
'position.x': [
{ required: true, message: this.$t('rule.stationstandPositionX'), trigger: 'change' }
{ required: true, message: this.$t('rules.trainPositionX'), trigger: 'change' }
],
'position.y': [
{ required: true, message: this.$t('rule.stationstandPositionY'), trigger: 'change' }
{ required: true, message: this.$t('rules.trainPositionY'), trigger: 'change' }
]
};
//
@ -209,8 +217,10 @@ export default {
this.deviceSelect(val);
},
$route() {
this.$refs.dataform.resetFields();
this.activeName = 'first';
this.$nextTick(() => {
this.$refs.dataform.resetFields();
this.activeName = 'first';
});
}
},
mounted() {
@ -332,4 +342,9 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
</style>

View File

@ -1,14 +1,16 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<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">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
@ -25,9 +27,11 @@
</el-form-item>
</el-form>
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -97,12 +101,16 @@ export default {
const form = {
labelWidth: '170px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
{ prop: 'code', label: this.$t('map.switchCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.switchList, change: true, deviceChange: this.deviceChange },
{ prop: 'name', label: this.$t('map.switchName'), type: 'input' },
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
{ prop: 'nameShow', label: this.$t('map.switchShowName'), type: 'checkbox' },
{ prop: 'namePoint.x', firstLevel: 'namePoint', secondLevel: 'x', label: this.$t('map.switchPositionX'), type: 'number', placeholder: 'px' },
{ prop: 'namePoint.y', firstLevel: 'namePoint', secondLevel: 'y', label: this.$t('map.switchPositionY'), type: 'number', placeholder: 'px' },
@ -172,8 +180,10 @@ export default {
this.deviceSelect(val);
},
$route() {
this.$refs.dataform.resetFields();
this.activeName = 'first';
this.$nextTick(() => {
this.$refs.dataform.resetFields();
this.activeName = 'first';
});
}
},
mounted() {
@ -410,7 +420,11 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
.el-transfer {
text-align: left;
}

View File

@ -1,14 +1,16 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
<el-button-group class="map-draft-group">
<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>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
@ -29,9 +31,11 @@
</el-form-item>
</el-form>
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -116,6 +120,10 @@ export default {
const form = {
labelWidth: '130px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
@ -142,8 +150,10 @@ export default {
this.deviceSelect(val);
},
$route() {
this.$refs.form.resetFields();
this.activeName = 'first';
this.$nextTick(() => {
this.$refs.form.resetFields();
this.activeName = 'first';
});
}
},
methods: {
@ -232,7 +242,11 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
/deep/ {
.el-select .el-input {
width: 130px;

View File

@ -1,297 +0,0 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<el-form ref="form" :model="editModel" label-width="110px" size="mini" :rules="rules">
<el-form-item :label="$t('map.trainCode')" prop="code">
<el-select v-model="editModel.code" filterable @change="deviceChange">
<el-option
v-for="item in trainList"
:key="item.code"
:label="item.code"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('map.groupNumber')" prop="groupNumber">
<el-input v-model="editModel.groupNumber" />
</el-form-item>
<el-form-item :label="$t('map.modelCode')" prop="modelCode">
<el-select v-model="editModel.modelCode" filterable>
<el-option
v-for="item in trainModelList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
<el-button-group>
<el-button type="primary" size="small" @click="newTrainMode">{{ $t('map.add') }}</el-button>
<el-button type="primary" size="small" @click="uptTrainMode(editModel.modelCode)">{{ $t('map.updata') }}
</el-button>
<el-button type="primary" size="small" @click="delTrainMode(editModel.modelCode)">{{ $t('map.deleteObj') }}
</el-button>
</el-button-group>
</el-form-item>
<el-form-item :label="$t('map.pointX')" prop="position.x">
<el-input-number v-model="editModel.position.x" />
</el-form-item>
<el-form-item :label="$t('map.pointY')" prop="position.y">
<el-input-number v-model="editModel.position.y" />
</el-form-item>
</el-form>
</el-scrollbar>
<el-button-group class="map-draft-group">
<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="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<el-form ref="make" label-width="100px" :rules="createRules" :model="addModel" size="mini">
<el-form-item :label="$t('map.groupNumber')" prop="groupNumber">
<el-input v-model="addModel.groupNumber" />
</el-form-item>
<el-form-item :label="$t('map.modelCode')" prop="modelCode">
<el-select v-model="addModel.modelCode" filterable>
<el-option
v-for="item in trainModelList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
<el-button-group>
<el-button type="primary" size="small" @click="newTrainMode">{{ $t('map.add') }}</el-button>
<el-button type="primary" size="small" @click="uptTrainMode(addModel.modelCode)">{{ $t('map.updata') }}
</el-button>
<el-button type="primary" size="small" @click="delTrainMode(addModel.modelCode)">{{ $t('map.deleteObj') }}
</el-button>
</el-button-group>
</el-form-item>
<el-form-item :label="$t('map.pointX')" prop="position.x">
<el-input-number v-model="addModel.position.x" />
</el-form-item>
<el-form-item :label="$t('map.pointY')" prop="position.y">
<el-input-number v-model="addModel.position.y" />
</el-form-item>
</el-form>
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</el-tab-pane>
</el-tabs>
<train-model ref="trainMode" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { getUID } from '@/jmap/utils/Uid';
import TrainModel from './trainmodel';
export default {
name: 'TrainDraft',
components: {
TrainModel
},
props: {
selected: {
type: Object,
default: function () {
return null;
}
},
cardHeight: {
type: [String, Number],
required: true
}
},
data() {
return {
activeName: 'first',
mapData: null,
editModel: {
code: '',
groupNumber: '',
modelCode: '',
position: {
x: 0,
y: 0
}
},
addModel: {
modelCode: '',
groupNumber: '',
position: {
x: 0,
y: 0
}
},
rules: {
code: [
{ required: true, message: this.$t('rules.pleaseReSelectDevice'), trigger: 'change' }
],
groupNumber: [
{ required: true, message: this.$t('rules.pleaseEnterGroupNumber'), trigger: 'blur' }
],
modelCode: [
{ required: true, message: this.$t('rules.selectTrainType'), trigger: 'change' }
],
'position.x': [
{ required: true, message: this.$t('rules.trainPositionX'), trigger: 'blur' }
],
'position.y': [
{ required: true, message: this.$t('rules.trainPositionY'), trigger: 'blur' }
]
}
};
},
computed: {
...mapGetters('map', [
'sectionList',
'trainList',
'trainModelList',
'skinCode'
]),
createRules: function () {
return {
modelCode: [
{ required: true, message: this.$t('rules.selectTrainType'), trigger: 'change' }
],
groupNumber: [
{ required: true, message: this.$t('rules.pleaseEnterTrainNumber'), trigger: 'blur' }
],
'position.x': [
{ required: true, message: this.$t('rules.trainPositionX'), trigger: 'change' }
],
'position.y': [
{ required: true, message: this.$t('rules.trainPositionY'), trigger: 'change' }
]
};
}
},
watch: {
selected: function (val, oldVal) {
this.deviceSelect(val);
},
$route() {
this.$refs.form.resetFields();
this.activeName = 'first';
}
},
methods: {
deviceChange(code) {
this.$emit('setCenter', code);
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
},
deviceSelect(selected) {
this.$refs.form.resetFields();
this.$refs.make.resetFields();
if (selected && selected._type.toUpperCase() === 'Train'.toUpperCase()) {
this.editModel.code = selected.code;
this.editModel.modelCode = selected.modelCode;
this.editModel.groupNumber = selected.groupNumber;
this.editModel.position = {
x: selected.position.x,
y: selected.position.y
};
this.activeName = 'first';
} else {
this.activeName = 'second';
}
},
create() {
this.$refs.make.validate((valid) => {
if (valid) {
const uid = getUID('Train');
const model = {
_type: 'Train',
code: uid,
safeDistance: '100',
maxSafeDistance: '100',
modelCode: this.addModel.modelCode,
groupNumber: this.addModel.groupNumber,
position: {
x: this.addModel.position.x,
y: this.addModel.position.y
}
};
this.$emit('addOrUpdateMapModel', model);
}
});
},
//
edit() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.$emit('addOrUpdateMapModel', this.buildEditModel());
}
});
},
buildEditModel() {
const model = {
_type: 'Train',
code: this.editModel.code,
safeDistance: this.editModel.safeDistance,
maxSafeDistance: this.editModel.maxSafeDistance,
modelCode: this.editModel.modelCode,
groupNumber: this.editModel.groupNumber,
position: {
x: this.editModel.position.x,
y: this.editModel.position.y
}
};
return model;
},
//
deleteObj() {
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
if (selected && selected._type.toUpperCase() === 'Train'.toUpperCase()) {
const _that = this;
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(this.$t('tip.cancelledDelete'));
});
}
},
newTrainMode() {
if (Object.keys(this.$store.state.map.map || {}).length) {
this.$refs.trainMode.doShow({}, 'ADD');
} else {
this.$messageBox(this.$t('tip.selectMap'));
}
},
uptTrainMode(code) {
if (code) {
this.trainModelList.forEach(elem => {
if (elem.code === code) {
this.$refs.trainMode.doShow(elem, 'UPT');
return;
}
});
} else {
this.$messageBox(this.$t('tip.selectTrainType'));
}
},
delTrainMode(code) {
if (code) {
const model = { code };
this.$refs.trainMode.operateTrainModel({ model, type: 'DEL' });
this.addModel.modelCode = this.editModel.modelCode = '';
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
</style>

View File

@ -1,63 +1,26 @@
<template>
<div>
<el-tabs v-model="activeName">
<!-- <el-tab-pane class="view-control" label="属性" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<el-form ref="form" :model="editModel" label-width="110px" size="mini" :rules="rules">
<el-form-item label="列车编号:" prop="code">
<el-select v-model="editModel.code" filterable @change="deviceChange">
<el-option
v-for="item in trainList"
:key="item.code"
:label="item.code"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="车组号:" prop="groupNumber">
<el-input v-model="editModel.groupNumber" />
</el-form-item>
<el-form-item label="车类型:" prop="modelCode">
<el-select v-model="editModel.modelCode" filterable>
<el-option
v-for="item in trainModelList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
<el-button-group>
<el-button type="primary" size="small" @click="newTrainMode">添加</el-button>
<el-button type="primary" size="small" @click="uptTrainMode(editModel.modelCode)">更新
</el-button>
<el-button type="primary" size="small" @click="delTrainMode(editModel.modelCode)">删除
</el-button>
</el-button-group>
</el-form-item>
</el-form>
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="edit">修改</el-button>
<el-button type="primary" @click="deleteObj">删除</el-button>
</el-button-group>
</el-tab-pane> -->
<el-tab-pane class="view-control" label="操作" name="second">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<el-table :data="trainList.filter(data => !search || data.groupNumber.toLowerCase().includes(search.toLowerCase()))" style="width: 100%">
<el-table-column label="车组号" prop="groupNumber" />
<el-table-column label="编码" prop="code" />
<el-table-column :label="$t('map.trainNumber')" prop="groupNumber" />
<el-table-column :label="$t('map.codeC')" prop="code" />
<el-table-column align="right">
<template slot="header" slot-scope="scope">
<el-input v-model="search" size="mini" placeholder="输入关键字搜索" />
<template slot="header">
<el-input v-model="search" size="mini" :placeholder="$t('map.pleaseSelect')" />
</template>
<template slot-scope="scope">
<el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
<el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">{{ $t('map.deleteObj') }}</el-button>
</template>
</el-table-column>
</el-table></el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="handleCreate">创建</el-button>
</el-button-group>
</el-table>
</el-scrollbar>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="handleCreate">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
<train-model ref="trainMode" />
@ -214,4 +177,9 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
</style>

View File

@ -1,186 +0,0 @@
<template>
<el-dialog :title="isNew? $t('map.trainmodelCreate'): $t('map.trainmodelUpdate')" :visible.sync="dialogShow" width="30%" :before-close="doClose">
<el-card shadow="never">
<el-form
ref="form"
:model="formModel"
:rules="rules"
label-width="120px"
size="mini"
style="margin: 20px 20px;"
>
<el-input v-model="formModel.code" :disabled="!isNew" type="hidden" />
<el-form-item :label="$t('map.trainTypeName')" prop="name">
<el-input v-model="formModel.name" :disabled="!isNew" />
</el-form-item>
<el-form-item :label="$t('map.trainLength')" prop="length">
<el-input-number v-model="formModel.length" :min="0" />
</el-form-item>
<el-form-item :label="$t('map.trainSafeDistance')" prop="safeDistance">
<el-input-number v-model="formModel.safeDistance" :min="0" />
</el-form-item>
<el-form-item :label="$t('map.trainMaxSafeDistance')" prop="maxSafeDistance">
<el-input-number v-model="formModel.maxSafeDistance" :min="0" />
</el-form-item>
<el-form-item :label="$t('map.averageVelocity')" prop="averageVelocity">
<el-input-number v-model="formModel.averageVelocity" :min="0" />km/h
</el-form-item>
<el-form-item :label="$t('map.averageDeceleration')" prop="averageDeceleration">
<el-input-number v-model="formModel.averageDeceleration" :min="0" />km/h
</el-form-item>
<el-form-item :label="$t('map.defaultVelocity')" prop="defaultVelocity">
<el-input-number v-model="formModel.defaultVelocity" :min="0" />km/h
</el-form-item>
<el-form-item :label="$t('map.maxVelocity')" prop="maxVelocity">
<el-input-number v-model="formModel.maxVelocity" :min="0" />km/h
</el-form-item>
</el-form>
</el-card>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleSure">{{ isNew? $t('map.create'): $t('map.updata') }}</el-button>
<el-button @click="dialogShow = false">{{ $t('map.cancel') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { getUID } from '@/jmap/utils/Uid';
export default {
name: 'TrainModeOperate',
data() {
return {
dialogShow: false,
loading: false,
rules: null,
mapList: [],
formModel: {
code: '',
name: '',
length: 0,
safeDistance: '',
maxSafeDistance: '',
averageVelocity: 0,
averageDeceleration: 0,
defaultVelocity: 0,
maxVelocity: 0
},
type: ''
};
},
computed: {
addRules: function () {
return {
code: [
{ required: true, message: this.$t('rules.trainCode'), trigger: 'change' }
],
name: [
{ required: true, message: this.$t('rules.pleaseEnterTrainTypeName'), trigger: 'change' }
],
length: [
{ required: true, message: this.$t('rules.trainLength'), trigger: 'change' }
],
safeDistance: [
{ required: true, message: this.$t('rules.safeDistance'), trigger: 'change' }
],
maxSafeDistance: [
{ required: true, message: this.$t('rules.maxSafeDistance'), trigger: 'change' }
],
averageVelocity: [
{ required: true, message: this.$t('rules.averageVelocity'), trigger: 'change' }
],
averageDeceleration: [
{ required: true, message: this.$t('rules.averageDeceleration'), trigger: 'change' }
],
defaultVelocity: [
{ required: true, message: this.$t('rules.defaultVelocity'), trigger: 'change' }
],
maxVelocity: [
{ required: true, message: this.$t('rules.maxVelocity'), trigger: 'change' }
]
};
},
viewRules() {
return {};
},
isNew() {
return this.type == 'ADD';
},
isUpt() {
return this.type == 'UPT';
},
isDel() {
return this.type == 'DEL';
}
},
methods: {
doShow(model, type) {
this.type = type;
this.dialogShow = true;
this.$nextTick(() => {
if (this.$refs && this.$refs.form) {
this.$refs.form.resetFields();
}
if (type !== 'ADD') {
if (model) {
this.formModel.code = model.code;
this.formModel.name = model.name;
this.formModel.length = model.length;
this.formModel.safeDistance = model.safeDistance;
this.formModel.maxSafeDistance = model.maxSafeDistance;
this.formModel.averageVelocity = model.averageVelocity;
this.formModel.averageDeceleration = model.averageDeceleration;
this.formModel.defaultVelocity = model.defaultVelocity;
this.formModel.maxVelocity = model.maxVelocity;
}
this.rules = this.viewRules;
} else {
this.rules = this.addRules;
}
this.$nextTick(() => {
this.$refs.form.clearValidate();
});
});
},
doClose() {
this.dialogShow = false;
},
handleSure() {
this.$refs.form.validate((valid) => {
if (valid) {
if (this.isNew) {
this.formModel.code = getUID('TrainModel');
this.operateTrainModel({ model: this.formModel, type: 'ADD' });
} else if (this.isUpt) {
this.operateTrainModel({ model: this.formModel, type: 'UPT' });
} else if (this.isDel) {
this.operateTrainModel({ model: this.formModel, type: 'DEL'});
}
this.doClose();
}
});
},
operateTrainModel({ model, type }) {
this.$store.dispatch('map/operateTrainModel', { model, type });
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.create-box {
width: 800px;
margin: 0 auto;
padding-top: 20px;
height: 100%;
/deep/ {
.el-step__icon.is-icon {
width: 95px;
}
}
}
</style>

View File

@ -1,14 +1,16 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
</el-scrollbar>
<el-button-group class="map-draft">
<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>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
@ -28,9 +30,11 @@
:titles="['Section集合', '选择Section']"
/>
</el-scrollbar>
<el-button-group class="map-draft">
<el-button type="primary" @click="createTrainWindowByCollection">{{ $t('map.create') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="createTrainWindowByCollection">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -126,6 +130,10 @@ export default {
const form = {
labelWidth: '120px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
@ -155,8 +163,10 @@ export default {
this.deviceSelect(val);
},
$route() {
this.$refs.form.resetFields();
this.activeName = 'first';
this.$nextTick(() => {
this.$refs.form.resetFields();
this.activeName = 'first';
});
}
},
methods: {
@ -362,4 +372,9 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
</style>

View File

@ -1,22 +1,26 @@
<template>
<div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" class="card">
<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">{{ $t('map.updateObj') }}</el-button>
<el-button type="primary" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.operation')" name="second">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
<config-data ref="make" :form="formMake" :form-model="addModel" :rules="createRules" />
</el-scrollbar>
<el-button-group class="map-draft-group">
<el-button type="primary" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -98,10 +102,14 @@ export default {
const form = {
labelWidth: '150px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
{ prop: 'code', label: this.$t('map.code'), type: 'select', optionLabel: 'code', optionValue: 'code', options: this.zcList, change: true, deviceChange: this.deviceChange },
{ prop: 'code', label: this.$t('map.code'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.zcList, change: true, deviceChange: this.deviceChange },
{ prop: 'name', label: this.$t('map.statusSignalName'), type: 'input' },
{ prop: 'visible', label: this.$t('map.showZc'), type: 'checkboxx' },
{ prop: 'position', label: this.$t('map.stateSignalsPlotCoordinates'), type: 'coordinate', width: '140px', children: [
@ -241,7 +249,11 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.button_box{
width: 100%;
background: #f0f0f0;
overflow: hidden;
}
.coordinate {
overflow: hidden;

View File

@ -13,7 +13,7 @@
ref="newForm"
label-position="right"
:model="newModel"
label-width="120px"
label-width="140px"
size="mini"
:rules="newRules"
@submit.native.prevent
@ -39,7 +39,7 @@
label-position="right"
:model="pullModel"
:rules="pullRules"
label-width="120px"
label-width="140px"
size="mini"
>
<el-form-item :label="$t('map.mapName')" prop="id">

View File

@ -3,7 +3,7 @@
<div :id="runPlanId" />
<div v-if="isShowBack" style="float: right; margin-right: 2%; margin-top: 10px; margin-bottom: 20px">
<el-button-group>
<el-button type="primary" @click="back">{{$t('global.return')}}</el-button>
<el-button type="primary" @click="back">{{ $t('global.return') }}</el-button>
</el-button-group>
</div>
</div>
@ -136,14 +136,6 @@ export default {
kmRangeCoordMap: {}
};
},
watch: {
'$store.state.runPlan.planSizeCount': function () {
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
},
$route() {
this.loadChartPage(this.$route.query);
}
},
computed: {
...mapGetters('runPlan', [
'stations'
@ -158,6 +150,16 @@ export default {
return this.$route.params.mode;
}
},
watch: {
'$store.state.runPlan.planSizeCount': function () {
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
},
$route() {
this.$nextTick(() => {
this.loadChartPage(this.$route.query);
});
}
},
mounted() {
this.loadChartPage(this.$route.query);
},

View File

@ -98,7 +98,7 @@
</div>
</el-card>
<span slot="footer" class="dialog-footer">
<el-button type="primary" :disabled="isSpeed" @click="back"><span>{{$t('global.previousStep')}}</span></el-button>
<el-button type="primary" :disabled="isSpeed" @click="back"><span>{{$t('global.lastStep')}}</span></el-button>
<el-button type="primary" :loading="loading" @click="next">
<span v-if="isSpeed && disabled">{{$t('global.skip')}}</span>
<span v-if="isSpeed && !disabled">{{$t('global.create')}}</span>

View File

@ -35,7 +35,7 @@ export default {
computed: {
form() {
const form = {
labelWidth: '100px',
labelWidth: '130px',
items: [
{ prop: 'source', label: this.$t('orderAuthor.source'), type: 'text', disabled: true },
{ prop: 'name', label: this.$t('orderAuthor.distributionUser'), type: 'text', disabled: true },
@ -46,7 +46,7 @@ export default {
},
formOrder() {
const form = {
labelWidth: '100px',
labelWidth: '130px',
items: [
{ prop: 'source', label: this.$t('orderAuthor.source'), type: 'text', disabled: true },
{ prop: 'order', label: this.$t('orderAuthor.orderNumber'), type: 'text', disabled: true }

View File

@ -12,7 +12,7 @@
<div class="draft">
<el-button-group>
<el-button type="primary" @click="create">{{ $t('global.create') }}</el-button>
<el-button type="primary" @click="turnback">{{ $t('global.return') }}</el-button>
<el-button type="primary" @click="turnback">{{ $t('global.back') }}</el-button>
</el-button-group>
</div>
</div>

View File

@ -26,7 +26,7 @@ export default {
pageIndex: 'pageNum'
},
queryForm: {
labelWidth: '120px',
labelWidth: '140px',
reset: true,
queryObject: {
'userMobile': {

View File

@ -19,7 +19,7 @@
<el-button-group>
<el-button v-if="isAdd" type="primary" @click="create">{{ $t('global.create') }}</el-button>
<el-button v-if="isEdit" type="warning" @click="update">{{ $t('global.update') }}</el-button>
<el-button type="primary" @click="turnback">{{ $t('global.return') }}</el-button>
<el-button type="primary" @click="turnback">{{ $t('global.back') }}</el-button>
</el-button-group>
</div>
</div>
@ -105,7 +105,7 @@ export default {
form() {
const form = {
labelWidth: '135px',
labelWidth: '140px',
items: [
{ prop: 'name', label: this.$t('orderAuthor.commodityName'), type: 'text', required: false },
{ prop: 'productType', label: this.$t('orderAuthor.productType'), type: 'select', required: false, disabled: this.isDisabled, options: this.productTypeList, change: true, onChange: this.typeChange },

View File

@ -20,7 +20,7 @@ export default {
pageIndex: 'pageNum'
},
queryForm: {
labelWidth: '80px',
labelWidth: '100px',
reset: true,
queryObject: {
name: {

View File

@ -20,7 +20,7 @@
<el-button v-if="isAdd" v-loading="loading" type="primary" @click="create">{{ $t('global.create') }}</el-button>
<el-button v-if="isEdit" v-loading="loading" type="primary" @click="update">{{ $t('global.update') }}</el-button>
<el-button v-if="isReNew" v-loading="loading" type="primary" @click="create">{{ $t('orderAuthor.renew') }}</el-button>
<el-button type="primary" @click="turnback">{{ $t('global.return') }}</el-button>
<el-button type="primary" @click="turnback">{{ $t('global.back') }}</el-button>
</el-button-group>
</div>
</div>

View File

@ -38,7 +38,7 @@
<el-button-group>
<el-button v-if="!urlInfo.url" type="primary" @click="packForm">{{ $t('orderAuthor.packaging') }}</el-button>
<el-button v-if="urlInfo.url" type="primary" @click="QrCodeShow">{{ $t('orderAuthor.obtainQrCode') }}</el-button>
<el-button type="primary" @click="turnback">{{ $t('global.return') }}</el-button>
<el-button type="primary" @click="turnback">{{ $t('global.back') }}</el-button>
</el-button-group>
</div>
<choose-permission

View File

@ -25,7 +25,7 @@ export default {
pageIndex: 'pageNum'
},
queryForm: {
labelWidth: '120px',
labelWidth: '140px',
reset: true,
queryObject: {
'userMobile': {
@ -141,7 +141,7 @@ export default {
{
type: 'button',
title: this.$t('global.operate'),
width: this.$i18n.locale == 'en' ? '370': '300',
width: this.$i18n.locale == 'en' ? '400': '300',
hide: (row) => { return this.$store.state.user.roles.indexOf(superAdmin) < 0; },
buttons: [
{

View File

@ -8,8 +8,8 @@
</el-radio-group>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose"> </el-button>
<el-button type="primary" @click="handleSure"> </el-button>
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
<el-button type="primary" @click="handleSure">{{ $t('global.confirm') }}</el-button>
</span>
</el-dialog>
</template>

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