This commit is contained in:
ival 2019-10-31 15:22:13 +08:00
commit 9ceacf7cef
29 changed files with 2169 additions and 2313 deletions

View File

@ -113,5 +113,7 @@ export default {
selectTestType: 'Please select test type',
modifyRules: 'Modify Rules',
enterRunPlanName: 'Please enter the name of the diagram',
setTheProject: 'Set the project'
setTheProject: 'Set the project',
whetherItBelongsToTheProject: 'Whether it belongs to the project',
belongsProject: 'Belongs project'
};

View File

@ -117,5 +117,7 @@ export default {
modifyRules: '修改规则',
enterRunPlanName: '请输入运行图名称',
// refreshFailed 刷新失败
setTheProject: '设置归属项目'
setTheProject: '设置归属项目',
whetherItBelongsToTheProject: '是否归属项目',
belongsProject: '归属项目'
};

View File

@ -309,7 +309,7 @@ export function Jl3dDriving(updatemmi,sound,translation) {
if (trainlisttest.list[code].dispose != data.body[i].dispose && data.body[i].dispose == false) {
if (rails.linkrail[data.body[i].linkCode]) {
// console.log(trainlisttest.group);
console.log(trainlisttest.group);
if(trainlisttest.group.children.length<1){
trainlisttest.group.add(trainlisttest.list[code]);
}
@ -421,41 +421,7 @@ export function Jl3dDriving(updatemmi,sound,translation) {
}
}
if (trainlisttest.list[code].status != data.body[i].directionType) {
if (data.body[i].directionType == '02') { // 向右
trainlisttest.list[code].progress = 0;
const rotaposx = trainlisttest.list[code].children[5].matrixWorld.elements[12];
const rotaposz = trainlisttest.list[code].children[0].matrixWorld.elements[14];
trainlisttest.list[code].rotation.y = 0;
trainlisttest.list[code].position.x = rotaposx;
for (let tl=0; tl<6; tl++) {
trainlisttest.list[code].children[tl].position.z = rotaposz;
}
trainlisttest.list[code].progress = (rotaposx-rails.linkrail[data.body[i].linkCode].lp.x)/rails.linkrail[data.body[i].linkCode].lengthfact;
trainlisttest.list[code].status = '02';
trainlisttest.list[code].curve = rails.linkrail[data.body[i].linkCode].lineleft;
trainlisttest.list[code].nextcurve = null;
trainlisttest.list[code].len = rails.linkrail[data.body[i].linkCode].lengthfact;
} else if (data.body[i].directionType == '03') { // 向左
trainlisttest.list[code].progress = 0;
const rotaposx = trainlisttest.list[code].children[5].matrixWorld.elements[12];
const rotaposz = Math.abs(trainlisttest.list[code].children[0].matrixWorld.elements[14]);
trainlisttest.list[code].rotation.y = Math.PI;
trainlisttest.list[code].position.x = rotaposx;
for (let tl=0; tl<6; tl++) {
trainlisttest.list[code].children[tl].position.z = -rotaposz;
}
trainlisttest.list[code].progress = 1-(rotaposx-rails.linkrail[data.body[i].linkCode].lp.x)/rails.linkrail[data.body[i].linkCode].lengthfact;
trainlisttest.list[code].status = '03';
trainlisttest.list[code].curve = rails.linkrail[data.body[i].linkCode].lineright;
trainlisttest.list[code].nextcurve = null;
trainlisttest.list[code].len = rails.linkrail[data.body[i].linkCode].lengthfact;
}
}

View File

@ -90,8 +90,8 @@ export function JLmap3d(dom, data,skinCode,storemod) {
ModelLoad(data,scope,netdata.data,mapdata,camera,controls,scene,storemod);
});
//
let stats = new Stats();
dom.appendChild( stats.dom );
// let stats = new Stats();
// dom.appendChild( stats.dom );
//开启渲染
animate();
startWorker();
@ -108,7 +108,7 @@ export function JLmap3d(dom, data,skinCode,storemod) {
//根据相机渲染场景
renderer.render(scene,camera);
//检测动画构造器播放动画
stats.update();
// stats.update();
}
}

View File

@ -53,9 +53,6 @@ import ExamHome from '@/views/exam/index';
import ExamCourseDetail from '@/views/exam/detail/courseDetail';
import ExamResult from '@/views/exam/result';
import PublishExamRule from '@/views/publish/examRule/index';
import PublishExamRuleDraft from '@/views/publish/examRule/draft/index';
import DemonstrationDetail from '@/views/demonstration/detail/index';
import PlanMonitorEditTool from '@/views/planMonitor/editTool/index';
@ -79,12 +76,13 @@ import PublishMap from '@/views/publish/publishMap/index';
import PublishMapDetail from '@/views/publish/publishMap/list'; // 发布历史
import ProductStatus from '@/views/publish/productStatus/index';
import PublishLesson from '@/views/publish/publishLesson/index';
import RunPlanTemplate from '@/views/publish/runPlanTemplate/index';
import RunPlanCommon from '@/views/publish/runPlanCommon/index';
import RunPlanCommonDraft from '@/views/publish/runPlanCommon/draft';
import RunPlanTemplate from '@/views/publish/runPlanTemplate/index';
import RunPlanEveryDay from '@/views/publish/runPlanEveryDay/index';
import RunplanView from '@/views/publish/runPlanView/index';
import RunplanView from '@/views/publish/runPlanEveryDay/runPlanView';
import PublishExamRule from '@/views/publish/examRule/index';
import PublishExamRuleDraft from '@/views/publish/examRule/draft/index';
import TrainingPlatform from '@/views/trainingPlatform/index';
@ -334,7 +332,8 @@ export const asyncRouter = [
hidden: true
},
{
path: 'lesson/home/:mapId/:skinCode',
path: 'lesson/home/:mapId',
// /:skinCode
component: LessonHome,
hidden: true
},
@ -647,6 +646,11 @@ export const asyncRouter = [
i18n: 'router.runPlanEveryDayManage'
}
},
{
path: 'runPlan/view/:mode',
component: RunplanView,
hidden: true
},
{
path: 'examRule/manage',
component: PublishExamRule,
@ -663,11 +667,6 @@ export const asyncRouter = [
path: 'runPlan/common/:mode',
component: RunPlanCommonDraft,
hidden: true
},
{
path: 'runPlan/view/:mode',
component: RunplanView,
hidden: true
}
]
},

View File

