diff --git a/.gitignore b/.gitignore index 9ad28d23d..b09ff6fd6 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ yarn-debug.log* yarn-error.log* package-lock.json tests/**/coverage/ +src/utils/baseUrl* # Editor directories and files .idea diff --git a/src/api/simulation.js b/src/api/simulation.js index 1ec95ce0a..5f334e718 100644 --- a/src/api/simulation.js +++ b/src/api/simulation.js @@ -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 }); } diff --git a/src/i18n/langs/en/error.js b/src/i18n/langs/en/error.js index d35b10195..9f0ed67dd 100644 --- a/src/i18n/langs/en/error.js +++ b/src/i18n/langs/en/error.js @@ -46,6 +46,10 @@ export default { addFailed: 'Failure to add', updateFailed: 'Failure to update', exportException: 'Export exception', - operationFailure: 'Operation Failure' - + 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' }; diff --git a/src/i18n/langs/en/global.js b/src/i18n/langs/en/global.js index 9c2b44d60..c29098897 100644 --- a/src/i18n/langs/en/global.js +++ b/src/i18n/langs/en/global.js @@ -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', @@ -82,6 +86,10 @@ export default { month: 'month', putaway: 'Putaway', soldOut: 'Sold out', - exportMap: 'Export Map' - + exportMap: 'Export Map', + preview: 'Preview', + notBeUse: 'This function is not enabled for the time being', + fastCreate: 'Quickly Create', + duration: 'duration', + isTry: 'Try' }; diff --git a/src/i18n/langs/en/index.js b/src/i18n/langs/en/index.js index f1a31378a..453afee9a 100644 --- a/src/i18n/langs/en/index.js +++ b/src/i18n/langs/en/index.js @@ -10,6 +10,9 @@ 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, @@ -23,5 +26,8 @@ export default { tip, system, orderAuthor, - publish + publish, + permission, + replay, + planMonitor }; diff --git a/src/i18n/langs/en/permission.js b/src/i18n/langs/en/permission.js new file mode 100644 index 000000000..465458765 --- /dev/null +++ b/src/i18n/langs/en/permission.js @@ -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' +}; diff --git a/src/i18n/langs/en/planMonitor.js b/src/i18n/langs/en/planMonitor.js new file mode 100644 index 000000000..6d916df14 --- /dev/null +++ b/src/i18n/langs/en/planMonitor.js @@ -0,0 +1,3 @@ +export default { + +}; diff --git a/src/i18n/langs/en/publish.js b/src/i18n/langs/en/publish.js index 9298056da..1be650352 100644 --- a/src/i18n/langs/en/publish.js +++ b/src/i18n/langs/en/publish.js @@ -1,10 +1,47 @@ export default { - name: 'Name', city: 'City', skinType: 'Skin Type', mapName: 'Map Name', + lessonName: 'Lesson Name', updateMapName: 'Update Map Name', updateTime: 'Update Time', operationSuccess: 'Operate successfully', - deleteSuccess: 'Delete 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?' + }; diff --git a/src/i18n/langs/en/replay.js b/src/i18n/langs/en/replay.js new file mode 100644 index 000000000..8aba71ac0 --- /dev/null +++ b/src/i18n/langs/en/replay.js @@ -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?' + +}; diff --git a/src/i18n/langs/en/rules.js b/src/i18n/langs/en/rules.js index 43dc28eb8..43d63748b 100644 --- a/src/i18n/langs/en/rules.js +++ b/src/i18n/langs/en/rules.js @@ -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' }; diff --git a/src/i18n/langs/en/system.js b/src/i18n/langs/en/system.js index eeb86c0a7..623edb89b 100644 --- a/src/i18n/langs/en/system.js +++ b/src/i18n/langs/en/system.js @@ -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', diff --git a/src/i18n/langs/zh/error.js b/src/i18n/langs/zh/error.js index 30e7903df..cae2dd1d4 100644 --- a/src/i18n/langs/zh/error.js +++ b/src/i18n/langs/zh/error.js @@ -46,6 +46,11 @@ export default { addFailed: '添加失败', updateFailed: '更新失败', exportException: '导出异常', - operationFailure: '操作失败' + operationFailure: '操作失败', + createCommonRunPlanFailed: '创建通用运行图失败', + templateHasBeUse: '该模板已被加载计划使用,无法删除', + setFailed: '设置失败', + deleteException: '删除异常,请联系管理员', + paperHasUseNotDel: '该试卷已被使用,不能删除' }; diff --git a/src/i18n/langs/zh/global.js b/src/i18n/langs/zh/global.js index 8f6986cd0..9ff16980c 100644 --- a/src/i18n/langs/zh/global.js +++ b/src/i18n/langs/zh/global.js @@ -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: '语言', @@ -83,6 +87,11 @@ export default { month: '月', putaway: '上 架', soldOut: '下 架', - exportMap: '导出地图' + exportMap: '导出地图', + preview: '预览', + notBeUse: '该功能暂时未开启', + fastCreate: '快速创建', + duration: '时长', + isTry: '是否试用' }; diff --git a/src/i18n/langs/zh/index.js b/src/i18n/langs/zh/index.js index 05e8d3d8f..a991332d7 100644 --- a/src/i18n/langs/zh/index.js +++ b/src/i18n/langs/zh/index.js @@ -10,6 +10,9 @@ 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, @@ -23,5 +26,8 @@ export default { tip, system, orderAuthor, - publish + publish, + permission, + replay, + planMonitor }; diff --git a/src/i18n/langs/zh/permission.js b/src/i18n/langs/zh/permission.js new file mode 100644 index 000000000..1bdac6211 --- /dev/null +++ b/src/i18n/langs/zh/permission.js @@ -0,0 +1,19 @@ +export default { + permissionPack: '权限打包', + setSuccess: '设置成功', + isSureSetBelonger: '是否确定设置{name}为权限所属人?', + setBelonger: '设置归属人', + lessonName: '课程名称', + mapName: '地图名称', + mapProductName: '产品名称', + permissionType: '权限类型', + permissionStatus: '权限状态', + permissionUseType: '公用/专用', + permissionTotal: '权限总数', + permissionRemains: '生于权限', + isForever: '是否永久', + startTime: '开始时间', + endTime: '结束时间', + belonger: '归属人', + userList: '用户列表' +}; diff --git a/src/i18n/langs/zh/planMonitor.js b/src/i18n/langs/zh/planMonitor.js new file mode 100644 index 000000000..6d916df14 --- /dev/null +++ b/src/i18n/langs/zh/planMonitor.js @@ -0,0 +1,3 @@ +export default { + +}; diff --git a/src/i18n/langs/zh/publish.js b/src/i18n/langs/zh/publish.js index c3e7b3fd2..4a74de3b8 100644 --- a/src/i18n/langs/zh/publish.js +++ b/src/i18n/langs/zh/publish.js @@ -1,10 +1,47 @@ export default { - name: '名称', city: '所属城市', skinType: '皮肤类型', mapName: '地图名称', + lessonName: '课程名称', updateMapName: '更新地图名称', updateTime: '更新时间', operationSuccess: '操作成功', - deleteSuccess: '删除成功' + 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: '此操作将删除该试卷, 是否继续?' + }; diff --git a/src/i18n/langs/zh/replay.js b/src/i18n/langs/zh/replay.js new file mode 100644 index 000000000..da34d0dcd --- /dev/null +++ b/src/i18n/langs/zh/replay.js @@ -0,0 +1,8 @@ +export default { + replay: '回放', + mapName: '地图名称', + creatorId: '创建人ID', + createTime: '创建时间', + deleteSuccess: '删除成功', + wellDelReplay: '此操作将删除该回放, 是否继续?' +}; diff --git a/src/i18n/langs/zh/rules.js b/src/i18n/langs/zh/rules.js index 302f5ee23..9c42f53e8 100644 --- a/src/i18n/langs/zh/rules.js +++ b/src/i18n/langs/zh/rules.js @@ -210,5 +210,8 @@ export default { linkWidthInputPrompt: '请输入有效Link宽度', sectionWidthInput: '请输入区段宽度', sectionWidthInputPrompt: '请输入有效区段宽度', - selectShowWatermark: '请选择是否水印' + selectShowWatermark: '请选择是否水印', + + pleaseInputMapName: '请输入地图新名称', + inputTemplateRunPlan: '请选择模板运行图' }; diff --git a/src/i18n/langs/zh/system.js b/src/i18n/langs/zh/system.js index ac2ef3ca0..8906e92ae 100644 --- a/src/i18n/langs/zh/system.js +++ b/src/i18n/langs/zh/system.js @@ -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: '课程名称', diff --git a/src/jlmap3d/jl3ddrive/jl3ddrive.js b/src/jlmap3d/jl3ddrive/jl3ddrive.js index b28592772..40bf34293 100644 --- a/src/jlmap3d/jl3ddrive/jl3ddrive.js +++ b/src/jlmap3d/jl3ddrive/jl3ddrive.js @@ -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; diff --git a/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnect.js b/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnect.js index ef7927c43..1f8aa8124 100644 --- a/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnect.js +++ b/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnect.js @@ -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) { diff --git a/src/jlmap3d/main/loaders/FBXLoader.js b/src/jlmap3d/main/loaders/FBXLoader.js index d48df4bcc..c9483218b 100644 --- a/src/jlmap3d/main/loaders/FBXLoader.js +++ b/src/jlmap3d/main/loaders/FBXLoader.js @@ -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': diff --git a/src/store/modules/scriptRecord.js b/src/store/modules/scriptRecord.js index 3f27a3f44..d3a36b012 100644 --- a/src/store/modules/scriptRecord.js +++ b/src/store/modules/scriptRecord.js @@ -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; \ No newline at end of file +export default scriptRecord; diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js index 4c525adcf..5b8bdb53d 100644 --- a/src/store/modules/socket.js +++ b/src/store/modules/socket.js @@ -88,6 +88,8 @@ function handle(state, data) { case 'Simulation_Quest_Finish': // 任务结束标志 state.tipOperateCount++; break; + case 'Simulation_Control_Pause': // 暂停中 + store.dispatch('scriptRecord/updateSimulationPause', msg); } } diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 2e575c51e..4050e7e22 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -3,9 +3,9 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - BASE_API = 'https://test.joylink.club/jlcloud'; + // BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.3.5:9000'; // 袁琪 - // BASE_API = 'http://192.168.3.6:9000'; // 旭强 + BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.4:9000' // 琰培 } else { BASE_API = process.env.VUE_APP_BASE_API; diff --git a/src/views/components/systemTime/digit.vue b/src/views/components/systemTime/digit.vue index 8442e7c83..acb7e818d 100644 --- a/src/views/components/systemTime/digit.vue +++ b/src/views/components/systemTime/digit.vue @@ -1,86 +1,93 @@ \ No newline at end of file + diff --git a/src/views/components/systemTime/index.vue b/src/views/components/systemTime/index.vue index 0a0cef9d9..a964e1645 100644 --- a/src/views/components/systemTime/index.vue +++ b/src/views/components/systemTime/index.vue @@ -1,75 +1,84 @@ \ No newline at end of file + diff --git a/src/views/components/systemTime/point.vue b/src/views/components/systemTime/point.vue index 888730e2e..2be8a63ad 100644 --- a/src/views/components/systemTime/point.vue +++ b/src/views/components/systemTime/point.vue @@ -1,38 +1,39 @@ \ No newline at end of file + diff --git a/src/views/display/demon/addQuest.vue b/src/views/display/demon/addQuest.vue index ff39fe9ab..d3cd98b19 100644 --- a/src/views/display/demon/addQuest.vue +++ b/src/views/display/demon/addQuest.vue @@ -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'; } }, diff --git a/src/views/display/index.vue b/src/views/display/index.vue index ad44ba7fd..6f468b7d5 100644 --- a/src/views/display/index.vue +++ b/src/views/display/index.vue @@ -26,10 +26,10 @@ - + - + @@ -122,6 +122,7 @@ export default { timeDemonNum: 0, checkLine: null, offset: 15, + right: 0, mouseNum: 1, ierval: null, mouseNumTime: 0, @@ -181,7 +182,7 @@ export default { isReplay() { return this.mode === 'replay'; }, - isTask() { + isScript() { return this.mode === 'script'; }, isPlan() { @@ -246,6 +247,7 @@ export default { 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(() => { @@ -340,13 +342,12 @@ export default { }, // 加载地图数据 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(); @@ -356,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(); @@ -524,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(); } }, diff --git a/src/views/display/menuReplay.vue b/src/views/display/menuReplay.vue index 0dd4e80b2..621518c43 100644 --- a/src/views/display/menuReplay.vue +++ b/src/views/display/menuReplay.vue @@ -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; diff --git a/src/views/display/menuSchema.vue b/src/views/display/menuSchema.vue index 3536cb3aa..0e92443ab 100644 --- a/src/views/display/menuSchema.vue +++ b/src/views/display/menuSchema.vue @@ -7,9 +7,9 @@ 加载剧本 - 运行图预览 + 运行图预览 - \ No newline at end of file + reloadTable() { + this.queryList.reload(); + } + } +}; + diff --git a/src/views/publish/examRule/draft/editRule.vue b/src/views/publish/examRule/draft/editRule.vue index 085e82cd9..c162c6a4c 100644 --- a/src/views/publish/examRule/draft/editRule.vue +++ b/src/views/publish/examRule/draft/editRule.vue @@ -47,8 +47,8 @@ diff --git a/src/views/publish/examRule/draft/examFrom.vue b/src/views/publish/examRule/draft/examFrom.vue index e338c6f61..151bdd23c 100644 --- a/src/views/publish/examRule/draft/examFrom.vue +++ b/src/views/publish/examRule/draft/examFrom.vue @@ -67,9 +67,9 @@ + {{ $t('error.edit') }} + {{ $t('error.nextStep') }} + --> diff --git a/src/views/publish/examRule/draft/index.vue b/src/views/publish/examRule/draft/index.vue index 155c71140..93e1c07d6 100644 --- a/src/views/publish/examRule/draft/index.vue +++ b/src/views/publish/examRule/draft/index.vue @@ -1,7 +1,7 @@ @@ -38,7 +38,7 @@ export default { queryObject: { name: { type: 'text', - label: '运行图名称' + label: this.$t('publish.runPlanName') } } }, @@ -48,11 +48,11 @@ export default { radioShow: true, columns: [ { - title: '运行图名称', + title: this.$t('publish.runPlanName'), prop: 'name' }, { - title: '皮肤类型', + title: this.$t('publish.skinType'), prop: 'skinCode', type: 'tag', columnValue: (row) => { @@ -68,7 +68,7 @@ export default { }, computed: { title() { - return '选择模板运行图'; + return this.$t('publish.selectTemplateRunPlan'); } }, methods: { @@ -98,7 +98,7 @@ export default { if (choose) { this.$emit('chooseConfirm', choose); } else { - this.$messageBox(`请选择模板运行图`); + this.$messageBox(this.$t('publish.pleaseSelectTemplate')); } } }, diff --git a/src/views/publish/runPlanCommon/draft.vue b/src/views/publish/runPlanCommon/draft.vue index 420b3eca6..0aa67270c 100644 --- a/src/views/publish/runPlanCommon/draft.vue +++ b/src/views/publish/runPlanCommon/draft.vue @@ -7,18 +7,18 @@ - + - + - 选择 + {{ $t('global.select') }} @@ -27,8 +27,8 @@
- 创建 - 返回 + {{ $t('global.create') }} + {{ $t('global.back') }}
@@ -64,7 +64,7 @@ export default { }, computed: { title() { - return '创建通用运行图'; + return this.$t('publish.createCommonRunPlan'); }, isAdd() { return this.$route.params.mode.toUpperCase() == 'add'.toUpperCase(); @@ -72,10 +72,10 @@ export default { rules() { const rules = { mapId: [ - { required: true, message: '请选择地图', trigger: 'blur' } + { required: true, message: this.$t('rules.mapInput'), trigger: 'blur' } ], planId: [ - { required: true, message: '请选择模板运行图', trigger: 'change' } + { required: true, message: this.$t('rules.inputTemplateRunPlan'), trigger: 'change' } ] }; @@ -118,10 +118,10 @@ export default { this.$refs['form'].validate((valid) => { if (valid) { createRunPlanCommon(this.buildModel()).then(response => { - this.$message.success('创建通用运行图成功'); + this.$message.success(this.$t('publish.createCommonSuccess')); this.$router.go(-1); }).catch(() => { - this.$messageBox('创建通用运行图失败'); + this.$messageBox(this.$t('error.createCommonRunPlanFailed')); }); } }); diff --git a/src/views/publish/runPlanCommon/index.vue b/src/views/publish/runPlanCommon/index.vue index 6d5d0026d..41742043d 100644 --- a/src/views/publish/runPlanCommon/index.vue +++ b/src/views/publish/runPlanCommon/index.vue @@ -24,11 +24,11 @@ export default { queryObject: { mapName: { type: 'text', - label: '地图名称' + label: this.$t('publish.mapName') }, runPlanName: { type: 'text', - label: '运行图名称' + label: this.$t('publish.runPlanName') } } }, @@ -38,26 +38,26 @@ export default { indexShow: true, columns: [ { - title: '地图名称', + title: this.$t('publish.mapName'), prop: 'mapName' }, { - title: '运行图名称', + title: this.$t('publish.runPlanName'), prop: 'runPlanName' }, { type: 'button', - title: '操作', + title: this.$t('global.operate'), width: '350', hide: () => { return this.$store.state.user.roles.indexOf(superAdmin) < 0; }, buttons: [ // { - // name: '删除', + // name: this.$t('global.delete'), // handleClick: this.handleDelete, // type: 'danger', // }, { - name: '预览', + name: this.$t('global.preview'), handleClick: this.handleView, type: '' } @@ -65,7 +65,7 @@ export default { } ], actions: [ - { text: '创建', btnCode: 'employee_insert', handler: this.handleCreateCommonPlan } + { text: this.$t('global.add'), btnCode: 'employee_insert', handler: this.handleCreateCommonPlan } ] }, @@ -82,9 +82,9 @@ export default { }, // 删除 // handleDelete(index, row) { - // this.$confirm('此操作将删除此通用运行图, 是否继续?', '提示', { - // confirmButtonText: '确定', - // cancelButtonText: '取消', + // this.$confirm('此操作将删除此通用运行图, 是否继续?', this.$t('global.tips'), { + // confirmButtonText: this.$t('global.confirm'), + // cancelButtonText: this.$t('global.cancel'), // type: 'warning' // }).then(() => { diff --git a/src/views/publish/runPlanEveryDay/index.vue b/src/views/publish/runPlanEveryDay/index.vue index 3fd07d951..5bcd48e4c 100644 --- a/src/views/publish/runPlanEveryDay/index.vue +++ b/src/views/publish/runPlanEveryDay/index.vue @@ -25,11 +25,11 @@ export default { queryObject: { name: { type: 'text', - label: '运行图名称' + label: this.$t('publish.runPlanName') }, skinCode: { type: 'select', - label: '皮肤类型', + label: this.$t('publish.skinType'), config: { data: [] } @@ -42,11 +42,11 @@ export default { indexShow: true, columns: [ { - title: '运行图名称', + title: this.$t('publish.runPlanName'), prop: 'name' }, { - title: '皮肤类型', + title: this.$t('publish.skinType'), prop: 'skinCode', type: 'tag', columnValue: (row) => { @@ -55,26 +55,26 @@ export default { tagType: (row) => { return ''; } }, { - title: '每日运行时间', + title: this.$t('publish.runEveryDayTime'), prop: 'runDate' }, { - title: '用户Id', + title: this.$t('publish.userId'), prop: 'creatorId' }, { type: 'button', - title: '操作', + title: this.$t('global.operate'), width: '250', hide: (row) => { return this.$store.state.user.roles.indexOf(superAdmin) < 0; }, buttons: [ { - name: '删除', + name: this.$t('global.delete'), handleClick: this.handleDelete, type: 'danger' }, { - name: '预览', + name: this.$t('global.preview'), handleClick: this.handleView, type: '' } @@ -100,17 +100,17 @@ export default { }); }, handleDelete(index, row) { - this.$confirm('此操作将删除每日运行图, 是否继续?', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + this.$confirm(this.$t('publish.wellDelRunPlanEveryDay'), this.$t('global.tips'), { + confirmButtonText: this.$t('global.confirm'), + cancelButtonText: this.$t('global.cancel'), type: 'warning' }).then(() => { deleteRunPlanEveryDay(row.id).then(response => { - this.$message.success('删除成功'); + this.$message.success(this.$t('publish.deleteSuccess')); this.reloadTable(); }).catch(() => { this.reloadTable(); - this.$messageBox('删除失败'); + this.$messageBox(this.$t('error.deleteFailed')); }); }).catch(() => { }); }, diff --git a/src/views/publish/runPlanTemplate/index.vue b/src/views/publish/runPlanTemplate/index.vue index b1b6d0e6d..be7757936 100644 --- a/src/views/publish/runPlanTemplate/index.vue +++ b/src/views/publish/runPlanTemplate/index.vue @@ -25,11 +25,11 @@ export default { queryObject: { name: { type: 'text', - label: '运行图名称' + label: this.$t('publish.runPlanName') }, skinCode: { type: 'select', - label: '皮肤类型', + label: this.$t('publish.skinType'), config: { data: [] } @@ -42,11 +42,11 @@ export default { indexShow: true, columns: [ { - title: '运行图名称', + title: this.$t('publish.runPlanName'), prop: 'name' }, { - title: '皮肤类型', + title: this.$t('publish.skinType'), prop: 'skinCode', type: 'tag', columnValue: (row) => { @@ -55,27 +55,27 @@ export default { tagType: (row) => { return ''; } }, { - title: '创建时间', + title: this.$t('publish.createTime'), prop: 'createTime' }, { type: 'button', - title: '操作', + title: this.$t('global.operate'), width: '350', hide: () => { return this.$store.state.user.roles.indexOf(superAdmin) < 0; }, buttons: [ { - name: '删除', + name: this.$t('global.delete'), handleClick: this.handleDelete, type: 'danger' }, { - name: '生成每日运行图', + name: this.$t('publish.generateRunPlan'), handleClick: this.handleGenerateEveryDay, type: '' }, { - name: '预览', + name: this.$t('global.preview'), handleClick: this.handleView, type: '' } @@ -102,37 +102,37 @@ export default { }, // 删除 handleDelete(index, row) { - this.$confirm('此操作将删除此运行图模板, 是否继续?', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + this.$confirm(this.$t('publish.wellDelTemplate'), this.$t('global.tips'), { + confirmButtonText: this.$t('global.confirm'), + cancelButtonText: this.$t('global.cancel'), type: 'warning' }).then(() => { deleteRunPlanTemplate(row.id).then(response => { - this.$message.success('删除成功'); + this.$message.success(this.$t('publish.deleteSuccess')); this.reloadTable(); }).catch(error => { this.reloadTable(); if (error.code == 500) { - this.$messageBox('删除失败'); + this.$messageBox(this.$t('error.deleteFailed')); } else if (error.code == 500009) { - this.$messageBox('该模板已被加载计划使用,无法删除'); + this.$messageBox(this.$t('error.templateHasBeUse')); } }); }).catch(() => { }); }, // 生成每日运行图 handleGenerateEveryDay(index, row) { - this.$confirm('此操作将生成每日运行图, 是否继续?', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + this.$confirm(this.$t('publish.wellGenerateEveryRunPlan'), this.$t('global.tips'), { + confirmButtonText: this.$t('global.confirm'), + cancelButtonText: this.$t('global.cancel'), type: 'warning' }).then(() => { generateCommonRunPlanEveryDay(row.id).then(response => { this.reloadTable(); - this.$message.success('生成通用每日运行图成功。'); + this.$message.success(this.$t('publish.createCommonSuccess')); }).catch(() => { this.reloadTable(); - this.$messageBox('生成通用每日运行图失败!'); + this.$messageBox(this.$t('error.operationFailure')); }); }).catch(() => { }); }, diff --git a/src/views/publish/simulationScript/index.vue b/src/views/publish/simulationScript/index.vue index f7e589f5c..9b2b9a36d 100644 --- a/src/views/publish/simulationScript/index.vue +++ b/src/views/publish/simulationScript/index.vue @@ -24,7 +24,7 @@ export default { queryObject: { skinCode: { type: 'select', - label: '皮肤类型', + label: this.$t('publish.skinType'), config: { data: [] } @@ -37,11 +37,11 @@ export default { indexShow: true, columns: [ { - title: '任务名称', + title: this.$t('publish.taskName'), prop: 'name' }, { - title: '皮肤类型', + title: this.$t('publish.skinType'), prop: 'skinCode', type: 'tag', columnValue: (row) => { @@ -50,22 +50,22 @@ export default { tagType: (row) => { return ''; } }, { - title: '创建时间', + title: this.$t('publish.createTime'), prop: 'createTime' }, { type: 'button', - title: '操作', + title: this.$t('global.operate'), width: '350', hide: () => { return this.$store.state.user.roles.indexOf(superAdmin) < 0; }, buttons: [ { - name: '删除', + name: this.$t('global.delete'), handleClick: this.handleDelete, type: 'danger' }, { - name: '查看详情', + name: this.$t('publish.detail'), handleClick: this.handleDetail, type: '' } @@ -92,20 +92,20 @@ export default { }, // 删除 handleDelete(index, row) { - this.$confirm('此操作将删除此仿真脚本, 是否继续?', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + this.$confirm(this.$t('publish.wellDelTemplate'), this.$t('global.tips'), { + confirmButtonText: this.$t('global.confirm'), + cancelButtonText: this.$t('global.cancel'), type: 'warning' }).then(() => { deleteQuest(row.id).then(response => { - this.$message.success('删除成功'); + this.$message.success(this.$t('publish.deleteSuccess')); this.reloadTable(); }).catch(error => { this.reloadTable(); if (error.code == 500) { - this.$messageBox('删除失败'); + this.$messageBox(this.$t('error.deleteFailed')); } else if (error.code == 500009) { - this.$messageBox('该模板已被加载计划使用,无法删除'); + this.$messageBox(this.$t('error.templateHasBeUse')); } }); }).catch(() => { }); @@ -113,8 +113,7 @@ export default { // 查看详情 handleDetail(index, row) { - console.log(index, row); - this.$messageBox('该功能暂时未开启'); + this.$messageBox(this.$t('global.notBeUse')); }, reloadTable() { diff --git a/src/views/replay/index.vue b/src/views/replay/index.vue index 2b50157a3..ba70916a1 100644 --- a/src/views/replay/index.vue +++ b/src/views/replay/index.vue @@ -21,11 +21,11 @@ export default { pageIndex: 'pageNum' }, queryForm: { - labelWidth: '80px', + labelWidth: '120px', queryObject: { mapName: { type: 'text', - label: '地图名称' + label: this.$t('replay.mapName') } } }, @@ -35,19 +35,19 @@ export default { indexShow: true, columns: [ { - title: '地图名称', + title: this.$t('replay.mapName'), prop: 'mapName' }, { - title: '创建人ID', + title: this.$t('replay.creatorId'), prop: 'creatorId' }, { - title: '创建时间', + title: this.$t('replay.createTime'), prop: 'createTime' }, { - title: '状态', + title: this.$t('global.status'), prop: 'status', type: 'tag', columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); }, @@ -60,17 +60,17 @@ export default { }, { type: 'button', - title: '操作', + title: this.$t('global.operate'), width: '250', buttons: [ { - name: '回放', + name: this.$t('replay.replay'), handleClick: this.rePlay, type: '', showControl: (row) => { return row.status == '1'; } }, { - name: '删除', + name: this.$t('global.delete'), handleClick: this.delete, type: 'danger', showControl: (row) => { return this.role; } @@ -112,17 +112,17 @@ export default { }); }, delete(index, data) { - this.$confirm('此操作将删除该回放, 是否继续?', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + this.$confirm(this.$t('replay.wellDelReplay'), this.$t('global.tips'), { + confirmButtonText: this.$t('global.confirm'), + cancelButtonText: this.$t('global.cancel'), type: 'warning' }).then(() => { delSimulationRecord(data.id).then(response => { - this.$message.success('删除成功'); + this.$message.success(this.$t('replay.deleteSuccess')); this.reloadTable(); }).catch(() => { this.reloadTable(); - this.$messageBox('删除失败'); + this.$messageBox(this.$t('error.deleteFailedv')); }); }).catch(() => { }); } diff --git a/src/views/scriptManage/category/tree.vue b/src/views/scriptManage/category/tree.vue index c61109954..5e1d51463 100644 --- a/src/views/scriptManage/category/tree.vue +++ b/src/views/scriptManage/category/tree.vue @@ -82,6 +82,7 @@ export default { // debugger; // this.$store localStore.set("script_mapId", id); + this.$store.dispatch('scriptRecord/updateScriptId',id); this.getQuestPageList(id); }, async getQuestPageList(id){ diff --git a/src/views/scriptManage/display/index.vue b/src/views/scriptManage/display/index.vue index 719ac645f..4d197c1f1 100644 --- a/src/views/scriptManage/display/index.vue +++ b/src/views/scriptManage/display/index.vue @@ -1,6 +1,8 @@