@ -89,7 +89,7 @@ export const OperationList = {
trainingName: '站台扣车({10}-{12}站台)',
trainingRemark: '设置扣车功能',
trainingType: '05',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【扣车】' },
{ deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' }
@ -103,7 +103,7 @@ export const OperationList = {
trainingName: '站台取消扣车({10}-{12}站台)',
trainingRemark: '设置取消扣车功能',
trainingType: '05',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' },
{ deviceType: '06', orderNum: 2, operateCode: '505', tip: '鼠标左键点击【确定】按钮' }
@ -160,7 +160,7 @@ export const OperationList = {
trainingName: '站台跳停({10}-{12}站台)',
trainingRemark: '设置跳停功能',
trainingType: '05',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【跳停】' },
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}' }
@ -174,7 +174,7 @@ export const OperationList = {
trainingName: '取消跳停({10}-{12}站台)',
trainingRemark: '设置取消跳停功能',
trainingType: '05',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' },
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}' }
@ -188,7 +188,7 @@ export const OperationList = {
trainingName: '查询站台状态({10}-{12}站台)',
trainingRemark: '查询站台状态功能',
trainingType: '05',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '507', tip: '鼠标右键菜单选择【查询站台状态】' },
{ deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【确定】按钮' }
@ -316,7 +316,7 @@ export const OperationList = {
trainingName: '区段故障解锁({8}{9})',
trainingRemark: '故障解锁功能',
trainingType: '04',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '402', tip: '鼠标右键菜单选择【区段故障解锁】' },
{ deviceType: '03', orderNum: 2, operateCode: '4026', tip: '鼠标左键点击【下达】按钮' },
@ -333,7 +333,7 @@ export const OperationList = {
trainingName: '区段切除({8}{9})',
trainingRemark: '区段切除',
trainingType: '04',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '405', tip: '鼠标右键菜单选择【区段切除】' },
{ deviceType: '03', orderNum: 2, operateCode: '405', tip: '鼠标左键点击【确定】按钮' }
@ -347,7 +347,7 @@ export const OperationList = {
trainingName: '区段激活({8}{9})',
trainingRemark: '区段激活功能',
trainingType: '04',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '406', tip: '鼠标右键菜单选择【区段激活】' },
{ deviceType: '03', orderNum: 2, operateCode: '406', tip: '鼠标左键点击【确定】按钮' }
@ -378,7 +378,7 @@ export const OperationList = {
trainingName: '区段封锁({8}{9})',
trainingRemark: '区段封锁功能',
trainingType: '04',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '403', tip: '鼠标右键菜单选择【区段封锁】' },
{ deviceType: '03', orderNum: 2, operateCode: '403', tip: '鼠标左键点击【确定】按钮' }
@ -392,7 +392,7 @@ export const OperationList = {
trainingName: '区段解封({8}{9})',
trainingRemark: '区段解封功能',
trainingType: '04',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '404', tip: '鼠标右键菜单选择【区段解封】' },
{ deviceType: '03', orderNum: 2, operateCode: '4041', tip: '鼠标左键点击【下达】按钮' },
@ -409,7 +409,7 @@ export const OperationList = {
trainingName: '区段设置限速({8}{9})',
trainingRemark: '区段设置限速功能限速值5',
trainingType: '04',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '407', tip: '鼠标右键菜单选择【区段设置限速】' },
{ deviceType: '03', orderNum: 2, operateCode: '4076', tip: '鼠标左键选择【限速值5】', val: '5' },
@ -428,7 +428,7 @@ export const OperationList = {
trainingName: '区段取消限速({8}{9})',
trainingRemark: '区段取消限速功能',
trainingType: '04',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '408', tip: '鼠标右键菜单选择【区段取消限速】' },
{ deviceType: '03', orderNum: 2, operateCode: '4081', tip: '鼠标左键点击【下达】按钮' },
@ -447,7 +447,7 @@ export const OperationList = {
trainingName: '道岔单锁({7})',
trainingRemark: '道岔单锁功能',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '103', tip: '鼠标右键菜单选择【道岔单锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '103', tip: '鼠标左键点击【确定】按钮' }
@ -461,7 +461,7 @@ export const OperationList = {
trainingName: '道岔单解({7})',
trainingRemark: '道岔单解功能',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '104', tip: '鼠标右键菜单选择【道岔单解】' },
{ deviceType: '02', orderNum: 2, operateCode: '1041', tip: '鼠标左键点击【下达】按钮' },
@ -478,7 +478,7 @@ export const OperationList = {
trainingName: '道岔区段封闭({7})',
trainingRemark: '道岔区段封闭功能',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '105', tip: '鼠标右键菜单选择【道岔区段封闭】' },
{ deviceType: '02', orderNum: 2, operateCode: '105', tip: '鼠标左键点击【确定】按钮' }
@ -492,7 +492,7 @@ export const OperationList = {
trainingName: '道岔区段解封({7})',
trainingRemark: '道岔区段解封功能',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '106', tip: '鼠标右键菜单选择【道岔区段解封】' },
{ deviceType: '02', orderNum: 2, operateCode: '1061', tip: '鼠标左键点击【下达】按钮' },
@ -509,7 +509,7 @@ export const OperationList = {
trainingName: '道岔转动({7})',
trainingRemark: '道岔转动功能({15}转{16})',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '107', tip: '鼠标右键菜单选择【道岔转动】' },
{ deviceType: '02', orderNum: 2, operateCode: '107', tip: '鼠标左键点击【确定】按钮' }
@ -523,7 +523,7 @@ export const OperationList = {
trainingName: '道岔区段故障解锁({7})',
trainingRemark: '道岔区段故障解锁功能',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '109', tip: '鼠标右键菜单选择【道岔区段故障解锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '1091', tip: '鼠标左键点击【下达】按钮' },
@ -557,7 +557,7 @@ export const OperationList = {
trainingName: '区段切除({7})',
trainingRemark: '区段切除',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '111', tip: '鼠标右键菜单选择【区段切除】' },
{ deviceType: '02', orderNum: 2, operateCode: '111', tip: '鼠标左键点击【确定】按钮' }
@ -571,7 +571,7 @@ export const OperationList = {
trainingName: '区段激活({7})',
trainingRemark: '区段激活功能',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '112', tip: '鼠标右键菜单选择【区段激活】' },
{ deviceType: '02', orderNum: 2, operateCode: '112', tip: '鼠标左键点击【确定】按钮' }
@ -585,7 +585,7 @@ export const OperationList = {
trainingName: '道岔区段设置限速({7})',
trainingRemark: '道岔区段设置限速功能限速值5',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '113', tip: '鼠标右键菜单选择【道岔区段设置限速】' },
{ deviceType: '02', orderNum: 2, operateCode: '1136', tip: '鼠标左键选择【限速值5】', val: '5' },
@ -604,7 +604,7 @@ export const OperationList = {
trainingName: '道岔区段取消限速({7})',
trainingRemark: '道岔区段取消限速功能',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '114', tip: '鼠标右键菜单选择【道岔区段取消限速】' },
{ deviceType: '02', orderNum: 2, operateCode: '1141', tip: '鼠标左键点击【下达】按钮' },
@ -623,7 +623,7 @@ export const OperationList = {
trainingName: '进路选排({3})',
trainingRemark: '选择排列进路',
trainingType: '02',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【进路选排】' },
{ deviceType: '04', orderNum: 2, operateCode: '3011', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
@ -668,7 +668,7 @@ export const OperationList = {
trainingName: '信号封闭({5})',
trainingRemark: '信号封闭',
trainingType: '02',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '306', tip: '鼠标右键菜单选择【信号封闭】' },
{ deviceType: '04', orderNum: 2, operateCode: '306', tip: '鼠标左键点击【确定】按钮' }
@ -682,7 +682,7 @@ export const OperationList = {
trainingName: '信号解封({5})',
trainingRemark: '信号解封',
trainingType: '02',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '307', tip: '鼠标右键菜单选择【信号解封】' },
{ deviceType: '04', orderNum: 2, operateCode: '3071', tip: '鼠标左键点击【下达】按钮' },
@ -700,7 +700,7 @@ export const OperationList = {
trainingName: '信号关灯({3})',
trainingRemark: '信号关灯',
trainingType: '02',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '313', tip: '鼠标右键菜单选择【信号关灯】' },
{ deviceType: '04', orderNum: 2, operateCode: '313', tip: '鼠标左键点击【确定】按钮' },
@ -715,7 +715,7 @@ export const OperationList = {
trainingName: '信号重开({3})',
trainingRemark: '信号重开',
trainingType: '02',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '304', tip: '鼠标右键菜单选择【信号重开】' },
{ deviceType: '04', orderNum: 2, operateCode: '304', tip: '鼠标左键点击【确定】按钮' },
@ -851,7 +851,7 @@ export const OperationList = {
trainingName: '设置扣车({10}-{12} 站台)',
trainingRemark: '设置扣车功能',
trainingType: '05',
productTypes: ['01,02'], // 产品类型 01 现地 02 行调
productTypes: ['01', '02'], // 产品类型 01 现地 02 行调
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【设置扣车】' },
{ deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' }
@ -865,7 +865,7 @@ export const OperationList = {
trainingName: '取消扣车({10}-{12} 站台)',
trainingRemark: '取消扣车功能',
trainingType: '05',
productTypes: ['01,02'], // 产品类型 01 现地 02 行调
productTypes: ['01', '02'], // 产品类型 01 现地 02 行调
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' },
{ deviceType: '06', orderNum: 2, operateCode: '505', tip: '鼠标左键点击【确定】按钮' }
@ -879,7 +879,7 @@ export const OperationList = {
trainingName: '设置跳停({10}-{12} 站台)',
trainingRemark: '设置跳停功能',
trainingType: '05',
productTypes: ['01,02'], // 产品类型 01 现地 02 行调
productTypes: ['01', '02'], // 产品类型 01 现地 02 行调
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【设置跳停】' },
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}' }
@ -893,7 +893,7 @@ export const OperationList = {
trainingName: '设置跳停({10}-{12} 站台)',
trainingRemark: '设置指定001号列车跳停功能',
trainingType: '05',
productTypes: ['01,02'], // 产品类型 01 现地 02 行调
productTypes: ['01', '02'], // 产品类型 01 现地 02 行调
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【设置跳停】' },
{ deviceType: '06', orderNum: 2, operateCode: '5024', tip: '鼠标左键点击' },
@ -909,7 +909,7 @@ export const OperationList = {
trainingName: '取消跳停({10}-{12} 站台)',
trainingRemark: '取消跳停功能',
trainingType: '05',
productTypes: ['01,02'], // 产品类型 01 现地 02 行调
productTypes: ['01', '02'], // 产品类型 01 现地 02 行调
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' },
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}' }
@ -923,7 +923,7 @@ export const OperationList = {
trainingName: '取消跳停({10}-{12} 站台)',
trainingRemark: '取消指定001号列车跳停功能',
trainingType: '05',
productTypes: ['01,02'], // 产品类型 01 现地 02 行调
productTypes: ['01', '02'], // 产品类型 01 现地 02 行调
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' },
{ deviceType: '06', orderNum: 2, operateCode: '5034', tip: '鼠标左键点击' },
@ -939,7 +939,7 @@ export const OperationList = {
trainingName: '查询站台状态({10}-{12} 站台)',
trainingRemark: '查询站台状态功能',
trainingType: '05',
productTypes: ['01,02'], // 产品类型 01 现地 02 行调
productTypes: ['01', '02'], // 产品类型 01 现地 02 行调
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '507', tip: '鼠标右键菜单选择【站台信息】' },
{ deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【确定】按钮' }
@ -1064,7 +1064,7 @@ export const OperationList = {
trainingName: '轨道切除({8}{9} 区段)',
trainingRemark: '轨道切除功能',
trainingType: '04',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '405', tip: '鼠标右键菜单选择【轨道切除】' },
{ deviceType: '03', orderNum: 2, operateCode: '405', tip: '鼠标左键点击【确定】按钮' }
@ -1078,7 +1078,7 @@ export const OperationList = {
trainingName: '轨道激活({8}{9} 区段)',
trainingRemark: '轨道激活功能',
trainingType: '04',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '406', tip: '鼠标右键菜单选择【轨道激活】' },
{ deviceType: '03', orderNum: 2, operateCode: '406', tip: '鼠标左键点击【确定】按钮' }
@ -1092,7 +1092,7 @@ export const OperationList = {
trainingName: '设置临时限速({8}{9} 区段)',
trainingRemark: '设置临时限速功能限速值15',
trainingType: '04',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '407', tip: '鼠标右键菜单选择【设置临时限速】' },
{ deviceType: '03', orderNum: 2, operateCode: '4076', tip: '鼠标左键选择【限速值15】', val: '15' },
@ -1112,7 +1112,7 @@ export const OperationList = {
trainingName: '轨道切除({7} 道岔)',
trainingRemark: '轨道切除功能',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '111', tip: '鼠标右键菜单选择【轨道切除】' },
{ deviceType: '02', orderNum: 2, operateCode: '111', tip: '鼠标左键点击【确定】按钮' }
@ -1126,7 +1126,7 @@ export const OperationList = {
trainingName: '轨道激活({7} 道岔)',
trainingRemark: '轨道激活功能',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '112', tip: '鼠标右键菜单选择【轨道激活】' },
{ deviceType: '02', orderNum: 2, operateCode: '112', tip: '鼠标左键点击【确定】按钮' }
@ -1140,7 +1140,7 @@ export const OperationList = {
trainingName: '设置临时限速({7} 道岔)',
trainingRemark: '设置临时限速功能(限速值 35 零点西上行公里标0 - 零点西上行公里标3000',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['01', '02'],
// stepVOList: [
// { deviceType: '02', orderNum: 1, operateCode: '113', tip: '鼠标右键菜单选择【设置临时限速】' },
// { deviceType: '02', orderNum: 2, operateCode: '1131', tip: '鼠标左键选择【打开会话】' },
@ -1180,7 +1180,7 @@ export const OperationList = {
trainingName: '排列进路({3} 进路)',
trainingRemark: '排列进路功能',
trainingType: '02',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【排列进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '3011', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
@ -1253,7 +1253,7 @@ export const OperationList = {
trainingName: '信号重开({3} 进路)',
trainingRemark: '信号重开功能',
trainingType: '02',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '304', tip: '鼠标右键菜单选择【信号重开】' },
{ deviceType: '04', orderNum: 2, operateCode: '304', tip: '鼠标左键点击【确定】按钮' }
@ -1268,7 +1268,7 @@ export const OperationList = {
trainingName: '全线取消临时限速',
trainingRemark: '全线取消临时限速功能',
trainingType: '08',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '10', orderNum: 1, operateCode: '800', tip: '鼠标右键菜单选择【取消全线临时限速】' },
{ deviceType: '10', orderNum: 2, operateCode: '8001', tip: '鼠标左键点击【打开会话】按钮' },
@ -1833,7 +1833,7 @@ export const OperationList = {
trainingName: '设置跳停({10}-{12}站台)',
trainingRemark: '设置跳停功能',
trainingType: '05',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【跳停】' },
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}' }
@ -1847,7 +1847,7 @@ export const OperationList = {
trainingName: '取消跳停({10}-{12}站台)',
trainingRemark: '设置取消跳停功能',
trainingType: '05',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' },
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}' }
@ -2031,7 +2031,7 @@ export const OperationList = {
trainingName: ' Train detaining({10}-{12}station)',
trainingRemark: 'Set the detaining function',
trainingType: '05',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '504', tip: 'Right click to select [train detaining]' },
{ deviceType: '06', orderNum: 2, operateCode: '504', tip: 'Left click [ok] ' }
@ -2045,7 +2045,7 @@ export const OperationList = {
trainingName: 'Cancel train detaining({10}-{12}The platform)',
trainingRemark: 'Set cancelling detaining function',
trainingType: '05',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '505', tip: 'Right click to select [cancel train detaining]]' },
{ deviceType: '06', orderNum: 2, operateCode: '505', tip: 'Left click [ok] ' }
@ -2102,7 +2102,7 @@ export const OperationList = {
trainingName: 'Skip to continue moving({10}-{12}The platform)',
trainingRemark: 'Set the skip to continue moving function',
trainingType: '05',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '502', tip: 'Right click to select [Skip to continue moving]' },
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: 'Left click [ok]', val: '{11}' }
@ -2116,7 +2116,7 @@ export const OperationList = {
trainingName: 'Cancel skiping ({10}-{12}The platform)',
trainingRemark: 'Set cancelling skiping function',
trainingType: '05',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '503', tip: 'Right click to select [Cancel skiping]' },
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: 'Left click [ok]', val: '{11}' }
@ -2130,7 +2130,7 @@ export const OperationList = {
trainingName: ' Platform status query({10}-{12}The platform)',
trainingRemark: 'Query platform status function',
trainingType: '05',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '507', tip: 'Right click to select [Platform status query]' },
{ deviceType: '06', orderNum: 2, operateCode: '0012', tip: 'Left click [ok] ' }
@ -2258,7 +2258,7 @@ export const OperationList = {
trainingName: 'Section fault unlocking({8}{9})',
trainingRemark: 'Fault unlocking',
trainingType: '04',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '402', tip: 'Right click to select "Section fault unlocking" ' },
{ deviceType: '03', orderNum: 2, operateCode: '4026', tip: 'Left click [Execute] ' },
@ -2275,7 +2275,7 @@ export const OperationList = {
trainingName: 'Section resection({8}{9})',
trainingRemark: 'Section resection',
trainingType: '04',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '405', tip: 'Right click to select [Section resection]' },
{ deviceType: '03', orderNum: 2, operateCode: '405', tip: 'Left click [ok] ' }
@ -2289,7 +2289,7 @@ export const OperationList = {
trainingName: 'Section activation({8}{9})',
trainingRemark: 'Section activation function',
trainingType: '04',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '406', tip: 'Right click to select [Section activation]' },
{ deviceType: '03', orderNum: 2, operateCode: '406', tip: 'Left click [ok]' }
@ -2320,7 +2320,7 @@ export const OperationList = {
trainingName: 'Section blockade({8}{9})',
trainingRemark: 'Section blockade function',
trainingType: '04',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '403', tip: 'Right click to select [Section blockade]' },
{ deviceType: '03', orderNum: 2, operateCode: '403', tip: 'Left click [ok] ' }
@ -2334,7 +2334,7 @@ export const OperationList = {
trainingName: 'Section unblockade({8}{9})',
trainingRemark: 'Section unblockade function',
trainingType: '04',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '404', tip: 'Right click to select [Section unblockade]' },
{ deviceType: '03', orderNum: 2, operateCode: '4041', tip: 'Left click [Execute]' },
@ -2351,7 +2351,7 @@ export const OperationList = {
trainingName: 'Set speed limit on the section({8}{9})',
trainingRemark: 'Set speed limit on the section (speed limit value: 5)',
trainingType: '04',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '407', tip: 'Right click to select [Set speed limit on the section]' },
{ deviceType: '03', orderNum: 2, operateCode: '4076', tip: 'Left click to select [speed limit 5] ', val: '5' },
@ -2370,7 +2370,7 @@ export const OperationList = {
trainingName: 'Cancel speed limit on the section({8}{9})',
trainingRemark: 'Cancel speed limit on the section',
trainingType: '04',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '408', tip: 'Right click to select [Cancel speed limit on the section]' },
{ deviceType: '03', orderNum: 2, operateCode: '4081', tip: 'Left click [Execute]' },
@ -2389,7 +2389,7 @@ export const OperationList = {
trainingName: 'Turnout single lock({7})',
trainingRemark: 'Turnout single lock function',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '103', tip: 'Right click to select [Turnout single lock]' },
{ deviceType: '02', orderNum: 2, operateCode: '103', tip: 'Left click [ok] ' }
@ -2403,7 +2403,7 @@ export const OperationList = {
trainingName: 'Turnout single release({7})',
trainingRemark: 'Turnout single release function',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '104', tip: 'Right click to select [Turnout single release]' },
{ deviceType: '02', orderNum: 2, operateCode: '1041', tip: 'Left click [Execute]' },
@ -2420,7 +2420,7 @@ export const OperationList = {
trainingName: 'Turnout section closure({7})',
trainingRemark: 'Turnout section closure ',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '105', tip: 'Right click to select [Turnout section closure]' },
{ deviceType: '02', orderNum: 2, operateCode: '105', tip: 'Left click [ok] ' }
@ -2434,7 +2434,7 @@ export const OperationList = {
trainingName: 'Turnout section unsealing({7})',
trainingRemark: 'Turnout section unsealing function',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '106', tip: 'Right click to select [Turnout section unsealing]' },
{ deviceType: '02', orderNum: 2, operateCode: '1061', tip: 'Left click [Execute]' },
@ -2451,7 +2451,7 @@ export const OperationList = {
trainingName: 'Switch rotation({7})',
trainingRemark: 'Switch rotation({15}turn{16})',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '107', tip: 'Right click to select [Switch rotation]' },
{ deviceType: '02', orderNum: 2, operateCode: '107', tip: 'Left click [ok] ' }
@ -2465,7 +2465,7 @@ export const OperationList = {
trainingName: 'Switch section fault unlocking({7})',
trainingRemark: 'Switch section fault unlocking function',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '109', tip: 'Right click to select [switch section fault unlocking]' },
{ deviceType: '02', orderNum: 2, operateCode: '1091', tip: 'Left click [Execute]' },
@ -2499,7 +2499,7 @@ export const OperationList = {
trainingName: 'Section resection({7})',
trainingRemark: 'Section resection',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '111', tip: 'Right click to select [Section resection]' },
{ deviceType: '02', orderNum: 2, operateCode: '111', tip: 'Left click [ok]' }
@ -2513,7 +2513,7 @@ export const OperationList = {
trainingName: 'Section activation({7})',
trainingRemark: 'Section activation function',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '112', tip: 'Right click to select [Section activation]' },
{ deviceType: '02', orderNum: 2, operateCode: '112', tip: 'Left click [ok] ' }
@ -2527,7 +2527,7 @@ export const OperationList = {
trainingName: 'Set speed limit on the section({7})',
trainingRemark: 'Set speed limit on the section (speed limit value: 5)',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '113', tip: 'Right click to select [Set speed limit on the section]' },
{ deviceType: '02', orderNum: 2, operateCode: '1136', tip: 'Left click to select [speed limit 5] ', val: '5' },
@ -2546,7 +2546,7 @@ export const OperationList = {
trainingName: 'Cancel speed limit on the section({7})',
trainingRemark: 'Cancel speed limit on the section',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '114', tip: 'Right click to select [Cancel speed limit on the section]' },
{ deviceType: '02', orderNum: 2, operateCode: '1141', tip: 'Left click [Execute]' },
@ -2565,7 +2565,7 @@ export const OperationList = {
trainingName: 'Route selection({3})',
trainingRemark: 'Route selection',
trainingType: '02',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '301', tip: 'Right click to select [Route selection]' },
{ deviceType: '04', orderNum: 2, operateCode: '3011', tip: 'Left click to select the route name【{3}】', val: '{4}' },
@ -2610,7 +2610,7 @@ export const OperationList = {
trainingName: 'Signal closure({5})',
trainingRemark: 'Signal closure',
trainingType: '02',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '306', tip: 'Right click to select [Signal closure]' },
{ deviceType: '04', orderNum: 2, operateCode: '306', tip: 'Left click [ok] ' }
@ -2624,7 +2624,7 @@ export const OperationList = {
trainingName: 'Signal unsealing({5})',
trainingRemark: 'Signal unsealing',
trainingType: '02',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '307', tip: 'Right click to select [Signal unsealing]' },
{ deviceType: '04', orderNum: 2, operateCode: '3071', tip: 'Left click [Execute]' },
@ -2642,7 +2642,7 @@ export const OperationList = {
trainingName: 'The signal light turns red({3})',
trainingRemark: 'The signal light turns red',
trainingType: '02',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '313', tip: 'Right click to select [The signal light turns red]' },
{ deviceType: '04', orderNum: 2, operateCode: '313', tip: 'Left click [ok]' },
@ -2657,7 +2657,7 @@ export const OperationList = {
trainingName: 'Signal reopen({3})',
trainingRemark: 'Signal reopen',
trainingType: '02',
productTypes: ['01,02'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '304', tip: 'Right click to select [Signal reopen]' },
{ deviceType: '04', orderNum: 2, operateCode: '304', tip: 'Left click [ok]' },

View File

@ -213,7 +213,6 @@ function handleButtonReopenSignal(operates) {
* @param {*} operates
*/
function handleButtonHumanTrainRoute(operates) {
debugger;
if (operates.length >= 2) {
const operate = operates[operates.length - 1];
if (operate.type === SignalType && operate.code) {

View File

@ -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.41:9000'; // 王兴杰
} else {
BASE_API = process.env.VUE_APP_BASE_API;

View File

@ -95,12 +95,13 @@ export default {
switch (obj.type) {
case 'scriptDesign': {
setSessionStorage('designType', 'scriptDesign');
this.$router.push({ path: `${UrlConfig.design.scriptHome}/${obj.mapId}?skinCode=${obj.skinCode}` });
this.$router.push({ path: `${UrlConfig.design.scriptHome}/${obj.mapId}` });
break;
}
case 'lessonDesign': {
setSessionStorage('designType', 'lessonDesign');
this.$router.push({ path: `${UrlConfig.design.lessonHome}/${obj.mapId}/${obj.skinCode}`, query: {cityCode: obj.cityCode} });
// /${obj.skinCode}
this.$router.push({ path: `${UrlConfig.design.lessonHome}/${obj.mapId}`, query: {cityCode: obj.cityCode} });
break;
}
case 'runPlanDesign': {

View File

@ -37,7 +37,8 @@ export default {
mapIdList: [],
trainingTypeList: [],
trainingOperateTypeMap: {},
placeholderList: []
placeholderList: [],
productTypesList:[]
};
},
computed: {
@ -49,12 +50,14 @@ export default {
{ prop: 'mapId', label: this.$t('lesson.mapName'), type: 'select', required: true, options: this.mapIdList, disabled: true },
{ prop: 'trainingType', label: this.$t('lesson.trainingType'), type: 'select', required: true, options: this.trainingTypeList, disabled: !isAdd, change: true, onChange: this.changeList },
{ prop: 'operateType', label: this.$t('lesson.operationType'), type: 'select', required: true, options: this.trainingOperateTypeMap[this.formModel.trainingType], disabled: !isAdd },
{ prop: 'productTypes', label: this.$t('lesson.productType'), type: 'select', multiple: true, required: true, options: this.productTypesList, disabled: !isAdd},
{ label: '', type: 'button', options: this.placeholderList, style: 'margin-bottom: 0; margin-top: -10px;', typeBtn: 'info', click: this.addTrainName },
{ prop: 'trainingName', label: this.$t('lesson.trainingName'), type: 'text', required: true, rightWidth: true, tooltip: true, info: this.$t('lesson.tipNamePlaceholderInfo') },
{ prop: 'minDuration', label: this.$t('lesson.minDuration'), type: 'number', required: true, min:1},
{ prop: 'maxDuration', label: this.$t('lesson.maxDuration'), type: 'number', required: true, min:1},
{ label: '', type: 'button', options: this.placeholderList, style: 'margin-bottom: 0; margin-top: -10px;', typeBtn: 'info', click: this.addTrainRemark },
{ prop: 'trainingRemark', label: this.$t('lesson.trainingRemark'), type: 'textarea', required: true, tooltip: true, info: this.$t('lesson.tipExplainPlaceholderInfo') }
]
};
return form;
@ -70,6 +73,9 @@ export default {
operateType: [
{ required: true, message: this.$t('rules.inputOperationType'), trigger: 'change' }
],
productTypes:[
{ required: true, message: this.$t('rules.productTypeInput'), trigger: 'change' }
],
mapId: [
{ required: true, message: this.$t('rules.selectMapName'), trigger: 'change' }
],
@ -93,13 +99,18 @@ export default {
}
}
},
mounted() {
created() {
this.init();
},
// beforeupdate(data) {
// this.$refs.dataform.clearValidate();
// },
methods: {
init() {
//
// this.$refs.dataform.resetForm();
this.mapIdList = [];
this.productTypesList = [{ value:'01', label:'现地'}, {value:'02', label:'行调'}];
listPublishMap().then(response => {
this.mapIdList = response.data.map(item => {
const params = {};
@ -186,6 +197,7 @@ export default {
//
const res = await getPlaceholderList({ trainingType: data.trainingType });
this.placeholderList = res.data;
debugger;
this.formModel = {
id: data.id,
trainingName: this.repliceName(data.trainingName, this.placeholderList),
@ -198,9 +210,10 @@ export default {
trainingRemark: this.repliceName(data.trainingRemark, this.placeholderList)
};
} else {
this.formModel = {
mapId: this.$route.query.mapId
};
this.formModel.mapId = this.$route.query.mapId;
// this.formModel = {
// mapId: this.$route.query.mapId
// };
}
},
repliceName(fieldValue, enumList) {
@ -237,6 +250,7 @@ export default {
},
create() {
const self = this;
this.loading = true;
this.placeholderList.forEach(item => {
if (this.formModel.trainingName.includes(`{${item.name}}`)) {
const name = this.formModel.trainingName.replace(`{${item.name}}`, `{${item.id}}`);
@ -248,7 +262,6 @@ export default {
}
});
this.loading = true;
postTrainingRulesData(this.formModel).then(response => {
self.loading = false;
self.$message.success(this.$t('lesson.createOperateSuccess'));
@ -291,9 +304,11 @@ export default {
mapId: '',
minDuration: '',
maxDuration: '',
trainingRemark: ''
trainingRemark: '',
productTypes:[]
};
this.$refs.dataform.resetForm();
// this.$refs.dataform.clearValidate();
this.dialogVisible = false;
}
}

View File

@ -287,7 +287,6 @@ export default {
addAutoTraining(data).then(response => {
this.$message.success(this.$t('tip.automaticGenerationTrainingSuccess'));
debugger;
this.$emit('refresh');
this.close();
}).catch(() => {

View File

@ -1,22 +1,21 @@
<template>
<el-card>
<div v-if="lessonName" slot="header" style="text-align: center;">
<!-- <el-card> -->
<!-- <div v-if="lessonName" slot="header" style="text-align: center;">
<b>{{ $t('publish.lessonName') }} {{ lessonName }}</b>
</div>
<div class="exam-box" :style="{ height: height +'px' }">
<el-scrollbar wrap-class="scrollbar-wrapper" style="">
</div> -->
<div class="exam-box">
<el-steps class="steps" :active="display">
<el-step :title="$t('publish.testDefinitionMaking')" icon="el-icon-edit" />
<el-step :title="$t('publish.examRuleMaking')" icon="el-icon-setting" />
</el-steps>
<el-card class="forms">
<div class="joylink-card forms">
<template v-if="display == 1" class="definition">
<exam-from ref="exam" :height="height-260" @definition="definition" />
<exam-from ref="exam" @definition="definition" />
</template>
<template v-else class="rule">
<rule-from ref="rule" :course="course" :height="height-300" @regulation="regulation" />
<rule-from ref="rule" :course="course" @regulation="regulation" />
</template>
</el-card>
</div>
<div class="draft">
<el-button-group>
<el-button v-if="isPrevStep" type="primary" @click="prevStep">{{ this.$t('global.lastStep') }}</el-button>
@ -26,9 +25,8 @@
<el-button type="primary" @click="turnback">{{ $t('global.back') }}</el-button>
</el-button-group>
</div>
</el-scrollbar>
</div>
</el-card>
<!-- </el-card> -->
</template>
<script>
@ -46,7 +44,7 @@ export default {
return {
display: 1,
course: {},
lessonName: '',
// lessonName: '',
formData: {}
};
},
@ -62,9 +60,6 @@ export default {
},
isCreate() {
return this.display == 2;
},
height() {
return /\/exam\//.test(`${this.$route.path}`)? this.$store.state.app.height - 92: this.$store.state.app.height - 65;
}
},
mounted() {
@ -74,11 +69,11 @@ export default {
loadInitData() {
getPublishLessonList().then(response => {
this.OrganizationList = response.data;
this.OrganizationList.forEach(elem => {
if (elem.id == this.$route.params.lessonId) {
this.lessonName = elem.name;
}
});
// this.OrganizationList.forEach(elem => {
// if (elem.id == this.$route.params.lessonId) {
// this.lessonName = elem.name;
// }
// });
});
},
definition(data) {
@ -116,6 +111,7 @@ export default {
<style rel="stylesheet/scss" lang="scss" scoped>
.exam-box {
padding-top: 10px;
height: 100%;
/deep/ {
.el-step__icon.is-icon {

View File

@ -2,7 +2,7 @@
<el-dialog v-dialogDrag title="复制地图为" :visible.sync="dialogVisible" width="30%" center>
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
<el-button @click="dialogVisible = false">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
@ -19,6 +19,7 @@ export default {
name: '',
copyOtherData: false
},
loading: false,
mapId: '',
form:{
labelWidth: '100px',
@ -46,10 +47,18 @@ export default {
this.mapId = row.id;
},
doSave() {
if (this.loading) {
return;
}
this.loading = true;
copyMapAs(this.mapId, this.formModel).then(resp =>{
this.$message.success('复制地图成功!');
this.loading = false;
this.dialogVisible = false;
this.$emit('refresh');
}).catch(() => {
this.loading = false;
this.$messageBox(`复制地图失败!`);
});
}
}

View File

@ -1,18 +1,18 @@
<template>
<el-dialog v-dialogDrag title="设置归属项目" :visible.sync="dialogVisible" width="30%" center>
<el-dialog v-dialogDrag :title="this.$t('publish.setTheProject')" :visible.sync="dialogVisible" width="30%" center>
<el-form ref="form" :model="formModel" label-width="100px" label-position="left">
<el-form-item label="地图名称">
<el-form-item :label="this.$t('publish.mapName')">
<span>{{ formModel.name }}</span>
</el-form-item>
<el-form-item label="是否归属项目" prop="project">
<el-form-item :label="this.$t('publish.whetherItBelongsToTheProject')" prop="project">
<el-radio-group v-model="formModel.project" @change="changeProject">
<el-radio :label="booleanValue.t"></el-radio>
<el-radio :label="booleanValue.f"></el-radio>
<el-radio :label="booleanValue.t">{{ $t('publish.trialYes') }}</el-radio>
<el-radio :label="booleanValue.f">{{ $t('publish.trialNo') }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
v-if="formModel.project"
label="归属项目"
:label="this.$t('publish.belongsProject')"
prop="projectCode"
:rules="{
required: true, message: '归属项目不能为空', trigger: 'change'
@ -24,7 +24,7 @@
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
<el-button @click="dialogVisible = false">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
@ -45,6 +45,7 @@ export default {
project: false,
projectCode: ''
},
loading: false,
projectCodeShow: false,
booleanValue: {
t: true,
@ -63,10 +64,17 @@ export default {
doSave() {
this.$refs['form'].validate((valid) => {
if (valid) {
if (this.loading) {
return;
}
this.loading = true;
setMapProject(this.formModel).then(resp =>{
this.$message.success('设置归属项目成功!');
this.loading = false;
this.dialogVisible = false;
this.$emit('refresh');
}).catch( ()=>{
this.$messageBox(`设置归属项目失败!`);
});
} else {
return false;

View File

@ -4,8 +4,8 @@
<el-step :title="title" icon="el-icon-edit-outline" />
<el-step title="" icon="el-icon-upload" />
</el-steps>
<el-card class="forms">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{height:height -120 + 'px'}" style="padding-top: 40px">
<div class="joylink-card forms">
<div style="padding-top: 40px; padding-bottom: 20px;">
<el-form ref="form" :model="model" :rules="rules" label-width="140px" size="small">
<el-form-item :label="`${$t('publish.selectMap')}:`" prop="mapId">
<el-select v-model="model.mapId" filterable>
@ -23,8 +23,8 @@
</el-row>
</el-form-item>
</el-form>
</el-scrollbar>
</el-card>
</div>
</div>
<div class="draft">
<el-button-group>
<el-button v-if="isAdd" type="primary" @click="create">{{ $t('global.create') }}</el-button>
@ -75,9 +75,6 @@ export default {
};
return rules;
},
height() {
return this.$store.state.app.height - 130;
}
},
mounted() {
@ -129,11 +126,13 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.card-box{
height: 100%;
padding-top: 20px;
}
.steps {
width: 940px;
margin: 0 auto;
margin-top: 20px;
height: 100%;
/deep/ {
.el-step__icon.is-icon {

View File

@ -1,124 +0,0 @@
<template>
<div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
</div>
</template>
<script>
import { superAdmin } from '@/router';
import { getSkinCodeList } from '@/api/management/mapskin';
import { getQuestPageList, deleteQuest } from '@/api/quest';
export default {
name: 'RunPlanTemplate',
data() {
return {
skinCodeList: [],
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
labelWidth: '140px',
reset: true,
queryObject: {
skinCode: {
type: 'select',
label: this.$t('publish.skinType'),
config: {
data: []
}
}
}
},
queryList: {
query: getQuestPageList,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: this.$t('publish.taskName'),
prop: 'name'
},
{
title: this.$t('publish.skinType'),
prop: 'skinCode',
type: 'tag',
columnValue: (row) => {
return this.$convertField(row.skinCode, this.skinCodeList, ['code', 'name']);
},
tagType: (row) => { return ''; }
},
{
title: this.$t('publish.createTime'),
prop: 'createTime'
},
{
type: 'button',
title: this.$t('global.operate'),
width: '350',
hide: () => { return this.$store.state.user.roles.indexOf(superAdmin) < 0; },
buttons: [
{
name: this.$t('global.delete'),
handleClick: this.handleDelete,
type: 'danger'
},
{
name: this.$t('publish.detail'),
handleClick: this.handleDetail,
type: ''
}
]
}
]
},
currentModel: {}
};
},
created() {
this.loadInitData();
},
methods: {
loadInitData() {
this.skinCodeList = [];
getSkinCodeList().then(response => {
this.skinCodeList = response.data;
response.data.forEach(elem => {
this.queryForm.queryObject.skinCode.config.data.push({ value: elem.code, label: elem.name });
});
});
},
//
handleDelete(index, row) {
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.$t('publish.deleteSuccess'));
this.reloadTable();
}).catch(error => {
this.reloadTable();
if (error.code == 500) {
this.$messageBox(this.$t('error.deleteFailed'));
} else if (error.code == 500009) {
this.$messageBox(this.$t('error.templateHasBeUse'));
}
});
}).catch(() => { });
},
//
handleDetail(index, row) {
this.$messageBox(this.$t('global.notBeUse'));
},
reloadTable() {
this.queryList.reload();
}
}
};
</script>

View File

@ -5,7 +5,7 @@
<el-header style="height:50px;">
<el-row class="actionList">
<span class="titleStyle">{{ $t('scriptRecord.scriptRecordTitle') }}</span>
<span class="titleStyle">( {{$t('scriptRecord.language')}}: {{ $route.query.lang=="en"?$t('scriptRecord.english'):$t('scriptRecord.chinese') }} )</span>
<span class="titleStyle">( {{ $t('scriptRecord.language') }}: {{ $route.query.lang=="en"?$t('scriptRecord.english'):$t('scriptRecord.chinese') }} )</span>
</el-row>
</el-header>
<el-main style="padding-top:10px;padding-bottom:10px;">
@ -62,16 +62,16 @@ export default {
backDisabled: false,
size: {
width: 350,
height: window.innerHeight-342
height: window.innerHeight - 342
}
};
},
watch: {
'$store.state.scriptRecord.bgSet': function (val) {
this.backDisabled=val;
this.backDisabled = val;
},
'$store.state.app.windowSizeCount': function() {
this.size = { width: 350, height: window.innerHeight-342};
this.size = { width: 350, height: window.innerHeight - 342};
},
width: function(val) {
this.size = { width: val / 2 - 20, height: window.innerHeight - 342};
@ -79,17 +79,17 @@ export default {
},
mounted() {
this.initAutoSaveScript();
this.backDisabled=this.$store.state.scriptRecord.bgSet;
this.backDisabled = this.$store.state.scriptRecord.bgSet;
},
beforeDestroy() {
this.clearAutoSave();
},
methods: {
setIsParse(isPause) {
this.isPause=isPause;
this.isPause = isPause;
},
setDisabled(data) {
this.executeDisabled=!data;
this.executeDisabled = !data;
},
initAutoSaveScript() {
const timeout = 1000 * 20;
@ -117,9 +117,9 @@ export default {
});
},
saveScenesStage() {
const data=Vue.prototype.$jlmap.$options;
const group=this.$route.query.group;
const dataZoom={scale: data.scaleRate, x: data.offsetX, y: data.offsetY};
const data = Vue.prototype.$jlmap.$options;
const group = this.$route.query.group;
const dataZoom = {scale: data.scaleRate, x: data.offsetX, y: data.offsetY};
saveScriptScenes(this.group).then(resp => {
updateMapLocation(group, dataZoom).then(response=>{
this.$store.dispatch('scriptRecord/updateBgSet', true);
@ -133,14 +133,14 @@ export default {
},
saveScenesData() {
this.isSavingScript=true;
this.isSavingScript = true;
saveScriptData(this.group).then(resp => {
this.$message.success(this.$t('scriptRecord.saveDataSucess'));
this.isSavingScript=false;
this.isSavingScript = false;
this.initAutoSaveScript();
}).catch(error => {
this.$messageBox(`${this.$t('scriptRecord.saveDataFail')}: ${error.message}`);
this.isSavingScript=false;
this.isSavingScript = false;
if (error.code === 40004 || error.code === 40005 || error.code === 40003) {
this.clearAutoSave();
} else {
@ -150,7 +150,7 @@ export default {
},
dumpScenesData() {
this.clearAutoSave();
const group=this.group;
const group = this.group;
this.$confirm(this.$t('scriptRecord.clearDataTip'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),

View File

@ -1,16 +1,13 @@
<template>
<el-card :style="{height: height+'px'}">
<div class="scriptHeader">
<div class="scriptList">{{$t('scriptRecord.scriptList')}}</div>
<el-button size="small" type="primary" @click="handleCreate" class="createScript">{{$t('scriptRecord.scriptCreate')}}</el-button>
<div class="scriptList">{{ $t('scriptRecord.scriptList') }}</div>
<el-button size="small" type="primary" class="createScript" @click="handleCreate">{{ $t('scriptRecord.scriptCreate') }}</el-button>
</div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;display: inline-block;"/>
<script-publish ref='publishScript' @reloadTable="reloadTable" @create="handleConfirmPublish" :title="$t('scriptRecord.publishScript')">
</script-publish>
<create-script ref='createScript' @reloadTable="reloadTable" @create="handleConfirmCreate" :title="$t('scriptRecord.createScript')">
</create-script>
<create-script ref='modifyScript' @reloadTable="reloadTable" @create="handleConfirmModify" :title="$t('scriptRecord.modifyScript')">
</create-script>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;display: inline-block;" />
<script-publish ref="publishScript" :title="$t('scriptRecord.publishScript')" @reloadTable="reloadTable" @create="handleConfirmPublish" />
<create-script ref="createScript" :title="$t('scriptRecord.createScript')" @reloadTable="reloadTable" @create="handleConfirmCreate" />
<create-script ref="modifyScript" :title="$t('scriptRecord.modifyScript')" @reloadTable="reloadTable" @create="handleConfirmModify" />
</el-card>
</template>
@ -20,9 +17,9 @@ import ConstConfig from '@/scripts/ConstConfig';
import { UrlConfig } from '@/router/index';
import { mapGetters } from 'vuex';
import { admin, superAdmin} from '@/router';
import { getQuestPageList,createQuest,deleteQuest,updateQuest,publishQuest,retractQuest} from '@/api/quest';
import { getQuestPageList, createQuest, deleteQuest, updateQuest, publishQuest, retractQuest} from '@/api/quest';
import { launchFullscreen } from '@/utils/screen';
import { scriptDraftRecordNotify,scriptRecordNotify } from '@/api/simulation';
import { scriptDraftRecordNotify, scriptRecordNotify } from '@/api/simulation';
import CreateScript from './create';
import ScriptPublish from './publish';
@ -54,18 +51,18 @@ export default {
},
{
title: this.$t('scriptRecord.scriptDescription'),
prop: 'description',
prop: 'description'
},
{
title: this.$t('scriptRecord.status'),
prop: 'status',
type: 'tag',
columnValue: (row) => { return this.covertData(row)},
columnValue: (row) => { return this.covertData(row); },
tagType: (row) => { return ''; }
},
{
title: this.$t('scriptRecord.revokeReason'),
prop: 'explanation',
prop: 'explanation'
},
{
type: 'button',
@ -76,36 +73,36 @@ export default {
name: this.$t('scriptRecord.scriptRecord'),
handleClick: this.drawUp,
type: 'success',
showControl:(row) => { return !(row.status==1) },
showControl:(row) => { return !(row.status == 1); }
},
{
name: this.$t('scriptRecord.scriptModify'),
handleClick: this.handleModify,
type: 'primary',
showControl:(row) => { return !(row.status==1) },
showControl:(row) => { return !(row.status == 1); }
},
{
name: this.$t('scriptRecord.scriptDelete'),
handleClick: this.deleteScript,
type: 'danger',
showControl:(row) => { return !(row.status==1) },
showControl:(row) => { return !(row.status == 1); }
},
{
name: this.covertButtonname(),
handleClick: this.publishScript,
type: 'primary',
showControl:(row) => { return row.status==0 },
showControl:(row) => { return row.status == 0; }
},
{
name: this.$t('scriptRecord.applyRevoke'),
handleClick: this.revokeScript,
type: 'primary',
showControl:(row) => { return row.status==1 },
showControl:(row) => { return row.status == 1; }
},
{
name: this.$t('scriptRecord.preview'),
handleClick: this.previewScript,
type: 'success',
type: 'success'
// showControl:(row) => { return row.status==1},
}
]
@ -116,7 +113,7 @@ export default {
},
computed: {
height() {
return this.$store.state.app.height - 50-30;
return this.$store.state.app.height - 50 - 30;
}
},
watch: {
@ -126,23 +123,23 @@ export default {
},
methods: {
queryFunction(params) {
return getQuestPageList(this.$route.params.mapId,params);
return getQuestPageList(this.$route.params.mapId, params);
},
reloadTable() {
if (this.queryList && this.queryList.reload) {
this.queryList.reload();
}
},
drawUp(index,row) {
drawUp(index, row) {
scriptRecordNotify(row.id).then(resp => {
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id,lang:row.lang };
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, lang:row.lang };
this.$router.push({ path: `${UrlConfig.scriptDisplay}/script`, query });
launchFullscreen();
}).catch(error => {
this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);
});
},
deleteScript(index,row) {
deleteScript(index, row) {
this.$confirm(this.$t('scriptRecord.deleteScriptTip'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
@ -158,55 +155,55 @@ export default {
},
//
handleConfirmCreate(data) {
if(Cookies.get("user_lang")=="en"){
data.lang='en';
}else{
data.lang='zh';
if (Cookies.get('user_lang') == 'en') {
data.lang = 'en';
} else {
data.lang = 'zh';
}
createQuest(data).then(resp => {
this.reloadTable();
this.$message.success(this.$t('scriptRecord.createScriptSuccess'));
}).catch(error => {
this.$messageBox(`${this.$t('scriptRecord.createScriptFail')}: ${error.message}`);
})
});
},
//
handleModify(index, row){
//
handleModify(index, row) {
this.$refs.modifyScript.doShow(row.id);
},
//
handleConfirmModify(data){
if(Cookies.get("user_lang")=="en"){
data.lang='en';
}else{
data.lang='zh';
//
handleConfirmModify(data) {
if (Cookies.get('user_lang') == 'en') {
data.lang = 'en';
} else {
data.lang = 'zh';
}
updateQuest(data.id,data).then(resp => {
updateQuest(data.id, data).then(resp => {
this.reloadTable();
this.$message.success(this.$t('scriptRecord.modifyScriptSuccess'));
}).catch(error => {
this.$messageBox(`${this.$t('scriptRecord.modifyScriptFail')}: ${error.message}`);
})
});
},
//
handleCreate() {
this.$refs.createScript.doShow(null);
},
covertData(row){
let releaseReview=ConstConfig.ConstSelect.releaseReview;
let lastData=Object.assign({}, row);
if(Cookies.get("user_lang")=="en"){
releaseReview.forEach(function(element){
let rolename=element.value;
if(lastData.status==rolename){
lastData.status=element.enlabel;
covertData(row) {
const releaseReview = ConstConfig.ConstSelect.releaseReview;
const lastData = Object.assign({}, row);
if (Cookies.get('user_lang') == 'en') {
releaseReview.forEach(function(element) {
const rolename = element.value;
if (lastData.status == rolename) {
lastData.status = element.enlabel;
}
});
}else{
releaseReview.forEach(function(element){
let rolename=element.value;
if(lastData.status==rolename){
lastData.status=element.label;
} else {
releaseReview.forEach(function(element) {
const rolename = element.value;
if (lastData.status == rolename) {
lastData.status = element.label;
}
});
}
@ -214,24 +211,24 @@ export default {
// let explanation=lastData.explanation?'{ '+lastData.explanation+'}':'';
// return lastData.status+explanation;
},
handleConfirmPublish(data){
publishQuest(data.id,{'scriptName':data.scriptName}).then(resp => {
handleConfirmPublish(data) {
publishQuest(data.id, {'scriptName':data.scriptName}).then(resp => {
this.reloadTable();
this.$message.success(this.$t('scriptRecord.publishScriptSuccess'));
}).catch(error => {
this.$messageBox(`${this.$t('scriptRecord.publishScriptFailed')}: ${error.message}`);
});
},
publishScript(index,row){
if(this.$store.getters.roles.indexOf(admin) >= 0 || this.$store.getters.roles.indexOf(superAdmin) >= 0){
publishScript(index, row) {
if (this.$store.getters.roles.indexOf(admin) >= 0 || this.$store.getters.roles.indexOf(superAdmin) >= 0) {
this.$refs.publishScript.doShow(row);
}else{
} else {
this.$confirm(this.$t('scriptRecord.releaseScriptTip'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning'
}).then(() => {
publishQuest(row.id,{name:''}).then(resp => {
publishQuest(row.id, {name:''}).then(resp => {
this.reloadTable();
this.$message.success(this.$t('scriptRecord.releaseScriptSuccess'));
}).catch(error => {
@ -241,14 +238,14 @@ export default {
}
},
covertButtonname(){
if(this.$store.getters.roles.indexOf(admin) >= 0 || this.$store.getters.roles.indexOf(superAdmin) >= 0){
covertButtonname() {
if (this.$store.getters.roles.indexOf(admin) >= 0 || this.$store.getters.roles.indexOf(superAdmin) >= 0) {
return this.$t('scriptRecord.publish');
}else{
} else {
return this.$t('scriptRecord.applyPublish');
}
},
revokeScript(index,row){
revokeScript(index, row) {
this.$confirm(this.$t('scriptRecord.revokeScriptTip'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
@ -262,9 +259,10 @@ export default {
});
}).catch(() => { });
},
previewScript(index,row){
previewScript(index, row) {
scriptDraftRecordNotify(row.id).then(resp => {
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id,skinCode:this.$route.query.skinCode,try:0};
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0};
// skinCode:this.$route.query.skinCode,
this.$router.push({ path: `${UrlConfig.design.display}/demon`, query });
launchFullscreen();
}).catch(error => {

View File

@ -1,70 +1,70 @@
<template>
<div>
<el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center>
<data-form ref="dataform" :form="form" :formModel="formModel" :rules="rules"></data-form>
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doCreate">{{$t('global.confirm')}}</el-button>
<el-button @click="doClose">{{$t('global.cancel')}}</el-button>
<el-button type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
export default {
name: 'ScriptOperate',
props: {
title: String,
type:String
},
data() {
return {
dialogVisible: false,
formModel:{
scriptName:'',
id:'',
id:''
},
isShow: false,
}
},
props: {
title: String,
type:String,
isShow: false
};
},
computed: {
form() {
let form={
const form = {
labelWidth: '150px',
items: [
{ prop: 'scriptName', label: this.$t('approval.scriptName'), type: 'text', required: true},
{ prop: 'scriptName', label: this.$t('approval.scriptName'), type: 'text', required: true}
]
}
return form
};
return form;
},
rules() {
let crules ={
const crules = {
scriptName: [
{ required: true, message: this.$t('approval.inputScriptName'), trigger: 'blur' },
{ required: true, message: this.$t('approval.inputScriptName'), trigger: 'blur' }
]
};
return crules;
}
return crules
},
},
methods: {
doShow(row) {
this.formModel.scriptName=row.name;
this.formModel.id=row.id;
this.dialogVisible = true
this.formModel.scriptName = row.name;
this.formModel.id = row.id;
this.dialogVisible = true;
},
doCreate() {
let self = this
const self = this;
this.$refs.dataform.validateForm(() => {
self.$emit('create', Object.assign({}, this.formModel));
self.doClose()
})
self.doClose();
});
},
doClose() {
this.$refs.dataform.resetForm();
this.isShow = false;
this.dialogVisible = false
this.dialogVisible = false;
}
}
};
};
</script>
<style lang="scss" scoped>
/deep/ .el-dialog--center .el-dialog__body{

View File

@ -61,12 +61,12 @@
</el-scrollbar>
</template>
<script>
import Vue from 'vue';
import Cookies from 'js-cookie';
import ConstConfig from '@/scripts/ConstConfig';
import {addScriptAction,modifyScriptAction,getAvailableDeviceCommand,getDeviceCodeByDeviceType,getScriptPlayMember} from '@/api/simulation';
export default {
name: 'addAction',
import Vue from 'vue';
import Cookies from 'js-cookie';
import ConstConfig from '@/scripts/ConstConfig';
import {addScriptAction, modifyScriptAction, getAvailableDeviceCommand, getDeviceCodeByDeviceType, getScriptPlayMember} from '@/api/simulation';
export default {
name: 'AddAction',
props: {
group: {
type: String,
@ -77,46 +77,28 @@
required: true
}
},
watch:{
'$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);
this.$refs['modalData'].clearValidate();
this.$refs['commandData'].clearValidate();
if(!val)
{
this.initActionData();
this.initCommandActionData();
}
},
},
data() {
return {
buttonName:this.$t('scriptRecord.addConversitionButton'),
operateType:"add",
operateType:'add',
modalData:{
actionVO:{
memberId:"",
targetId:"",
reply:"",
type:"Conversation",
memberId:'',
targetId:'',
reply:'',
type:'Conversation'
}
},
commandData:{
action:{
memberId:"",
deviceCommand:"",
memberId:'',
deviceCommand:'',
commandParamList:[],
type:"Command",
type:'Command'
},
param:{
startStation:"",
endStation:"",
startStation:'',
endStation:''
}
},
isPause:false,
@ -139,7 +121,7 @@
targetId:[
{ required: true, message: this.$t('scriptRecord.receiverRules'), trigger: 'change' }
]
},
}
},
commandRules:{
action:{
@ -159,224 +141,227 @@
]
}
}
};
},
watch:{
'$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);
this.$refs['modalData'].clearValidate();
this.$refs['commandData'].clearValidate();
if (!val) {
this.initActionData();
this.initCommandActionData();
}
}
},
mounted(){
mounted() {
this.initData();
},
methods:{
initData(){
this.buttonName=this.$t('scriptRecord.addConversitionButton');
this.operateType="add";
initData() {
this.buttonName = this.$t('scriptRecord.addConversitionButton');
this.operateType = 'add';
getScriptPlayMember(this.group).then(resp => {
let roleTypeList=ConstConfig.ConstSelect.roleType;
this.orginMemberList=resp.data;
let lastData=JSON.stringify(resp.data);
roleTypeList.forEach(function(element){
let rolename=element.value;
if(Cookies.get("user_lang")=="en"){
lastData=lastData.replace(new RegExp(rolename,'g'),element.enLabel);
}else{
const roleTypeList = ConstConfig.ConstSelect.roleType;
this.orginMemberList = resp.data;
let lastData = JSON.stringify(resp.data);
roleTypeList.forEach(function(element) {
const rolename = element.value;
if (Cookies.get('user_lang') == 'en') {
lastData = lastData.replace(new RegExp(rolename, 'g'), element.enLabel);
} else {
lastData=lastData.replace(new RegExp(rolename,'g'),element.label);
lastData = lastData.replace(new RegExp(rolename, 'g'), element.label);
}
});
lastData=JSON.parse(lastData);
this.memberList=lastData;
lastData = JSON.parse(lastData);
this.memberList = lastData;
this.getDeviceCode();
this.resetDisabled();
this.initCommandActionData();
}).catch(error => {})
}).catch(error => {});
},
changeRole(index){
let role=this.orginMemberList.find(elem=>{return elem.id==index}).role;
let data={role:role};
changeRole(index) {
const role = this.orginMemberList.find(elem=>{ return elem.id == index; }).role;
const data = {role:role};
getAvailableDeviceCommand(data).then(response=>{
if(Cookies.get("user_lang")=="en"){
let tempData=response.data;
if (Cookies.get('user_lang') == 'en') {
const tempData = response.data;
tempData.forEach( element => {
switch(element.deviceCommand){
case "Train_Manual_Limit_Drive":{
element.label="Confirm to run to the front station";
switch (element.deviceCommand) {
case 'Train_Manual_Limit_Drive': {
element.label = 'Confirm to run to the front station';
break;
}
case "Train_Manual_Route_Blocking_Drive":{
element.label="Drive as the route block method";
case 'Train_Manual_Route_Blocking_Drive': {
element.label = 'Drive as the route block method';
break;
}
}
});
this.deviceCommandList=tempData;
}else{
this.deviceCommandList=response.data;
this.deviceCommandList = tempData;
} else {
this.deviceCommandList = response.data;
}
if(response.data.length<=0)
{
this.commandData.action.deviceCommand="";
this.isJinLu=false;
if (response.data.length <= 0) {
this.commandData.action.deviceCommand = '';
this.isJinLu = false;
}
});
},
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;
})
getDeviceCode() {
const params = {deviceType:'StationStand'};
const 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;
});
},
addCommandAction(formName){
addCommandAction(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
let group=this.group;
this.commandData.action.type="Command";
if(this.commandData.action.deviceCommand=="Train_Manual_Route_Blocking_Drive")
{this.commandData.action.commandParamList=[this.commandData.param.startStation,this.commandData.param.endStation];}
let data=this.commandData.action;
let obj=this;
this.adding=true;
addScriptAction(group,data).then(response=>{
this.adding=false;
const group = this.group;
this.commandData.action.type = 'Command';
if (this.commandData.action.deviceCommand == 'Train_Manual_Route_Blocking_Drive') { this.commandData.action.commandParamList = [this.commandData.param.startStation, this.commandData.param.endStation]; }
const data = this.commandData.action;
const obj = this;
this.adding = true;
addScriptAction(group, data).then(response=>{
this.adding = false;
this.$message.success(this.$t('scriptRecord.addCommandSucess'));
this.$emit('create');
// this.$emit('create',[this.commandData.action.memberId]);
// this.$parent.$parent.$refs['addRole'].resetData([this.commandData.action.memberId]);
// this.initCommandActionData();
}).catch(error => {
this.adding=false;
this.adding = false;
this.$messageBox(`${this.$t('scriptRecord.addCommandFail')}: ${error.message}`);
});
}
else {
} else {
console.log('error submit!!');
return false;
}
});
},
addScriptActionInfo(formName){
addScriptActionInfo(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
let group=this.group;
this.modalData.actionVO.type="Conversation";
let data=this.modalData.actionVO;
let obj=this;
this.modifying=true;
if(this.operateType=="add")
{
addScriptAction(group,data).then(response=>{
this.modifying=false;
const group = this.group;
this.modalData.actionVO.type = 'Conversation';
const data = this.modalData.actionVO;
const obj = this;
this.modifying = true;
if (this.operateType == 'add') {
addScriptAction(group, data).then(response=>{
this.modifying = false;
this.$message.success(this.$t('scriptRecord.addConversitionSuccess'));
this.$emit('create');
// [this.modalData.actionVO.memberId]
// this.initActionData();
// this.$parent.$parent.$refs['addRole'].resetData([this.modalData.actionVO.memberId,this.modalData.actionVO.targetId]);
}).catch(error => {
this.modifying=false;
this.modifying = false;
this.$messageBox(`${this.$t('scriptRecord.addConversitionFail')}: ${error.message}`);
});
}
else
{
let actionId=this.modalData.actionVO.id;
modifyScriptAction(group,actionId,data).then(response=>{
this.modifying=false;
this.isNotModify=true;
this.$emit("setDisabled",this.isNotModify);
this.buttonName=this.$t('scriptRecord.addConversitionButton');
this.operateType="add";
} else {
const actionId = this.modalData.actionVO.id;
modifyScriptAction(group, actionId, data).then(response=>{
this.modifying = false;
this.isNotModify = true;
this.$emit('setDisabled', this.isNotModify);
this.buttonName = this.$t('scriptRecord.addConversitionButton');
this.operateType = 'add';
this.$message.success(this.$t('scriptRecord.modifyConversitionSuccess'));
this.$emit('create');
// this.$parent.$parent.$refs['addRole'].resetData([this.modalData.action.memberId,this.modalData.action.targetId]);
this.initActionData();
}).catch(error => {
this.modifying=false;
this.modifying = false;
this.$messageBox(`${this.$t('scriptRecord.modifyConversitionFail')}: ${error.message}`);
});
}
}
else {
} else {
console.log('error submit!!');
return false;
}
});
},
resetDisabled(){
if(this.$refs['modalData'])
{
resetDisabled() {
if (this.$refs['modalData']) {
this.$refs['modalData'].resetFields();
this.modalData.actionVO.type="Conversation";
this.modalData.actionVO.memberId="";
this.modalData.actionVO.targetId="";
this.modalData.actionVO.reply="";
this.modalData.actionVO.type = 'Conversation';
this.modalData.actionVO.memberId = '';
this.modalData.actionVO.targetId = '';
this.modalData.actionVO.reply = '';
}
},
clearValidate(){
if(this.$refs['commandData'])
{
clearValidate() {
if (this.$refs['commandData']) {
this.$refs['commandData'].clearValidate();
}
},
initActionData(){
initActionData() {
this.resetDisabled();
},
initCommandActionData(){
if(this.$refs['commandData'])
{
this.deviceCommandList=[];
initCommandActionData() {
if (this.$refs['commandData']) {
this.deviceCommandList = [];
this.$refs['commandData'].resetFields();
this.commandData.action.memberId="";
this.commandData.param.startStation="";
this.isJinLu=false;
this.commandData.param.endStation="";
this.commandData.action.memberId = '';
this.commandData.param.startStation = '';
this.isJinLu = false;
this.commandData.param.endStation = '';
}
},
changeCommand(index){
switch(index)
{
case "Train_Manual_Route_Blocking_Drive":{
this.isJinLu=true;
changeCommand(index) {
switch (index) {
case 'Train_Manual_Route_Blocking_Drive': {
this.isJinLu = true;
this.getDeviceCode();
this.clearValidate();
break;
}
default:{
this.isJinLu=false;
default: {
this.isJinLu = false;
this.clearValidate();
break;
}
}
},
changeItem(){
if(!(this.isPause&&this.isNotModify))
{
let temp=this.modalData.actionVO.memberId;
this.modalData.actionVO.memberId=this.modalData.actionVO.targetId;
this.modalData.actionVO.targetId=temp;
changeItem() {
if (!(this.isPause && this.isNotModify)) {
const temp = this.modalData.actionVO.memberId;
this.modalData.actionVO.memberId = this.modalData.actionVO.targetId;
this.modalData.actionVO.targetId = temp;
}
},
doShow(data){
if(data)
{
this.buttonName=this.$t('scriptRecord.modifyConversition');
this.operateType="modify";
doShow(data) {
if (data) {
this.buttonName = this.$t('scriptRecord.modifyConversition');
this.operateType = 'modify';
this.clearValidate();
this.isNotModify=false;
this.$emit("setDisabled",this.isNotModify);
this.isNotModify = false;
this.$emit('setDisabled', this.isNotModify);
// this.initData();
this.modalData.actionVO.id=data.id;
this.modalData.actionVO.memberId=data.memberId;
this.modalData.actionVO.type=data.type;
if(data.type=="Conversation")
{
this.isJinLu=false;
this.modalData.actionVO.targetId=data.targetId;
this.modalData.actionVO.reply=data.reply;
}
this.modalData.actionVO.id = data.id;
this.modalData.actionVO.memberId = data.memberId;
this.modalData.actionVO.type = data.type;
if (data.type == 'Conversation') {
this.isJinLu = false;
this.modalData.actionVO.targetId = data.targetId;
this.modalData.actionVO.reply = data.reply;
}
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";

View File

@ -42,41 +42,41 @@ export default {
},
methods: {
initData() {
const group=this.$props.group;
const group = this.$props.group;
getScriptMemberData(group).then(response=>{
const lastData=JSON.stringify(response.data);
this.allRoleData=this.coverData(lastData);
const lastData = JSON.stringify(response.data);
this.allRoleData = this.coverData(lastData);
getScriptPlayMember(group).then(response=>{
const last=response.data;
const last = response.data;
// let userdata=JSON.stringify(response.data)
// let reg=new RegExp('\"id\":\"(.*?)\\\"','g');
// let datalist=userdata.match(reg);
const data=[];
const data = [];
last.forEach(function(element) { data.push(element.id); });
this.selectRoleData=data;
this.selectRoleData = data;
});
});
},
coverData(data) {
const roleTypeList=ConstConfig.ConstSelect.roleType;
let lastData=data.replace(new RegExp('id', 'g'), 'key');
const roleTypeList = ConstConfig.ConstSelect.roleType;
let lastData = data.replace(new RegExp('id', 'g'), 'key');
roleTypeList.forEach(function(element) {
const rolename=element.value;
if (Cookies.get('user_lang')=='en') {
lastData=lastData.replace(new RegExp(rolename, 'g'), element.enLabel);
const rolename = element.value;
if (Cookies.get('user_lang') == 'en') {
lastData = lastData.replace(new RegExp(rolename, 'g'), element.enLabel);
} else {
lastData=lastData.replace(new RegExp(rolename, 'g'), element.label);
lastData = lastData.replace(new RegExp(rolename, 'g'), element.label);
}
});
lastData=JSON.parse(lastData);
lastData = JSON.parse(lastData);
return lastData;
},
handleChange(value, direction, movedKeys) {
switch (direction) {
case 'right': {
const group=this.$props.group;
const data=movedKeys;
const group = this.$props.group;
const data = movedKeys;
selectScriptMembers(group, data).then(response=>{
this.$message.success(this.$t('scriptRecord.selectScriptActorSuccess'));
this.$emit('refresh');
@ -88,8 +88,8 @@ export default {
break;
}
case 'left': {
const group=this.$props.group;
const data=movedKeys;
const group = this.$props.group;
const data = movedKeys;
cancleScriptMembers(group, data).then(response=>{
this.$emit('refresh');
this.$message.success(this.$t('scriptRecord.cancleScriptActorSuccess'));
@ -102,8 +102,8 @@ export default {
}
},
changeSex(event, id) {
const group=this.$props.group;
const data={'gender': event};
const group = this.$props.group;
const data = {'gender': event};
modifyScriptMemberSex(group, id, data).then(response=>{
this.$message.success(this.$t('scriptRecord.modifyScriptActorSexSuccess'));
})

View File

@ -57,7 +57,7 @@ export default {
actionInfoList: function(val) {
this.$nextTick(function() {
var div = this.$refs['elActionScrollbar'].$refs['wrap'];
div.scrollTop=this.$refs['elActionScrollbar'].wrap.scrollHeight;
div.scrollTop = this.$refs['elActionScrollbar'].wrap.scrollHeight;
});
}
},
@ -67,52 +67,52 @@ export default {
methods: {
loadInitData() {
// const group=this.$route.query.group;
const data={role: 'Driver'};
const data = {role: 'Driver'};
getAvailableDeviceCommand(data).then(response=>{
this.deviceCommandList=response.data;
this.deviceCommandList = response.data;
this.loadOtherData(this.$route.query);
});
},
loadOtherData(obj) {
const group=obj.group;
const group = obj.group;
getScriptRecord(group).then(response=>{
this.$store.dispatch('scriptRecord/updateBgSet', response.data.bgSet);
this.actionInfoList=[];
const roleTypeList=ConstConfig.ConstSelect.roleType;
this.actionInfoList = [];
const roleTypeList = ConstConfig.ConstSelect.roleType;
let memberVOList=JSON.stringify(response.data.memberVOList);
let memberVOList = JSON.stringify(response.data.memberVOList);
roleTypeList.forEach(function(element) {
const rolename=element.value;
memberVOList=memberVOList.replace(new RegExp(rolename, 'g'), element.label);
const rolename = element.value;
memberVOList = memberVOList.replace(new RegExp(rolename, 'g'), element.label);
});
memberVOList=JSON.parse(memberVOList);
const actionList=response.data.actionVOList;
memberVOList = JSON.parse(memberVOList);
const actionList = response.data.actionVOList;
actionList.forEach(element => {
const member=memberVOList.find(elem=>{ return elem.id==element.memberId; });
const member = memberVOList.find(elem=>{ return elem.id == element.memberId; });
const memberName=member.name?' - '+member.name:'';
const memberName = member.name ? ' - ' + member.name:'';
switch (element.type) {
case 'Conversation':
{
const target=memberVOList.find(elem=>{ return elem.id==element.targetId; });
const targetName=target.name?' - '+target.name:'';
this.actionInfoList.push({id: element.id, isCoversition: true, memberName: member.role+memberName, targetName: target.role+targetName, reply: element.reply, row: element, visible: true});
const target = memberVOList.find(elem=>{ return elem.id == element.targetId; });
const targetName = target.name ? ' - ' + target.name:'';
this.actionInfoList.push({id: element.id, isCoversition: true, memberName: member.role + memberName, targetName: target.role + targetName, reply: element.reply, row: element, visible: true});
break;
}
case 'Command':
{
const deviceCommand=this.deviceCommandList.find(elem=>{ return elem.deviceCommand==element.deviceCommand; });
const deviceCommand = this.deviceCommandList.find(elem=>{ return elem.deviceCommand == element.deviceCommand; });
switch (element.deviceCommand) {
case 'Train_Manual_Route_Blocking_Drive':
{
this.actionInfoList.push({id: element.id, isCoversition: false, memberName: member.role+memberName, command: deviceCommand.label, row: element, visible: false});
this.actionInfoList.push({id: element.id, isCoversition: false, memberName: member.role + memberName, command: deviceCommand.label, row: element, visible: false});
break;
}
case 'Train_Manual_Limit_Drive':
{
this.actionInfoList.push({id: element.id, isCoversition: false, memberName: member.role+memberName, command: deviceCommand.label, row: element, visible: false});
this.actionInfoList.push({id: element.id, isCoversition: false, memberName: member.role + memberName, command: deviceCommand.label, row: element, visible: false});
break;
}
}
@ -120,14 +120,14 @@ export default {
}
});
if (response.data.mapLocation) {
const mapLocation={'offsetX': response.data.mapLocation.x, 'offsetY': response.data.mapLocation.y, 'scaleRate': response.data.mapLocation.scale};
const mapLocation = {'offsetX': response.data.mapLocation.x, 'offsetY': response.data.mapLocation.y, 'scaleRate': response.data.mapLocation.scale};
this.$store.dispatch('scriptRecord/updateMapLocation', mapLocation);
}
this.loading=false;
this.loading = false;
});
},
deleteAction(row) {
const group=this.$props.group;
const group = this.$props.group;
deleteScriptAction(group, row).then(resp => {
this.reloadTable();
this.$message.success('删除行为动作成功');

View File

@ -1,12 +1,12 @@
<template>
<el-card v-loading="loading" class="map-list-main">
<div slot="header" class="clearfix">
<div v-loading="loading" class="joylink-card map-list-main">
<div class="clearfix">
<span>{{ $t('global.mapList') }}</span>
</div>
<div style="height: calc(100% - 47px);">
<filter-city v-if="project==='login'" ref="filerCity" filter-empty :query-function="queryFunction" :local-param-name="localParamName" @filterSelectChange="refresh" />
<el-input v-if="project==='login'" v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
<div style="height: 100%;">
<div style="height: calc(100% - 76px); overflow: auto;">
<el-tree
ref="tree"
:data="treeList"
@ -35,7 +35,7 @@
</div>
</div>
</el-card>
</div>
</template>
<script>
import { getPublishMapTree } from '@/api/management/mapprd';
@ -161,7 +161,7 @@ export default {
localStore.set('trainingPlatformRoute' + this.userId, path);
},
forTree(item) {
item.children.forEach(childrenItem => {
item.children && item.children.forEach(childrenItem => {
childrenItem.key = childrenItem.id + childrenItem.type;
if (childrenItem.children && childrenItem.children.length) {
this.forTree(childrenItem);
@ -193,7 +193,7 @@ export default {
});
} catch (error) {
this.loading = false;
this.$messageBox(this.$t('error.refreshFailed'));
this.$messageBox(this.$t('error.refreshFailed') + error);
}
},
nodeExpand(obj, node, ele) {
@ -218,6 +218,11 @@ export default {
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.clearfix{
height: 47px;
line-height: 47px;
padding-left: 17px;
}
.back-home {
float: right;
cursor: pointer;

View File

@ -1,14 +1,12 @@
<template>
<div class="app-wrapper">
<el-scrollbar wrap-class="scrollbar-wrapper">
<div v-show="listShow" class="examList" :style="{width: widthLeft+'px'}">
<demon-list ref="demonList" :height="height" @goRoutePath="goRoutePath" />
</div>
<drap-left :width-left="widthLeft" @drapWidth="drapWidth" />
<transition>
<router-view :style="{ position:'relative', left:widthLeft+'px', width: (width - widthLeft)+'px'}" :product-list="productList" />
<router-view :product-list="productList" />
</transition>
</el-scrollbar>
</div>
</template>
@ -90,9 +88,8 @@ export default {
}
.examList {
position: fixed;
top: 61px;
height: 100%;
float: left;
}
/deep/ .scrollbar-wrapper{
overflow-x: hidden;