This commit is contained in:
fan 2020-03-27 17:26:39 +08:00
commit c30eae5b1e
45 changed files with 661 additions and 239 deletions

View File

@ -1,6 +1,6 @@
import request from '@/utils/request'; import request from '@/utils/request';
/** 开始实训*/ /** 开始实训 0*/
export function startTraining(args, group) { export function startTraining(args, group) {
return request({ return request({
url: `/api/training/${args.id}/start`, url: `/api/training/${args.id}/start`,
@ -35,8 +35,7 @@ export function sendTrainingNextStep(data, group) {
} }
}); });
} }
/** 获取章节基本信息 0*/
/** 获取章节基本信息*/
export function getTrainingDetail(trainingId) { export function getTrainingDetail(trainingId) {
return request({ return request({
url: `/api/training/${trainingId}`, url: `/api/training/${trainingId}`,
@ -44,7 +43,7 @@ export function getTrainingDetail(trainingId) {
}); });
} }
/** 添加实训*/ /** 添加实训 0*/
export function addTraining(data) { export function addTraining(data) {
return request({ return request({
url: '/api/training', url: '/api/training',
@ -53,7 +52,7 @@ export function addTraining(data) {
}); });
} }
/** 获取实训步骤数据*/ /** 获取实训步骤数据 0*/
export function getTrainingStepsDetail(trainingId, params) { export function getTrainingStepsDetail(trainingId, params) {
return request({ return request({
url: `/api/training/${trainingId}/detail`, url: `/api/training/${trainingId}/detail`,
@ -62,7 +61,7 @@ export function getTrainingStepsDetail(trainingId, params) {
}); });
} }
/** 查询实训列表*/ /** 查询实训列表 0*/
export function pageQueryTraining(params) { export function pageQueryTraining(params) {
return request({ return request({
url: `/api/training/pagedQuery`, url: `/api/training/pagedQuery`,
@ -70,8 +69,7 @@ export function pageQueryTraining(params) {
params: params params: params
}); });
} }
/** 自动生成实训操作 0*/
/** 自动生成实训操作*/
export function addAutoTraining(data) { export function addAutoTraining(data) {
return request({ return request({
url: `/api/training/generate`, url: `/api/training/generate`,
@ -80,7 +78,7 @@ export function addAutoTraining(data) {
}); });
} }
/** 修改自动删除实训操作*/ /** 修改自动删除实训操作 0*/
export function updateAutoTraining(data) { export function updateAutoTraining(data) {
return request({ return request({
url: `/api/training/batchUpdateGenerate`, url: `/api/training/batchUpdateGenerate`,
@ -88,8 +86,7 @@ export function updateAutoTraining(data) {
data: data data: data
}); });
} }
/** 删除自动生成实训 0*/
/** 删除自动生成实训*/
export function deleteAutoTraining(params) { export function deleteAutoTraining(params) {
return request({ return request({
url: `/api/training/generate`, url: `/api/training/generate`,
@ -98,7 +95,7 @@ export function deleteAutoTraining(params) {
}); });
} }
/** 获取用户实训列表*/ /** 获取用户实训列表 0*/
export function getTrainingList(data) { export function getTrainingList(data) {
return request({ return request({
url: `/api/training/list`, url: `/api/training/list`,
@ -128,15 +125,7 @@ export function sendCommandNew(group, commandDefinitionId, command) {
data: command data: command
}); });
} }
// 添加用户实训数据 0
export function updateLesson(data) {
return request({
url: `/api/training/userTraining/${data.id}`,
method: 'put',
data: data
});
}
// 添加用户实训数据
export function addUserTraining(data) { export function addUserTraining(data) {
return request({ return request({
url: `/api/training/userTraining`, url: `/api/training/userTraining`,
@ -144,7 +133,7 @@ export function addUserTraining(data) {
data: data data: data
}); });
} }
// 更新用户实训数据 // 更新用户实训数据 0
export function putUserTraining(data) { export function putUserTraining(data) {
return request({ return request({
url: `/api/training/userTraining/${data.id}`, url: `/api/training/userTraining/${data.id}`,
@ -152,10 +141,125 @@ export function putUserTraining(data) {
data: data data: data
}); });
} }
// 清除实训数据 // 清除实训数据 0
export function deleteUserTraining(statsId) { export function deleteUserTraining(statsId) {
return request({ return request({
url: `/api/training/userTraining/${statsId}`, url: `/api/training/userTraining/${statsId}`,
method: 'delete' method: 'delete'
}); });
} }
/** 开始实训 (新版地图) */
export function startTrainingNew (args, group) {
return request({
url: `/api/v1/training/${args.id}/start`,
method: 'get',
params: {group}
});
}
/** 实训结束(新版地图) */
export function endTrainingNew(args, group) {
return request({
url: `/api/v1/training/${args.lessonId}/${args.id}/end`,
method: 'get',
params: {
mode: args.mode,
usedTime: args.usedTime,
group
}
});
}
/** 发送步骤数据 (新版地图) */
export function sendTrainingNextStepNew(data, group) {
return request({
url: `/api/v1/training/${data.trainingId}/nextStep`,
method: 'post',
data: data.operate,
params: {group}
});
}
/** 获取章节基本信息(新版地图) */
export function getTrainingDetailNew(trainingId) {
return request({
url: `/api/v1/training/${trainingId}`,
method: 'get'
});
}/** 添加实训(新版地图) */
export function addTrainingNew(data) {
return request({
url: '/api/v1/training',
method: 'post',
data: data
});
}
/** 获取实训步骤数据(新版地图) */
export function getTrainingStepsDetailNew(trainingId, params) {
return request({
url: `/api/v1/training/${trainingId}/detail`,
method: 'get',
params: params
});
}
/** 查询实训列表(新版地图)*/
export function pageQueryTrainingNew(params) {
return request({
url: `/api/v1/training/pagedQuery`,
method: 'get',
params: params
});
}
/** 自动生成实训操作(新版地图) */
export function addAutoTrainingNew(data) {
return request({
url: '/api/v1/training/generate',
method: 'post',
data: data
});
}
/** 修改自动删除实训操作(新版地图) */
export function updateAutoTrainingNew(data) {
return request({
url: `/api/v1/training/batchUpdateGenerate`,
method: 'put',
data: data
});
}
/** 删除自动生成实训(新版地图) */
export function deleteAutoTrainingNew(params) {
return request({
url: `/api/v1/training/generate`,
method: 'delete',
params: params
});
}
/** 获取用户实训列表(新版) */
export function getTrainingListNew(data) {
return request({
url: `/api/v1/training/list`,
method: 'get',
params: data
});
}
/** 添加用户实训数据 */
export function addUserTrainingNew(data) {
return request({
url: `/api/v1/training/userTraining`,
method: 'post',
data:data
});
}
/** 更新用户实训数据 */
export function putUserTrainingNew(data) {
return request({
url: `/api/v1/training/userTraining/${data.id}`,
method: 'put',
data: data
});
}
/** 清除实训数据 */
export function deleteUserTrainingNew(statsId) {
return request({
url: `/api/v1/training/userTraining/${statsId}`,
method: 'delete'
});
}

View File

@ -86,7 +86,13 @@ export function trainingNotify({ trainingId }) {
method: 'get' method: 'get'
}); });
} }
/** 实训系统(新版地图) */
export function trainingNotifyNew({ trainingId }) {
return request({
url: `/simulation/training/${trainingId}`,
method: 'get'
});
}
/** /**
* 考试系统CBTC * 考试系统CBTC
* @param {*} data * @param {*} data
@ -97,7 +103,13 @@ export function examNotify({ examId }) {
method: 'get' method: 'get'
}); });
} }
/** 考试系统(新版地图)*/
export function examNotifyNew({ examId }) {
return request({
url: `/simulation/exam/${examId}`,
method: 'get'
});
}
/** 获取用户实训列表*/ /** 获取用户实训列表*/
export function getSimulationList(data) { export function getSimulationList(data) {
return request({ return request({
@ -157,6 +169,14 @@ export function scriptRecordNotify(scriptId) {
}); });
} }
/** 录制脚本仿真(新版)*/
export function scriptRecordNotifyNew(scriptId) {
return request({
url: `/api/scriptSimulation/${scriptId}/scriptWrite`,
method: 'get'
});
}
/** 保存剧本背景*/ /** 保存剧本背景*/
export function saveScriptScenes(group) { export function saveScriptScenes(group) {
return request({ return request({
@ -189,6 +209,13 @@ export function getScriptMemberData(group) {
method: 'get' method: 'get'
}); });
} }
/** 获取剧本编制的所有成员角色(新版地图)*/
export function getScriptMemberDataNew(group) {
return request({
url: `/api/scriptSimulation/${group}/allMember`,
method: 'get'
});
}
/** 获取剧本出演成员角色 */ /** 获取剧本出演成员角色 */
export function getScriptPlayMember(group) { export function getScriptPlayMember(group) {
@ -198,6 +225,14 @@ export function getScriptPlayMember(group) {
}); });
} }
/** 获取剧本出演成员角色(新版地图) */
export function getScriptPlayMemberNew(group) {
return request({
url: `/api/scriptSimulation/${group}/allPlayer`,
method: 'get'
});
}
/** 取消剧本演出成员角色 */ /** 取消剧本演出成员角色 */
export function cancleScriptMembers(group, data) { export function cancleScriptMembers(group, data) {
return request({ return request({
@ -207,6 +242,15 @@ export function cancleScriptMembers(group, data) {
}); });
} }
/** 取消剧本演出成员角色 */
export function cancleScriptMembersNew(group, data) {
return request({
url: `/api/scriptSimulation/${group}/removePlayers`,
method: 'put',
data
});
}
/** 选择剧本演出成员角色 */ /** 选择剧本演出成员角色 */
export function selectScriptMembers(group, data) { export function selectScriptMembers(group, data) {
return request({ return request({
@ -216,6 +260,15 @@ export function selectScriptMembers(group, data) {
}); });
} }
/** 选择剧本演出成员角色 (新版地图)*/
export function selectScriptMembersNew(group, data) {
return request({
url: `/api/scriptSimulation/${group}/choosePlayers`,
method: 'put',
data
});
}
/** 修改剧本演出成员性别 */ /** 修改剧本演出成员性别 */
export function modifyScriptMemberSex(group, playerId, data) { export function modifyScriptMemberSex(group, playerId, data) {
return request({ return request({

View File

@ -44,7 +44,7 @@ class EDetain extends Group {
showMode() { showMode() {
this.create(); this.create();
this.detain.show(); this.detain && this.detain.show();
} }
} }

View File

@ -134,15 +134,6 @@ export default {
time: '' time: ''
}; };
}, },
watch: {
//
tempData: {
handler(val, oldVal) {
this.checkTableDataSelction(val);
},
deep: true
}
},
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', [
'stationList', 'stationList',
@ -177,21 +168,30 @@ export default {
'3': [], // 80 - 70 '3': [], // 80 - 70
'4': [] // 60 - 50 '4': [] // 60 - 50
}; };
for (var i = 110; i <= 120; i++) { for (let i = 110; i <= 120; i++) {
list['1'].push({ value: i, label: `${i}` }); list['1'].push({ value: i, label: `${i}` });
} }
for (var i = 90; i <= 100; i++) { for (let i = 90; i <= 100; i++) {
list['2'].push({ value: i, label: `${i}` }); list['2'].push({ value: i, label: `${i}` });
} }
for (var i = 70; i <= 80; i++) { for (let i = 70; i <= 80; i++) {
list['3'].push({ value: i, label: `${i}` }); list['3'].push({ value: i, label: `${i}` });
} }
for (var i = 50; i <= 60; i++) { for (let i = 50; i <= 60; i++) {
list['4'].push({ value: i, label: `${i}` }); list['4'].push({ value: i, label: `${i}` });
} }
return list; return list;
} }
}, },
watch: {
//
tempData: {
handler(val, oldVal) {
this.checkTableDataSelction(val);
},
deep: true
}
},
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
@ -207,21 +207,21 @@ export default {
}, },
loadInitData(selected, opts) { loadInitData(selected, opts) {
this.tempData = []; this.tempData = [];
const stationList = this.stationList.slice(); // const stationList = this.stationList.slice();
const index = this.stationList.findIndex(n => n.code == selected.stationCode); const index = this.stationList.findIndex(n => n.code == selected.stationCode);
if (selected.direction == '01') { // if (selected.direction == '01') { //
// //
if (index != 0) { if (index != 0) {
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code); const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode); const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus }); this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: opts.intervalRunTime ? this.getLevelByTime(opts.intervalRunTime) : '0', time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
} }
} else { } else {
// //
if (index != this.stationList.length) { if (index != this.stationList.length) {
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code); const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode); const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus }); this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: opts.intervalRunTime ? this.getLevelByTime(opts.intervalRunTime) : '0', time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
} }
} }
}, },

View File

@ -197,14 +197,14 @@ export default {
if (index != 0) { if (index != 0) {
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code); const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode); const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus }); this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: opts.intervalRunTime ? this.getLevelByTime(opts.intervalRunTime) : '0', time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
} }
} else { } else {
// //
if (index != this.stationList.length) { if (index != this.stationList.length) {
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code); const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode); const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus }); this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: opts.intervalRunTime ? this.getLevelByTime(opts.intervalRunTime) : '0', time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
} }
} }
}, },
@ -245,7 +245,8 @@ export default {
}, },
timeSelectChange(time) { timeSelectChange(time) {
const operate = { const operate = {
operation: OperationEvent.StationStand.setRunLevel.choose.operation operation: OperationEvent.StationStand.setRunLevel.choose.operation,
val: time.toString()
}; };
this.time = time.toString(); this.time = time.toString();
@ -258,11 +259,12 @@ export default {
}); });
}, },
levelSelectChange(row) { levelSelectChange(row) {
this.time = row.time = this.timeList[row.level][0].value;
const operate = { const operate = {
operation: OperationEvent.StationStand.setRunLevel.chooseLevel.operation operation: OperationEvent.StationStand.setRunLevel.chooseLevel.operation,
val: this.time
}; };
this.time = row.time = this.timeList[row.level][0].value;
this.isSelect = false; this.isSelect = false;
this.isConfirm = true; this.isConfirm = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
@ -273,7 +275,8 @@ export default {
}, },
checkChange(check) { checkChange(check) {
const operate = { const operate = {
operation: OperationEvent.StationStand.setRunLevel.check.operation operation: OperationEvent.StationStand.setRunLevel.check.operation,
val: check
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {

View File

@ -16,7 +16,7 @@ function hasPermission(roles, permissionRoles) {
const whiteList = ['/login', '/design/login', '/xty/login', '/designxty/login', '/gzb/login', '/designgzb/login', '/jlmap3d/devicetrain', '/hyd/login']; // 不重定向白名单 const whiteList = ['/login', '/design/login', '/xty/login', '/designxty/login', '/gzb/login', '/designgzb/login', '/jlmap3d/devicetrain', '/hyd/login']; // 不重定向白名单
const designPageRegex = [/^\/design/, /^\/scriptDisplay/, /^\/publish/, /^\/orderauthor/, /^\/system/, /^\/iscs/, /^\/display\/record/, /^\/display\/manage/, /^\/apply/, /^\/plan/, /^\/display\/plan/]; const designPageRegex = [/^\/design/, /^\/scriptDisplay/, /^\/publish/, /^\/orderauthor/, /^\/system/, /^\/iscs/, /^\/display\/record/, /^\/display\/manage/, /^\/apply/, /^\/plan/, /^\/display\/plan/, /^\/displayNew\/record/, /^\/displayNew\/manage/, /^\/displayNew\/plan/];
function isDesignPage(toRoutePath) { function isDesignPage(toRoutePath) {
return designPageRegex.some(item => { return designPageRegex.some(item => {

View File

@ -57,6 +57,7 @@ const LessonDetail = () => import('@/views/lesson/details');
const ScriptmanageHome = () => import('@/views/scriptManage/home'); const ScriptmanageHome = () => import('@/views/scriptManage/home');
const ScriptDisplay = () => import('@/views/scriptManage/display/index'); const ScriptDisplay = () => import('@/views/scriptManage/display/index');
const ScriptDisplayNew = () => import('@/views/scriptManage/display/indexNew');
const IbpHome = () => import('@/views/ibp/home'); const IbpHome = () => import('@/views/ibp/home');
const IbpDraw = () => import('@/views/ibp/ibpDraw/index'); const IbpDraw = () => import('@/views/ibp/ibpDraw/index');
@ -154,6 +155,7 @@ export const UrlConfig = {
display: '/display', display: '/display',
displayNew: '/displayNew', displayNew: '/displayNew',
scriptDisplay: '/scriptDisplay', scriptDisplay: '/scriptDisplay',
scriptDisplayNew:'/scriptDisplayNew',
examRuleDraft: '/examRule/draft', examRuleDraft: '/examRule/draft',
examRuleManage: '/examRule/manage', examRuleManage: '/examRule/manage',
lesson: { lesson: {
@ -517,6 +519,13 @@ export const asyncRouter = [
}, },
hidden: true hidden: true
}, },
{ // 剧本编辑 战场图
path: '/scriptDisplayNew/:mode',
component: ScriptDisplayNew,
meta: {
},
hidden: true
},
{ {
path: '/displayIscs/system', path: '/displayIscs/system',
component: IscsSystem, component: IscsSystem,

View File

@ -87,7 +87,15 @@ export default {
{label: '司机', value: 'Driver', enLabel: 'Driver '}, {label: '司机', value: 'Driver', enLabel: 'Driver '},
{label: '通号', value: 'Repair', enLabel: 'Repairman '} {label: '通号', value: 'Repair', enLabel: 'Repairman '}
], ],
roleTypeNew:[
{label: '管理员', value: 'ADMIN', enLabel: 'Admin '},
// {label: '教员', value: 'Instructor', enLabel: 'Instructor '},
{label: '行调', value: 'DISPATCHER', enLabel: 'Dispatcher '},
{label: '行值', value: 'STATION_SUPERVISOR', enLabel: 'Attendant '},
{label: '观众', value: 'AUDIENCE', enLabel: 'Audience '},
{label: '司机', value: 'DRIVER', enLabel: 'Driver '},
{label: '通号', value: 'MAINTAINER', enLabel: 'Repairman '}
],
SimulationType: [ SimulationType: [
{ label: '实训', value: 'Training'}, { label: '实训', value: 'Training'},
{ label: '仿真(行调/现地/司机)', value: 'Simulation'}, { label: '仿真(行调/现地/司机)', value: 'Simulation'},

View File

@ -2782,5 +2782,26 @@ export const OperationList = {
] ]
} }
] ]
},
'06': { // 宁波一号线
list: [
{
maxDuration: 15,
minDuration: 8,
operateType: '0509',
skinCode: '03',
trainingName: '运行时间控制({10}-{12} 站台)',
trainingRemark: '运行时间控制(设置区间 运行等级1运行时间为115一直有效)',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置运行等级】' },
{ deviceType: '06', orderNum: 2, operateCode: '5104', tip: '鼠标左键点击选择【1】', val: '1' },
{ deviceType: '06', orderNum: 3, operateCode: '5101', tip: '鼠标左键点击选择【115】', val: '115' },
{ deviceType: '06', orderNum: 4, operateCode: '5103', tip: '鼠标左键点击,选择【一直有效】', val: 'true' },
{ deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '115::true' }
]
}
]
} }
}; };

View File

@ -3,7 +3,7 @@ import router from '@/router';
import CommandHandler from './CommandHandler.js'; import CommandHandler from './CommandHandler.js';
import ValidateHandler from './ValidateHandler.js'; import ValidateHandler from './ValidateHandler.js';
import { State2SimulationMap } from './Config.js'; import { State2SimulationMap } from './Config.js';
import { sendTrainingNextStep } from '@/api/jmap/training'; import { sendTrainingNextStepNew } from '@/api/jmap/training';
import { getCmdList } from '@/api/management/dictionary'; import { getCmdList } from '@/api/management/dictionary';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
@ -36,7 +36,7 @@ class Handler {
const basicInfo = store.getters['training/basicInfo']; const basicInfo = store.getters['training/basicInfo'];
if (basicInfo.id && valid) { if (basicInfo.id && valid) {
const group = router.currentRoute.query.group; const group = router.currentRoute.query.group;
sendTrainingNextStep({ trainingId: basicInfo.id, operation: operation }, group); sendTrainingNextStepNew({ trainingId: basicInfo.id, operation: operation }, group);
} }
if (!valid) { if (!valid) {

View File

@ -52,6 +52,9 @@ class ValidateHandler {
const order = Handler.getOrder(); const order = Handler.getOrder();
let valid = false; let valid = false;
if (operate.over) { // 最后一步不用校验 只校验之前的步骤信息 最后直接发送就可以
valid = true;
} else {
if (order < steps.length) { if (order < steps.length) {
const standard = steps[order]; const standard = steps[order];
if (operate && standard && if (operate && standard &&
@ -61,6 +64,7 @@ class ValidateHandler {
valid = true; valid = true;
} }
} }
}
return valid; return valid;
} }

View File

@ -93,6 +93,7 @@ OperateHandler.prototype = {
const basicInfo = store.getters['training/basicInfo']; const basicInfo = store.getters['training/basicInfo'];
if (basicInfo.id && valid) { if (basicInfo.id && valid) {
const group = router.currentRoute.query.group; const group = router.currentRoute.query.group;
console.log('--------------------------');
sendTrainingNextStep({ trainingId: basicInfo.id, operate: operate }, group); sendTrainingNextStep({ trainingId: basicInfo.id, operate: operate }, group);
} }

View File

@ -3,11 +3,11 @@ export function getBaseUrl() {
let BASE_API; let BASE_API;
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud'; // 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.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'; // 张赛 // BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康 BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛

View File

@ -90,12 +90,12 @@ export default {
switch (obj.type) { switch (obj.type) {
case 'scriptDesign': { case 'scriptDesign': {
setSessionStorage('designType', 'scriptDesign'); setSessionStorage('designType', 'scriptDesign');
this.$router.push({ path: `${UrlConfig.design.scriptHome}/${obj.mapId}?lineCode=${obj.lineCode}` }); this.$router.push({ path: `${UrlConfig.design.scriptHome}/${obj.mapId}?lineCode=${obj.lineCode}&drawWay=${obj.drawWay}` });
break; break;
} }
case 'lessonDesign': { case 'lessonDesign': {
setSessionStorage('designType', 'lessonDesign'); setSessionStorage('designType', 'lessonDesign');
this.$router.push({ path: `${UrlConfig.design.lessonHome}/${obj.mapId}`, query: {cityCode: obj.cityCode} }); this.$router.push({ path: `${UrlConfig.design.lessonHome}/${obj.mapId}?lineCode=${obj.lineCode}&cityCode=${obj.cityCode}&drawWay=${data.parent.data.drawWay}` });
break; break;
} }
case 'runPlanDesign': { case 'runPlanDesign': {
@ -144,7 +144,7 @@ export default {
drawWay: elem.drawWay drawWay: elem.drawWay
} }
]; ];
this.isAdministrator() ? elem.children.push({id: '2', name: this.$t('designPlatform.lessonDesign'), type: 'lessonDesign', mapId: elem.id, cityCode: elem.cityCode}) : ''; this.isAdministrator() ? elem.children.push({id: '2', name: this.$t('designPlatform.lessonDesign'), type: 'lessonDesign', mapId: elem.id, cityCode: elem.cityCode, lineCode: elem.lineCode}) : '';
elem.children.push( elem.children.push(
{ {
id: '3', id: '3',
@ -152,7 +152,8 @@ export default {
type: 'scriptDesign', type: 'scriptDesign',
mapId: elem.id, mapId: elem.id,
cityCode: elem.cityCode, cityCode: elem.cityCode,
lineCode: elem.lineCode lineCode: elem.lineCode,
drawWay: elem.drawWay
// code:elem.children.find(n => { return n.name.includes("")}) // code:elem.children.find(n => { return n.name.includes("")})
}); });
elem.children.push( elem.children.push(

View File

@ -5,7 +5,7 @@
</template> </template>
<script> <script>
import JlmapVisual from '@/views/newMap/jlmapNew/index'; import JlmapVisual from '@/views/newMap/jlmapNew/index';
import { loadMapDataById } from '@/utils/loaddata'; import { loadNewMapDataByGroup } from '@/utils/loaddata';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
export default { export default {
@ -60,17 +60,17 @@ export default {
}, },
methods: { methods: {
async initLoadData() { // async initLoadData() { //
if (parseInt(this.mapId)) { if (this.group) {
await this.loadMapDataById(this.mapId); await this.loadNewMapDataByGroup(this.group);
} else { } else {
this.endViewLoading(); this.endViewLoading();
} }
}, },
// id // id
async loadMapDataById(mapId) { async loadNewMapDataByGroup(group) {
try { try {
await this.$store.dispatch('training/changeMode', { mode: null }); await this.$store.dispatch('training/changeMode', { mode: null });
loadMapDataById(mapId).then(()=>{ loadNewMapDataByGroup(group).then(()=>{
this.$store.dispatch('training/over'); this.$store.dispatch('training/over');
this.$store.dispatch('training/setMapDefaultState'); this.$store.dispatch('training/setMapDefaultState');
this.$store.dispatch('map/clearJlmapTrainView'); this.$store.dispatch('map/clearJlmapTrainView');

View File

@ -49,7 +49,7 @@
</div> </div>
</template> </template>
<script> <script>
import { examNotify } from '@/api/simulation'; import { examNotify, examNotifyNew } from '@/api/simulation';
import { getExamLessonDetail } from '@/api/management/exam'; import { getExamLessonDetail } from '@/api/management/exam';
import { generateExamList } from '@/api/management/userexam'; import { generateExamList } from '@/api/management/userexam';
import { getPublishLessonDetail } from '@/api/jmap/lesson'; import { getPublishLessonDetail } from '@/api/jmap/lesson';
@ -59,6 +59,7 @@ import { mapGetters } from 'vuex';
import { launchFullscreen } from '@/utils/screen'; import { launchFullscreen } from '@/utils/screen';
import { UrlConfig } from '@/router/index'; import { UrlConfig } from '@/router/index';
import LangStorage from '@/utils/lang'; import LangStorage from '@/utils/lang';
import { getPublishMapInfo } from '@/api/jmap/map';
export default { export default {
name: 'ExamDetailView', name: 'ExamDetailView',
@ -79,7 +80,8 @@ export default {
}, },
typeList: [], typeList: [],
examList: [], examList: [],
trainingOperateTypeMap: {} trainingOperateTypeMap: {},
drawWay: false
}; };
}, },
computed: { computed: {
@ -157,6 +159,13 @@ export default {
}, },
async loadInitPage(examId) { async loadInitPage(examId) {
if (examId) { if (examId) {
getPublishMapInfo(this.$route.query.mapId).then(res => {
if (res.data) {
this.drawWay = res.data.drawWay;
}
}).catch(() => {
this.$message.error(this.$t('error.getMapDataFailed'));
});
const res = await getExamLessonDetail(examId); const res = await getExamLessonDetail(examId);
this.examDetails = res.data; this.examDetails = res.data;
this.examDetails.examDefinitionRulesVOList.forEach((res, index) => { this.examDetails.examDefinitionRulesVOList.forEach((res, index) => {
@ -175,7 +184,6 @@ export default {
} }
}); });
}); });
} }
}, },
buy() { buy() {
@ -220,7 +228,7 @@ export default {
async exmaStart() { async exmaStart() {
this.disabled = true; this.disabled = true;
await this.examDetail(); await this.examDetail();
if (this.examList.length) { if (this.examList.length && !this.drawWay) {
examNotify({ examId: this.$route.params.examId }).then(resp => { examNotify({ examId: this.$route.params.examId }).then(resp => {
const query = { const query = {
group: resp.data, group: resp.data,
@ -237,6 +245,23 @@ export default {
this.disabled = false; this.disabled = false;
this.$messageBox( this.$t('error.createSimulationFailed') + `: ${error.message}`); this.$messageBox( this.$t('error.createSimulationFailed') + `: ${error.message}`);
}); });
} else if (this.examList.length && this.drawWay) {
examNotifyNew({ examId: this.$route.params.examId }).then(resp => {
const query = {
group: resp.data,
trainingId: this.examList[0].trainingId,
userExamId: this.userExam.id,
examQuestionId: this.examList[0].id,
subSystem: this.$route.query.subSystem,
examId: this.$route.params.examId,
mapId: this.$route.query.mapId
};
this.$router.push({ path: `${UrlConfig.display}/exam`, query: query });
launchFullscreen();
}).catch(error => {
this.disabled = false;
this.$messageBox( this.$t('error.createSimulationFailed') + `: ${error.message}`);
});
} else { } else {
this.disabled = false; this.disabled = false;
} }

View File

@ -62,7 +62,7 @@ export default {
return ['ibp', (Math.random().toFixed(5)) * 100000].join('_'); return ['ibp', (Math.random().toFixed(5)) * 100000].join('_');
}, },
drawWay() { drawWay() {
return this.$route.query.drawWay; return this.$route.query.drawWay + '';
} }
}, },
watch: { watch: {
@ -241,7 +241,7 @@ export default {
back() { back() {
this.group = this.$route.query.group; this.group = this.$route.query.group;
this.$store.dispatch('training/over').then(() => { this.$store.dispatch('training/over').then(() => {
if (this.drawWay) { if (this.drawWay === 'true') {
putJointTrainingSimulationUserNew(this.group).then(() => { putJointTrainingSimulationUserNew(this.group).then(() => {
this.$router.replace({ path: `/trainroom`, query: { group: this.group, lineCode:this.$route.query.lineCode, drawWay: this.drawWay } }); this.$router.replace({ path: `/trainroom`, query: { group: this.group, lineCode:this.$route.query.lineCode, drawWay: this.drawWay } });
exitFullscreen(); exitFullscreen();

View File

@ -59,7 +59,7 @@ export default {
return ['iscs', (Math.random().toFixed(5)) * 100000].join('_'); return ['iscs', (Math.random().toFixed(5)) * 100000].join('_');
}, },
drawWay() { drawWay() {
return this.$route.query.drawWay; return this.$route.query.drawWay + '';
}, },
width() { width() {
return this.$store.state.config.width; return this.$store.state.config.width;
@ -175,7 +175,7 @@ export default {
back() { back() {
this.group = this.$route.query.group; this.group = this.$route.query.group;
this.$store.dispatch('training/over').then(() => { this.$store.dispatch('training/over').then(() => {
if (this.drawWay) { if (this.drawWay === 'true') {
putJointTrainingSimulationUserNew(this.group).then(() => { putJointTrainingSimulationUserNew(this.group).then(() => {
this.$router.replace({ path: `/trainroom`, query: { group: this.group, lineCode:this.$route.query.lineCode, drawWay: this.drawWay } }); this.$router.replace({ path: `/trainroom`, query: { group: this.group, lineCode:this.$route.query.lineCode, drawWay: this.drawWay } });
exitFullscreen(); exitFullscreen();

View File

@ -87,13 +87,13 @@ export default {
return data.name.indexOf(value) !== -1; return data.name.indexOf(value) !== -1;
}, },
editLesson() { editLesson() {
this.$router.push( {path: `/design/lesson/details/edit/lessonEdit`, query: {id: this.lessonId, cityCode: this.$route.query.cityCode, mapId: this.$route.query.mapId}} ); this.$router.push( {path: `/design/lesson/details/edit/lessonEdit`, query: {id: this.lessonId, cityCode: this.$route.query.cityCode, mapId: this.$route.query.mapId, drawWay: this.$route.query.drawWay}} );
}, },
createChapte(node) { createChapte(node) {
this.$router.push({path: `/design/lesson/details/edit/chapterCreate`, query: {id: node.data.id, type:node.data.type, lessonId: this.lessonId, cityCode: this.$route.query.cityCode, mapId: this.$route.query.mapId}}); this.$router.push({path: `/design/lesson/details/edit/chapterCreate`, query: {id: node.data.id, type:node.data.type, lessonId: this.lessonId, cityCode: this.$route.query.cityCode, mapId: this.$route.query.mapId, drawWay: this.$route.query.drawWay}});
}, },
updateChapte(node) { updateChapte(node) {
this.$router.push( {path: `/design/lesson/details/edit/chapterEdit`, query: {id: node.data.id, type:node.data.type, lessonId: this.lessonId, cityCode: this.$route.query.cityCode, mapId: this.$route.query.mapId}}); this.$router.push( {path: `/design/lesson/details/edit/chapterEdit`, query: {id: node.data.id, type:node.data.type, lessonId: this.lessonId, cityCode: this.$route.query.cityCode, mapId: this.$route.query.mapId, drawWay: this.$route.query.drawWay}});
}, },
showContextMenu(e, obj, node, vueElem) { showContextMenu(e, obj, node, vueElem) {
if (obj && obj.type === 'Lesson' || obj.type === 'Chapter') { if (obj && obj.type === 'Lesson' || obj.type === 'Chapter') {

View File

@ -209,10 +209,10 @@ export default {
this.$router.push({path: `${UrlConfig.design.taskManage}`, query: {mapId: this.$route.params.mapId}}); this.$router.push({path: `${UrlConfig.design.taskManage}`, query: {mapId: this.$route.params.mapId}});
}, },
trainingManage() { trainingManage() {
this.$router.push({path: `${UrlConfig.design.trainingManage}`, query: {mapId: this.$route.params.mapId}}); this.$router.push({path: `${UrlConfig.design.trainingManage}`, query: {mapId: this.$route.params.mapId, drawWay: this.$route.query.drawWay}});
}, },
operationManage() { operationManage() {
this.$router.push({path: `${UrlConfig.design.trainingRule}`, query: {mapId: this.$route.params.mapId}}); this.$router.push({path: `${UrlConfig.design.trainingRule}`, query: {mapId: this.$route.params.mapId, lineCode: this.$route.query.lineCode}});
}, },
revertLesson(index, row) { revertLesson(index, row) {
this.$confirm(this.$t('tip.cancelCoursePublicationHint'), this.$t('global.tips'), { this.$confirm(this.$t('tip.cancelCoursePublicationHint'), this.$t('global.tips'), {
@ -235,7 +235,7 @@ export default {
this.$refs.lessonDetail.show(row.id); this.$refs.lessonDetail.show(row.id);
}, },
goDetail(index, row) { goDetail(index, row) {
this.$router.push({path: `/design/lesson/details`, query: {lessonId: row.id, cityCode: this.$route.query.cityCode, mapId: this.$route.params.mapId}}); this.$router.push({path: `/design/lesson/details`, query: {lessonId: row.id, cityCode: this.$route.query.cityCode, mapId: this.$route.params.mapId, drawWay: this.$route.query.drawWay}});
} }
} }
}; };

View File

@ -217,7 +217,7 @@ export default {
}); });
}, },
back() { back() {
this.$router.push({ path: `${UrlConfig.design.lessonHome}/${this.$route.query.mapId}`, query: {cityCode: this.$route.query.cityCode} }); this.$router.push({ path: `${UrlConfig.design.lessonHome}/${this.$route.query.mapId}`, query: {cityCode: this.$route.query.cityCode, drawWay: this.$route.query.drawWay} });
} }
} }
}; };

View File

@ -15,7 +15,7 @@
<script> <script>
import ConstConfig from '@/scripts/ConstConfig'; import ConstConfig from '@/scripts/ConstConfig';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import { pageQueryTraining } from '@/api/jmap/training'; import { pageQueryTraining, pageQueryTrainingNew } from '@/api/jmap/training';
import { getPublishMapListOnline } from '@/api/jmap/map'; import { getPublishMapListOnline } from '@/api/jmap/map';
import localStore from 'storejs'; import localStore from 'storejs';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
@ -156,7 +156,12 @@ export default {
async queryFunction(params) { async queryFunction(params) {
params['mapId'] = this.detail.mapId; params['mapId'] = this.detail.mapId;
params['prdType'] = this.detail.prdType; params['prdType'] = this.detail.prdType;
const res = await pageQueryTraining(params); let res = '';
if ((this.$route.query.drawWay + '') === 'true') {
res = await pageQueryTrainingNew(params);
} else {
res = await pageQueryTraining(params);
}
this.trainings.forEach(ele => { this.trainings.forEach(ele => {
res.data.list.forEach(item => { res.data.list.forEach(item => {
if (item.id == ele.trainingId) { if (item.id == ele.trainingId) {

View File

@ -27,7 +27,7 @@ export default {
loading: false, loading: false,
dialogVisible: false, dialogVisible: false,
formModel: { formModel: {
skinCode: this.$route.query.mapId skinCode: this.$route.query.lineCode
}, },
skinCodeList: [], skinCodeList: [],
isShow: false isShow: false
@ -113,29 +113,26 @@ export default {
} }
}); });
}, },
create() { async create() {
const self = this;
this.loading = true; this.loading = true;
addTrainingRulesList( try {
this.formModel.mapId, OperationList[this.$route.query.lineCode].list.forEach(item => {
OperationList[this.formModel.mapId].list item.mapId = this.$route.query.mapId;
)
.then(response => {
self.loading = false;
self.$message.success(this.$t('lesson.batchCreateSuccess'));
self.handleClose();
self.$emit('reloadTable'); //
})
.catch(error => {
self.loading = false;
self.$message.error(
`${this.$('error.batchCreateFailed')}:${error.message}`
);
}); });
await addTrainingRulesList(this.$route.query.mapId, OperationList[this.$route.query.lineCode].list);
this.loading = false;
this.$message.success(this.$t('lesson.batchCreateSuccess'));
this.handleClose();
this.$emit('reloadTable'); //
} catch (error) {
console.log(error);
this.loading = false;
this.$message.error(this.$t('error.batchCreateFailed'));
}
}, },
handleClose() { handleClose() {
this.formModel = { this.formModel = {
skinCode: this.$route.query.mapId skinCode: this.$route.query.lineCode
}; };
this.$refs.dataform.resetForm(); this.$refs.dataform.resetForm();
this.isShow = false; this.isShow = false;

View File

@ -101,11 +101,6 @@ export default {
created() { created() {
this.dicId = this.$route.query.id; this.dicId = this.$route.query.id;
this.init(); this.init();
getOperateStepDataList(this.dicId).then(response => {
this.dic = response.data;
}).catch(error => {
this.$messageBox(error.message);
});
}, },
mounted() { mounted() {
}, },

View File

@ -147,7 +147,7 @@ export default {
], ],
actions: [ actions: [
{ text: this.$t('global.add'), handler: this.handleAdd }, { text: this.$t('global.add'), handler: this.handleAdd },
// { text: this.$t('lesson.generation'), handler: this.handleBatchAdd}, { text: this.$t('lesson.generation'), handler: this.handleBatchAdd},
{ text: this.$t('lesson.copy'), handler: this.handleSaveAs } { text: this.$t('lesson.copy'), handler: this.handleSaveAs }
] ]
}, },

View File

@ -65,7 +65,7 @@
<script> <script>
import ConstConfig from '@/scripts/ConstConfig'; import ConstConfig from '@/scripts/ConstConfig';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import { addAutoTraining, updateAutoTraining, deleteAutoTraining, addTraining } from '@/api/jmap/training'; import { addAutoTraining, updateAutoTraining, deleteAutoTraining, addTraining, addAutoTrainingNew, updateAutoTrainingNew, deleteAutoTrainingNew, addTrainingNew } from '@/api/jmap/training';
import { getOperateTrainingList } from '@/api/management/operation'; import { getOperateTrainingList } from '@/api/management/operation';
export default { export default {
@ -266,6 +266,21 @@ export default {
}, },
// //
handleDeal() { handleDeal() {
let addAutoTrainingFunction = '';
let updateAutoTrainingFunction = '';
let deleteAutoTrainingFunction = '';
let addTrainingFunction = '';
if ((this.$route.query.drawWay + '') === 'true') {
addAutoTrainingFunction = addAutoTrainingNew;
updateAutoTrainingFunction = updateAutoTrainingNew;
deleteAutoTrainingFunction = deleteAutoTrainingNew;
addTrainingFunction = addTrainingNew;
} else {
addAutoTrainingFunction = addAutoTraining;
updateAutoTrainingFunction = updateAutoTraining;
deleteAutoTrainingFunction = deleteAutoTraining;
addTrainingFunction = addTraining;
}
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
this.loading = true; this.loading = true;
@ -279,7 +294,7 @@ export default {
operateType: this.operateModel.operateType operateType: this.operateModel.operateType
}; };
addAutoTraining(data).then(response => { addAutoTrainingFunction(data).then(response => {
this.$message.success(this.$t('tip.automaticGenerationTrainingSuccess')); this.$message.success(this.$t('tip.automaticGenerationTrainingSuccess'));
this.$emit('refresh'); this.$emit('refresh');
this.close(); this.close();
@ -300,7 +315,7 @@ export default {
maxDuration: this.operateModel.maxDuration maxDuration: this.operateModel.maxDuration
}; };
updateAutoTraining(data).then(response => { updateAutoTrainingFunction(data).then(response => {
this.$message.success(this.$t('tip.updateAutomaticGenerationTrainingSuccess')); this.$message.success(this.$t('tip.updateAutomaticGenerationTrainingSuccess'));
this.$emit('refresh'); this.$emit('refresh');
this.close(); this.close();
@ -318,7 +333,7 @@ export default {
operateType: `${this.operateModel.operateType.join(',')}` operateType: `${this.operateModel.operateType.join(',')}`
}; };
deleteAutoTraining(data).then(response => { deleteAutoTrainingFunction(data).then(response => {
this.$message.success(this.$t('tip.deleteAutomaticGenerationTrainingSuccess')); this.$message.success(this.$t('tip.deleteAutomaticGenerationTrainingSuccess'));
this.$emit('refresh'); this.$emit('refresh');
this.close(); this.close();
@ -337,7 +352,7 @@ export default {
maxDuration: this.operateModel.maxDuration, maxDuration: this.operateModel.maxDuration,
remarks: this.operateModel.remarks remarks: this.operateModel.remarks
}; };
addTraining(data).then(response => { addTrainingFunction(data).then(response => {
this.$message.success(this.$t('tip.addTrainingSuccessfully')); this.$message.success(this.$t('tip.addTrainingSuccessfully'));
this.$emit('refresh'); this.$emit('refresh');
this.close(); this.close();

View File

@ -19,8 +19,8 @@
<script> <script>
import ConstConfig from '@/scripts/ConstConfig'; import ConstConfig from '@/scripts/ConstConfig';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import { pageQueryTraining } from '@/api/jmap/training'; import { pageQueryTraining, pageQueryTrainingNew } from '@/api/jmap/training';
import { trainingNotify } from '@/api/simulation'; import { trainingNotify, trainingNotifyNew } from '@/api/simulation';
import { launchFullscreen } from '@/utils/screen'; import { launchFullscreen } from '@/utils/screen';
import { getPublishMapListOnline } from '@/api/jmap/map'; import { getPublishMapListOnline } from '@/api/jmap/map';
import { UrlConfig } from '@/router/index'; import { UrlConfig } from '@/router/index';
@ -149,6 +149,9 @@ export default {
return Cookies.get('user_lang') == 'en' return Cookies.get('user_lang') == 'en'
? productTypeList.map(elem => { return { value: elem.value, label: elem.enlabel }; }) ? productTypeList.map(elem => { return { value: elem.value, label: elem.enlabel }; })
: productTypeList.map(elem => { return { value: elem.value, label: elem.label }; }); : productTypeList.map(elem => { return { value: elem.value, label: elem.label }; });
},
drawWay() {
return this.$route.query.drawWay + '';
} }
}, },
async created() { async created() {
@ -218,6 +221,16 @@ export default {
this.$refs.draftTrain.show({ event: '03', title: this.$t('lesson.deleteAutoGeneratedTraining') }); this.$refs.draftTrain.show({ event: '03', title: this.$t('lesson.deleteAutoGeneratedTraining') });
}, },
demoDisplay(index, node) { demoDisplay(index, node) {
if (this.drawWay === 'true') {
trainingNotifyNew({ trainingId: node.id }).then(resp => {
/** 区分演示和正式需要在演示时设置lessonId为0*/
const query = { group: resp.data, trainingId: node.id, lessonId: 0, mapId: this.$route.query.mapId};
this.$router.push({ path: `${UrlConfig.displayNew}/manage`, query: query });
launchFullscreen();
}).catch(error => {
this.$messageBox(this.$t('error.createSimulationFailed') + error.message);
});
} else {
trainingNotify({ trainingId: node.id }).then(resp => { trainingNotify({ trainingId: node.id }).then(resp => {
/** 区分演示和正式需要在演示时设置lessonId为0*/ /** 区分演示和正式需要在演示时设置lessonId为0*/
const query = { group: resp.data, trainingId: node.id, lessonId: 0, mapId: this.$route.query.mapId}; const query = { group: resp.data, trainingId: node.id, lessonId: 0, mapId: this.$route.query.mapId};
@ -226,6 +239,8 @@ export default {
}).catch(error => { }).catch(error => {
this.$messageBox(this.$t('error.createSimulationFailed') + error.message); this.$messageBox(this.$t('error.createSimulationFailed') + error.message);
}); });
}
}, },
reloadTable() { reloadTable() {
this.queryList.reload(); this.queryList.reload();
@ -234,18 +249,32 @@ export default {
this.$router.go(-1); this.$router.go(-1);
}, },
trainingRecord(index, node) { trainingRecord(index, node) {
if (this.drawWay === 'true') {
trainingNotifyNew({ trainingId: node.id }).then(resp => {
this.group = resp.data;
this.$router.push({ path: `${UrlConfig.design.trainingRecord}/${node.id}/${node.name}`, query: { group: resp.data } });
}).catch(error => {
this.$messageBox(`${this.$t('error.createSimulationFailed')}: ${error.message}`);
});
} else {
trainingNotify({ trainingId: node.id }).then(resp => { trainingNotify({ trainingId: node.id }).then(resp => {
this.group = resp.data; this.group = resp.data;
this.$router.push({ path: `${UrlConfig.design.trainingRecord}/${node.id}/${node.name}`, query: { group: resp.data } }); this.$router.push({ path: `${UrlConfig.design.trainingRecord}/${node.id}/${node.name}`, query: { group: resp.data } });
}).catch(error => { }).catch(error => {
this.$messageBox(`${this.$t('error.createSimulationFailed')}: ${error.message}`); this.$messageBox(`${this.$t('error.createSimulationFailed')}: ${error.message}`);
}); });
}
}, },
queryFunction(params) { queryFunction(params) {
params['mapId'] = this.$route.query.mapId; params['mapId'] = this.$route.query.mapId;
if (this.drawWay === 'true') {
return pageQueryTrainingNew(params);
} else {
return pageQueryTraining(params); return pageQueryTraining(params);
} }
} }
}
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -37,7 +37,7 @@
<script> <script>
import { getPublishLessonTree } from '@/api/jmap/lesson'; import { getPublishLessonTree } from '@/api/jmap/lesson';
import { trainingNotify } from '@/api/simulation'; import { trainingNotifyNew } from '@/api/simulation';
import { launchFullscreen } from '@/utils/screen'; import { launchFullscreen } from '@/utils/screen';
import { UrlConfig } from '@/router/index'; import { UrlConfig } from '@/router/index';
export default { export default {
@ -61,7 +61,6 @@ export default {
getPublishLessonTree(this.$route.query.lessonId).then(response => { getPublishLessonTree(this.$route.query.lessonId).then(response => {
if (response.data.tree && response.data.tree.length > 0) { if (response.data.tree && response.data.tree.length > 0) {
this.treeList = response.data.tree; this.treeList = response.data.tree;
console.log(this.treeList);
} }
}).catch(error => { }).catch(error => {
this.$message.error(this.$t('tip.failedCourse') + ':' + error.message); this.$message.error(this.$t('tip.failedCourse') + ':' + error.message);
@ -82,7 +81,7 @@ export default {
if (obj && obj.type === 'Training') { if (obj && obj.type === 'Training') {
if (obj.valid) { if (obj.valid) {
this.disabled = true; this.disabled = true;
trainingNotify({ trainingId: obj.id }).then(resp => { trainingNotifyNew({ trainingId: obj.id }).then(resp => {
const query = { const query = {
group: resp.data, trainingId: obj.id, lessonId: this.$route.query.lessonId, mapId: this.$route.query.mapId group: resp.data, trainingId: obj.id, lessonId: this.$route.query.lessonId, mapId: this.$route.query.mapId
}; };

View File

@ -61,7 +61,7 @@ import { setGoodsTryUse } from '@/api/management/goods';
import { clearSimulation, getSimulationInfo } from '@/api/simulation'; import { clearSimulation, getSimulationInfo } from '@/api/simulation';
import { OperateMode, TrainingMode } from '@/scripts/ConstDic'; import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
import { checkLoginLine } from '@/api/login'; import { checkLoginLine } from '@/api/login';
import { loadMapDataById } from '@/utils/loaddata'; import { loadNewMapDataByGroup } from '@/utils/loaddata';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
import Vue from 'vue'; import Vue from 'vue';
import {loadDraftScript} from '@/api/designPlatform'; import {loadDraftScript} from '@/api/designPlatform';
@ -334,8 +334,8 @@ export default {
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); //
this.$store.dispatch('training/setPrdType', this.prdTypeMap[this.prdType]); this.$store.dispatch('training/setPrdType', this.prdTypeMap[this.prdType]);
if (parseInt(this.mapId)) { if (this.group) {
await this.loadMapDataById(this.mapId); await this.loadNewMapDataByGroup(this.group);
} else { } else {
this.endViewLoading(); this.endViewLoading();
} }
@ -346,8 +346,8 @@ export default {
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); //
this.switchMode('01'); this.switchMode('01');
if (parseInt(this.mapId)) { if (this.group) {
await this.loadMapDataById(this.mapId); await this.loadNewMapDataByGroup(this.group);
} else { } else {
this.endViewLoading(); this.endViewLoading();
} }
@ -414,9 +414,9 @@ export default {
}, },
// id // id
async loadMapDataById(mapId) { async loadNewMapDataByGroup(group) {
try { try {
await loadMapDataById(mapId); await loadNewMapDataByGroup(group);
await this.$store.dispatch('training/setMapDefaultState'); await this.$store.dispatch('training/setMapDefaultState');
} catch (error) { } catch (error) {
this.$messageBox(`获取地图数据失败: ${error.message}`); this.$messageBox(`获取地图数据失败: ${error.message}`);

View File

@ -40,7 +40,7 @@
</div> </div>
<!-- <Jl3d-Simulation v-show="simulationShow" ref="Jl3dSimulation" :panel-show="simulationShow" @showpanel="showpanel" /> --> <!-- <Jl3d-Simulation v-show="simulationShow" ref="Jl3dSimulation" :panel-show="simulationShow" @showpanel="showpanel" /> -->
<left-slider v-if="isLesson" @overallTranslation="overallTranslation" /> <left-slider v-if="isShowLeftSlider" @overallTranslation="overallTranslation" />
<Jl3d-Device v-if="deviceShow" ref="Jl3dDevice" :panel-show="deviceShow" @showdevice="showdevice" /> <Jl3d-Device v-if="deviceShow" ref="Jl3dDevice" :panel-show="deviceShow" @showdevice="showdevice" />
<Jl3d-Drive v-show="drivingShow" ref="Jl3dDrive" :panel-show="drivingShow" @showdriving="showdriving" /> <Jl3d-Drive v-show="drivingShow" ref="Jl3dDrive" :panel-show="drivingShow" @showdriving="showdriving" />
@ -58,7 +58,7 @@ import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
import MenuScript from '@/views/newMap/displayNew/menuScript'; import MenuScript from '@/views/newMap/displayNew/menuScript';
import Scheduling from './demon/scheduling'; import Scheduling from './demon/scheduling';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { getTrainingDetail, getTrainingStepsDetail } from '@/api/jmap/training'; import { getTrainingStepsDetailNew, getTrainingDetailNew } from '@/api/jmap/training';
import { setGoodsTryUse } from '@/api/management/goods'; import { setGoodsTryUse } from '@/api/management/goods';
import { clearSimulation, loadScript, getSimulationInfoNew } from '@/api/simulation'; import { clearSimulation, loadScript, getSimulationInfoNew } from '@/api/simulation';
import { OperateMode, TrainingMode } from '@/scripts/ConstDic'; import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
@ -165,6 +165,9 @@ export default {
isLesson() { isLesson() {
return this.mode === 'teach' || this.mode === 'manage'; return this.mode === 'teach' || this.mode === 'manage';
}, },
isShowLeftSlider() {
return (this.mode === 'teach' || this.mode === 'manage') && (this.$route.query.lessonId != '0');
},
isExam() { isExam() {
return this.mode === 'exam'; return this.mode === 'exam';
}, },
@ -191,11 +194,12 @@ export default {
'$store.state.map.mapViewLoadedCount': function (val) { // '$store.state.map.mapViewLoadedCount': function (val) { //
this.mapBoxP = document.getElementById(this.canvasId).children[0]; this.mapBoxP = document.getElementById(this.canvasId).children[0];
this.mapBox = document.getElementsByTagName('canvas'); this.mapBox = document.getElementsByTagName('canvas');
if (this.trainingId) { if (this.trainingId) {
getTrainingStepsDetail(this.trainingId, { group: this.group }).then(resp => { getTrainingStepsDetailNew(this.trainingId, { group: this.group }).then(resp => {
this.trainingObj = resp.data; this.trainingObj = resp.data;
this.$store.dispatch('training/setTrainingData', this.trainingObj); this.$store.dispatch('training/setTrainingData', this.trainingObj);
}).catch(error => {
this.$messageBox(`初始化失败实训内容失败: ${error.message}`);
}); });
} }
this.$refs.mapCanvas && this.$refs.mapCanvas.setShowStation(this.showStation); this.$refs.mapCanvas && this.$refs.mapCanvas.setShowStation(this.showStation);
@ -367,11 +371,11 @@ export default {
if (parseInt(this.trainingId)) { if (parseInt(this.trainingId)) {
// //
// //
const resp = await getTrainingDetail(this.trainingId); const resp = await getTrainingDetailNew(this.trainingId);
if (resp && resp.code == 200) { if (resp && resp.code == 200) {
const detail = resp.data; const detail = resp.data;
await this.$store.dispatch('training/setPrdType', this.prdTypeMap[detail.prdType]); await this.$store.dispatch('training/setPrdType', this.prdTypeMap[detail.prdType]);
await this.loadMapDataById(this.mapId); await this.loadNewMapDataByGroup(this.group);
} else { } else {
this.$messageBox(`获取实训步骤数据失败`); this.$messageBox(`获取实训步骤数据失败`);
this.endViewLoading(); this.endViewLoading();

View File

@ -19,7 +19,7 @@
<script> <script>
import TipExamList from './tipExamList'; import TipExamList from './tipExamList';
import { Notification } from 'element-ui'; import { Notification } from 'element-ui';
import { startTraining } from '@/api/jmap/training'; import { startTrainingNew } from '@/api/jmap/training';
import { timeFormat } from '@/utils/date'; import { timeFormat } from '@/utils/date';
import { refreshExamList, finishOneExamQuestion } from '@/api/management/userexam'; import { refreshExamList, finishOneExamQuestion } from '@/api/management/userexam';
import { launchFullscreen } from '@/utils/screen'; import { launchFullscreen } from '@/utils/screen';
@ -75,7 +75,7 @@ export default {
this.startLoading = true; this.startLoading = true;
if (this.$route.query.trainingId) { if (this.$route.query.trainingId) {
this.isDisable = true; this.isDisable = true;
startTraining({ id: this.$route.query.trainingId }, this.group).then(response => { startTrainingNew({ id: this.$route.query.trainingId }, this.group).then(response => {
this.$store.dispatch('training/examModeStart'); this.$store.dispatch('training/examModeStart');
this.$store.dispatch('map/clearJlmapTrainView').then(() => { this.$store.dispatch('map/clearJlmapTrainView').then(() => {
this.$store.dispatch('training/setMapDefaultState').then(() => { this.$store.dispatch('training/setMapDefaultState').then(() => {

View File

@ -26,8 +26,8 @@
import TipTrainingDetail from './tipTrainingDetail'; import TipTrainingDetail from './tipTrainingDetail';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { Notification } from 'element-ui'; import { Notification } from 'element-ui';
import { startTraining, endTraining } from '@/api/jmap/training'; import { startTrainingNew, endTrainingNew } from '@/api/jmap/training';
import { trainingNotify } from '@/api/simulation'; import { trainingNotifyNew } from '@/api/simulation';
import { TrainingMode } from '@/scripts/ConstDic'; import { TrainingMode } from '@/scripts/ConstDic';
import { timeFormat } from '@/utils/date'; import { timeFormat } from '@/utils/date';
import { UrlConfig } from '@/router/index'; import { UrlConfig } from '@/router/index';
@ -107,7 +107,7 @@ export default {
this.startLoading = true; this.startLoading = true;
if (this.trainingObj && this.trainingObj.id) { if (this.trainingObj && this.trainingObj.id) {
this.isDisable = true; this.isDisable = true;
startTraining(this.trainingObj, this.group).then(response => { startTrainingNew(this.trainingObj, this.group).then(response => {
this.$store.dispatch('map/clearJlmapTrainView').then(() => { this.$store.dispatch('map/clearJlmapTrainView').then(() => {
this.$store.dispatch('training/teachModeStart', this.demoMode); this.$store.dispatch('training/teachModeStart', this.demoMode);
this.$store.dispatch('training/setMapDefaultState').then(() => { this.$store.dispatch('training/setMapDefaultState').then(() => {
@ -134,7 +134,7 @@ export default {
usedTime: this.usedTime usedTime: this.usedTime
}; };
endTraining(mode, this.group).then(response => { endTrainingNew(mode, this.group).then(response => {
const data = response.data; const data = response.data;
this.$store.dispatch('training/judgeFinish', data).then(rsp => { this.$store.dispatch('training/judgeFinish', data).then(rsp => {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
@ -181,7 +181,7 @@ export default {
if (this.$route.params.mode == 'record') { if (this.$route.params.mode == 'record') {
/** 如果是演示返回时,需要重新创建仿真*/ /** 如果是演示返回时,需要重新创建仿真*/
trainingNotify({ trainingId: this.$route.query.trainingId }).then(resp => { trainingNotifyNew({ trainingId: this.$route.query.trainingId }).then(resp => {
this.$router.push({ path: `${UrlConfig.lesson.record}/${this.$route.query.trainingId}/${this.$route.query.trainingName}`, query: { group: resp.data } }); this.$router.push({ path: `${UrlConfig.lesson.record}/${this.$route.query.trainingId}/${this.$route.query.trainingName}`, query: { group: resp.data } });
}).catch(error => { }).catch(error => {
this.$messageBox(`${this.$t('display.lesson.createSimulationError')}: ${error.message}`); this.$messageBox(`${this.$t('display.lesson.createSimulationError')}: ${error.message}`);

View File

@ -79,7 +79,7 @@
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { timeFormat } from '@/utils/date'; import { timeFormat } from '@/utils/date';
import { refreshExamList } from '@/api/management/userexam'; import { refreshExamList } from '@/api/management/userexam';
import { getTrainingDetail } from '@/api/jmap/training'; import { getTrainingDetailNew } from '@/api/jmap/training';
import { launchFullscreen } from '@/utils/screen'; import { launchFullscreen } from '@/utils/screen';
export default { export default {
@ -151,7 +151,7 @@ export default {
} }
}); });
if (obj) { if (obj) {
getTrainingDetail(obj.trainingId).then(res => { getTrainingDetailNew(obj.trainingId).then(res => {
this.courseModel = { this.courseModel = {
id: res.data.id, id: res.data.id,
name: res.data.name, name: res.data.name,

View File

@ -0,0 +1,59 @@
<template>
<div class="script-parent">
<div class="script-card" :style="{width: widthLeft+'px'}">
<tip-script-record ref="tipTaskRecord" :group="group" :width="widthLeft" />
</div>
<drap-left :width-left="widthLeft" :min="780" :max="980" @drapWidth="drapWidth" />
<div class="script-display">
<display ref="display" :size="size" />
</div>
</div>
</template>
<script>
import Display from '@/views/newMap/displayNew/index';
import TipScriptRecord from './tipScriptRecord';
import drapLeft from '@/views/components/drapLeft/index';
export default {
name: 'ScriptDisplayNew',
components: {
Display,
TipScriptRecord,
drapLeft
},
data() {
return {
widthLeft: 780,
size: {
width: document.documentElement.clientWidth - 780,
height: document.documentElement.clientHeight
},
group: this.$route.query.group
};
},
watch: {
'$store.state.app.windowSizeCount': function() {
this.size = { width: this.$store.state.app.width - 780, height: this.$store.state.app.height};
},
widthLeft: function(val) {
this.size = { width: this.$store.state.app.width - val, height: this.$store.state.app.height};
}
},
methods: {
drapWidth(width) {
this.widthLeft = Number(width);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.script-parent {
display: flex;
flex-flow: row;
.script-card {
width: 780px;
}
}
</style>

View File

@ -18,7 +18,7 @@ import { UrlConfig } from '@/router/index';
import { admin, superAdmin} from '@/router'; 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 { launchFullscreen } from '@/utils/screen';
import { scriptDraftRecordNotify, scriptRecordNotify } from '@/api/simulation'; import { scriptDraftRecordNotify, scriptRecordNotify, scriptRecordNotifyNew } from '@/api/simulation';
import CreateScript from './create'; import CreateScript from './create';
import ScriptPublish from './publish'; import ScriptPublish from './publish';
@ -125,6 +125,16 @@ export default {
} }
}, },
drawUp(index, row) { drawUp(index, row) {
const drawWay = this.$route.query.drawWay;
if (drawWay == 'true') {
scriptRecordNotifyNew(row.id).then(resp => {
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, lang:row.lang, lineCode:this.$route.query.lineCode, drawWay:drawWay};
this.$router.push({ path: `${UrlConfig.scriptDisplayNew}/script`, query });
launchFullscreen();
}).catch(error => {
this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);
});
} else {
scriptRecordNotify(row.id).then(resp => { scriptRecordNotify(row.id).then(resp => {
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, lang:row.lang, lineCode:this.$route.query.lineCode }; const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, lang:row.lang, lineCode:this.$route.query.lineCode };
this.$router.push({ path: `${UrlConfig.scriptDisplay}/script`, query }); this.$router.push({ path: `${UrlConfig.scriptDisplay}/script`, query });
@ -132,6 +142,8 @@ export default {
}).catch(error => { }).catch(error => {
this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`); this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);
}); });
}
}, },
deleteScript(index, row) { deleteScript(index, row) {
this.$confirm(this.$t('scriptRecord.deleteScriptTip'), this.$t('global.tips'), { this.$confirm(this.$t('scriptRecord.deleteScriptTip'), this.$t('global.tips'), {

View File

@ -14,7 +14,7 @@
<script> <script>
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import ConstConfig from '@/scripts/ConstConfig'; import ConstConfig from '@/scripts/ConstConfig';
import {getScriptPlayMember, getScriptMemberData, cancleScriptMembers, selectScriptMembers, modifyScriptMemberSex} from '@/api/simulation'; import {getScriptPlayMember, getScriptPlayMemberNew, getScriptMemberData, getScriptMemberDataNew, cancleScriptMembers, cancleScriptMembersNew, selectScriptMembers, selectScriptMembersNew, modifyScriptMemberSex} from '@/api/simulation';
export default { export default {
name: 'AddRole', name: 'AddRole',
props: { props: {
@ -43,6 +43,23 @@ export default {
methods: { methods: {
initData() { initData() {
const group = this.$props.group; const group = this.$props.group;
if (this.$route.query.drawWay == 'true') {
getScriptMemberDataNew(group).then(response=>{
debugger;
const lastData = JSON.stringify(response.data);
this.allRoleData = this.coverDataNew(lastData);
getScriptPlayMemberNew(group).then(response=>{
const last = response.data;
// let userdata=JSON.stringify(response.data)
// let reg=new RegExp('\"id\":\"(.*?)\\\"','g');
// let datalist=userdata.match(reg);
const data = [];
last.forEach(function(element) { data.push(element.id); });
this.selectRoleData = data;
});
});
} else {
getScriptMemberData(group).then(response=>{ getScriptMemberData(group).then(response=>{
const lastData = JSON.stringify(response.data); const lastData = JSON.stringify(response.data);
this.allRoleData = this.coverData(lastData); this.allRoleData = this.coverData(lastData);
@ -56,6 +73,8 @@ export default {
this.selectRoleData = data; this.selectRoleData = data;
}); });
}); });
}
}, },
coverData(data) { coverData(data) {
const roleTypeList = ConstConfig.ConstSelect.roleType; const roleTypeList = ConstConfig.ConstSelect.roleType;
@ -72,32 +91,67 @@ export default {
lastData = JSON.parse(lastData); lastData = JSON.parse(lastData);
return lastData; return lastData;
}, },
coverDataNew(data) {
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
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);
} else {
lastData = lastData.replace(new RegExp(rolename, 'g'), element.label);
}
});
lastData = JSON.parse(lastData);
return lastData;
},
handleChange(value, direction, movedKeys) { handleChange(value, direction, movedKeys) {
switch (direction) { switch (direction) {
case 'right': { case 'right': {
const group = this.$props.group; const group = this.$props.group;
const data = movedKeys; const data = movedKeys;
selectScriptMembers(group, data).then(response=>{ if (this.$route.query.drawWay == 'true') {
selectScriptMembersNew(group, data).then(response=>{
this.$message.success(this.$t('scriptRecord.selectScriptActorSuccess')); this.$message.success(this.$t('scriptRecord.selectScriptActorSuccess'));
this.$emit('refresh'); this.$emit('refresh');
}) }).catch(error => {
.catch(error => {
this.$messageBox(`${this.$t('scriptRecord.selectScriptActorFail')}: ${error.message}`); this.$messageBox(`${this.$t('scriptRecord.selectScriptActorFail')}: ${error.message}`);
return false; return false;
}); });
} else {
selectScriptMembers(group, data).then(response=>{
this.$message.success(this.$t('scriptRecord.selectScriptActorSuccess'));
this.$emit('refresh');
}).catch(error => {
this.$messageBox(`${this.$t('scriptRecord.selectScriptActorFail')}: ${error.message}`);
return false;
});
}
break; break;
} }
case 'left': { case 'left': {
const group = this.$props.group; const group = this.$props.group;
const data = movedKeys; const data = movedKeys;
cancleScriptMembers(group, data).then(response=>{ if (this.$route.query.drawWay == 'true') {
cancleScriptMembersNew(group, data).then(response=>{
this.$emit('refresh'); this.$emit('refresh');
this.$message.success(this.$t('scriptRecord.cancleScriptActorSuccess')); this.$message.success(this.$t('scriptRecord.cancleScriptActorSuccess'));
}) }).catch(error => {
.catch(error => {
this.$messageBox(`${this.$t('scriptRecord.cancleScriptActorFail')}: ${error.message}`); this.$messageBox(`${this.$t('scriptRecord.cancleScriptActorFail')}: ${error.message}`);
this.initData(); this.initData();
}); });
} else {
cancleScriptMembers(group, data).then(response=>{
this.$emit('refresh');
this.$message.success(this.$t('scriptRecord.cancleScriptActorSuccess'));
}).catch(error => {
this.$messageBox(`${this.$t('scriptRecord.cancleScriptActorFail')}: ${error.message}`);
this.initData();
});
}
} }
} }
}, },

View File

@ -77,11 +77,13 @@ export default {
getDeviceCode() { getDeviceCode() {
const params = {deviceType:'StationStand'}; const params = {deviceType:'StationStand'};
const group = this.$route.query.group; const group = this.$route.query.group;
if (this.$route.query.drawWay != 'true') {
getDeviceCodeByDeviceType(group, params).then(response =>{ getDeviceCodeByDeviceType(group, params).then(response =>{
let resultData = response.data; let resultData = response.data;
resultData = JSON.parse(JSON.stringify(response.data).replace(/groupNumber/g, 'name')); resultData = JSON.parse(JSON.stringify(response.data).replace(/groupNumber/g, 'name'));
this.stationList = resultData; this.stationList = resultData;
}); });
}
}, },
deviceSelect(em) { deviceSelect(em) {
if (this.field.toUpperCase() === 'selectSingalCode'.toUpperCase() && em._type.toUpperCase() === 'Signal'.toUpperCase()) { if (this.field.toUpperCase() === 'selectSingalCode'.toUpperCase() && em._type.toUpperCase() === 'Signal'.toUpperCase()) {

View File

@ -12,7 +12,7 @@
</template> </template>
<script> <script>
import { addUserTraining } from '@/api/jmap/training'; import { addUserTrainingNew } from '@/api/jmap/training';
import { getPublishLessonList } from '@/api/jmap/lesson'; import { getPublishLessonList } from '@/api/jmap/lesson';
import { getDimUserList } from '@/api/management/user'; import { getDimUserList } from '@/api/management/user';
import AddTraining from './addTraining'; import AddTraining from './addTraining';
@ -149,7 +149,7 @@ export default {
save() { save() {
const self = this; const self = this;
if (this.formModel.userId) { if (this.formModel.userId) {
addUserTraining(this.formModel).then(response => { addUserTrainingNew(this.formModel).then(response => {
self.$message.success(this.$t('system.addSuccess')); self.$message.success(this.$t('system.addSuccess'));
self.handleClose(); self.handleClose();
self.$emit('reloadTable'); self.$emit('reloadTable');

View File

@ -9,7 +9,7 @@
</template> </template>
<script> <script>
import { putUserTraining } from '@/api/jmap/training'; import { putUserTrainingNew } from '@/api/jmap/training';
export default { export default {
name: 'UsersTrainingEdit', name: 'UsersTrainingEdit',
props: { props: {
@ -82,7 +82,7 @@ export default {
id: this.formModel.id, id: this.formModel.id,
duration: this.formModel.duration duration: this.formModel.duration
}; };
putUserTraining(param).then(response => { putUserTrainingNew(param).then(response => {
self.$message.success(this.$t('system.updateSuccess')); self.$message.success(this.$t('system.updateSuccess'));
self.handleClose(); self.handleClose();
self.$emit('reloadTable'); self.$emit('reloadTable');

View File

@ -7,7 +7,7 @@
</template> </template>
<script> <script>
import { getTrainingList, deleteUserTraining } from '@/api/jmap/training'; import { getTrainingListNew, deleteUserTrainingNew } from '@/api/jmap/training';
import UsersTrainingEdit from './edit'; import UsersTrainingEdit from './edit';
import UsersTrainingAdd from './add'; import UsersTrainingAdd from './add';
export default { export default {
@ -39,7 +39,7 @@ export default {
}, },
queryList: { queryList: {
query: getTrainingList, query: getTrainingListNew,
selectCheckShow: false, selectCheckShow: false,
indexShow: true, indexShow: true,
columns: [ columns: [
@ -126,7 +126,7 @@ export default {
cancelButtonText: this.$t('global.cancel'), cancelButtonText: this.$t('global.cancel'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
deleteUserTraining(row.id).then(response => { deleteUserTrainingNew(row.id).then(response => {
this.$message.success(this.$t('system.deleteSuccess')); this.$message.success(this.$t('system.deleteSuccess'));
this.reloadTable(); this.reloadTable();
}).catch(() => { }).catch(() => {

View File

@ -50,7 +50,8 @@ import { PermissionType } from '@/scripts/ConstDic';
import { UrlConfig } from '@/router/index'; import { UrlConfig } from '@/router/index';
import LimitList from '@/views/components/limits/index'; import LimitList from '@/views/components/limits/index';
import { getSessionStorage, setSessionStorage } from '@/utils/auth'; import { getSessionStorage, setSessionStorage } from '@/utils/auth';
import { trainingNotify } from '@/api/simulation'; import { trainingNotify, trainingNotifyNew } from '@/api/simulation';
import { getPublishMapInfo } from '@/api/jmap/map';
import { launchFullscreen } from '@/utils/screen'; import { launchFullscreen } from '@/utils/screen';
import localStore from 'storejs'; import localStore from 'storejs';
@ -75,7 +76,8 @@ export default {
children: 'children', children: 'children',
label: 'name' label: 'name'
}, },
expandList: [] expandList: [],
drawWay: false
}; };
}, },
computed: { computed: {
@ -106,6 +108,13 @@ export default {
}, },
methods: { methods: {
initLoadPage() { initLoadPage() {
getPublishMapInfo(this.$route.query.mapId).then(res => {
if (res.data) {
this.drawWay = res.data.drawWay;
}
}).catch(() => {
this.$message.error(this.$t('error.getMapDataFailed'));
});
getPublishLessonTree(this.$route.query.lessonId).then(response => { getPublishLessonTree(this.$route.query.lessonId).then(response => {
if (response.data.tree && response.data.tree.length > 0) { if (response.data.tree && response.data.tree.length > 0) {
this.courseModel = { this.courseModel = {
@ -135,6 +144,18 @@ export default {
if (obj && obj.type === 'Training') { if (obj && obj.type === 'Training') {
if (obj.valid) { if (obj.valid) {
this.disabled = true; this.disabled = true;
if (this.drawWay) {
trainingNotifyNew({ trainingId: obj.id }).then(resp => {
const query = {
group: resp.data, trainingId: obj.id, lessonId: this.$route.query.lessonId, mapId: this.courseModel.mapId
};
this.$router.push({ path: `${UrlConfig.displayNew}/teach`, query: query });
launchFullscreen();
}).catch(error => {
this.$messageBox(`${this.$t('tip.createSimulationFaild')} : ${error.message}`);
this.disabled = false;
});
} else {
trainingNotify({ trainingId: obj.id }).then(resp => { trainingNotify({ trainingId: obj.id }).then(resp => {
const query = { const query = {
group: resp.data, trainingId: obj.id, lessonId: this.$route.query.lessonId, mapId: this.courseModel.mapId group: resp.data, trainingId: obj.id, lessonId: this.$route.query.lessonId, mapId: this.courseModel.mapId
@ -145,6 +166,7 @@ export default {
this.$messageBox(`${this.$t('tip.createSimulationFaild')} : ${error.message}`); this.$messageBox(`${this.$t('tip.createSimulationFaild')} : ${error.message}`);
this.disabled = false; this.disabled = false;
}); });
}
} else { } else {
this.$confirm(this.$t('tip.accessCourseNo'), this.$t('tip.hint'), { this.$confirm(this.$t('tip.accessCourseNo'), this.$t('tip.hint'), {
confirmButtonText: this.$t('tip.confirm'), confirmButtonText: this.$t('tip.confirm'),

View File

@ -36,7 +36,7 @@ export default {
return this.$store.state.menuOperation.menuPosition; return this.$store.state.menuOperation.menuPosition;
}, },
drawWay() { drawWay() {
return this.$route.query.drawWay; return this.$route.query.drawWay + '';
} }
}, },
watch: { watch: {
@ -73,7 +73,7 @@ export default {
}, },
async kicked() { async kicked() {
try { try {
if (this.drawWay) { if (this.drawWay === 'true' ) {
await putJointTrainingUserkickedNew(this.clickUserId, this.$route.query.group); await putJointTrainingUserkickedNew(this.clickUserId, this.$route.query.group);
} else { } else {
await putJointTrainingUserkicked(this.clickUserId, this.$route.query.group); await putJointTrainingUserkicked(this.clickUserId, this.$route.query.group);

View File

@ -71,7 +71,7 @@ export default {
return this.$store.state.user ? this.$store.state.user.id : ''; return this.$store.state.user ? this.$store.state.user.id : '';
}, },
drawWay() { drawWay() {
return this.$route.query.drawWay; return this.$route.query.drawWay + '';
} }
}, },
watch: { watch: {
@ -92,7 +92,7 @@ export default {
async handleSendText() { async handleSendText() {
try { try {
if (this.text.trim()) { if (this.text.trim()) {
if (this.drawWay) { if (this.drawWay === 'true') {
await chatWithTextNew(this.text, this.group); await chatWithTextNew(this.text, this.group);
} else { } else {
await chatWithText(this.text, this.group); await chatWithText(this.text, this.group);

View File

@ -173,7 +173,7 @@ export default {
return this.$route.query.group; return this.$route.query.group;
}, },
drawWay() { drawWay() {
return this.$route.query.drawWay; return this.$route.query.drawWay + '';
}, },
userId() { userId() {
return this.$store.state.user ? this.$store.state.user.id : ''; return this.$store.state.user ? this.$store.state.user.id : '';
@ -239,7 +239,7 @@ export default {
this.$message.info(this.$t('error.theDeviceTypeAlreadyExists')); this.$message.info(this.$t('error.theDeviceTypeAlreadyExists'));
return; return;
} }
if (this.drawWay) { if (this.drawWay === 'true') {
await setRealDeviceNew(this.group, roomDeviceVo); await setRealDeviceNew(this.group, roomDeviceVo);
} else { } else {
await setRealDevice(this.group, roomDeviceVo); await setRealDevice(this.group, roomDeviceVo);
@ -247,7 +247,7 @@ export default {
}, },
async handleUpdDevice({deviceType, device}) { async handleUpdDevice({deviceType, device}) {
try { try {
if (this.drawWay) { if (this.drawWay === 'true') {
await setRealDeviceNew(this.group, device); await setRealDeviceNew(this.group, device);
} else { } else {
await setRealDevice(this.group, device); await setRealDevice(this.group, device);
@ -258,7 +258,7 @@ export default {
}, },
async handleDelDevice({deviceType, device}) { async handleDelDevice({deviceType, device}) {
try { try {
if (this.drawWay) { if (this.drawWay === 'true') {
await delRealDeviceNew(device.id, this.group); await delRealDeviceNew(device.id, this.group);
} else { } else {
await delRealDevice(device.id, this.group); await delRealDevice(device.id, this.group);
@ -277,7 +277,7 @@ export default {
userRole: 'Audience', userRole: 'Audience',
deviceCode: '' deviceCode: ''
}]; }];
if (this.drawWay) { if (this.drawWay === 'true') {
params[0].userRole = 'AUDIENCE'; params[0].userRole = 'AUDIENCE';
await putUserRolesNew(params, this.group); await putUserRolesNew(params, this.group);
} else { } else {
@ -301,7 +301,7 @@ export default {
deviceCode: deviceCode, deviceCode: deviceCode,
ibpPart: user.ibpPart ibpPart: user.ibpPart
}]; }];
if (this.drawWay) { if (this.drawWay === 'true') {
params[0].userRole = roleType.toUpperCase(); params[0].userRole = roleType.toUpperCase();
if (roleType === 'Attendant') { if (roleType === 'Attendant') {
params[0].userRole = 'STATION_SUPERVISOR'; params[0].userRole = 'STATION_SUPERVISOR';
@ -326,7 +326,7 @@ export default {
if (userList.length) { if (userList.length) {
try { try {
let list = []; let list = [];
if (this.drawWay) { if (this.drawWay === 'true') {
if (roleType === 'Attendant') { if (roleType === 'Attendant') {
list = userList.map(elem => { return { id: elem.id, nickName: elem.nickName, userRole: 'STATION_SUPERVISOR' }; }); list = userList.map(elem => { return { id: elem.id, nickName: elem.nickName, userRole: 'STATION_SUPERVISOR' }; });
} else if (roleType === 'Repair') { } else if (roleType === 'Repair') {
@ -356,7 +356,7 @@ export default {
async handlePostQrcode() { async handlePostQrcode() {
this.disabled = true; this.disabled = true;
let res = ''; let res = '';
if (this.drawWay) { if (this.drawWay === 'true') {
res = await getJoinTrainCodeNew({}, this.group); res = await getJoinTrainCodeNew({}, this.group);
} else { } else {
res = await getJoinTrainCode({}, this.group); res = await getJoinTrainCode({}, this.group);
@ -384,7 +384,7 @@ export default {
this.disabled = true; this.disabled = true;
if (this.attendantList.findIndex(item => { return !item.deviceCode; }) < 0) { if (this.attendantList.findIndex(item => { return !item.deviceCode; }) < 0) {
try { try {
if (this.drawWay) { if (this.drawWay === 'true') {
await startJointTrainingNew(this.group); await startJointTrainingNew(this.group);
} else { } else {
await startJointTraining(this.group); await startJointTraining(this.group);
@ -402,7 +402,7 @@ export default {
try { try {
this.disabled = true; this.disabled = true;
let res = ''; let res = '';
if (this.drawWay) { if (this.drawWay === 'true') {
res = await putJointTrainingSimulationNew(this.group); res = await putJointTrainingSimulationNew(this.group);
} else { } else {
res = await putJointTrainingSimulation(this.group); res = await putJointTrainingSimulation(this.group);
@ -422,7 +422,7 @@ export default {
type: 'warning' type: 'warning'
}).then(async () => { }).then(async () => {
try { try {
if (this.drawWay) { if (this.drawWay === 'true') {
await deljointTrainRoomNew(this.group); await deljointTrainRoomNew(this.group);
} else { } else {
await deljointTrainRoom(this.group); await deljointTrainRoom(this.group);
@ -439,7 +439,7 @@ export default {
async handleBack() { async handleBack() {
try { try {
this.disabled = true; this.disabled = true;
if (this.drawWay) { if (this.drawWay === 'true') {
await putJointTrainingExitNew(this.group); await putJointTrainingExitNew(this.group);
} else { } else {
await putJointTrainingExit(this.group); await putJointTrainingExit(this.group);

View File

@ -89,7 +89,7 @@ export default {
return this.$route.query.group; return this.$route.query.group;
}, },
drawWay() { drawWay() {
return this.$route.query.drawWay; return this.$route.query.drawWay + '';
}, },
userId() { userId() {
return this.$store.state.user ? this.$store.state.user.id : ''; return this.$store.state.user ? this.$store.state.user.id : '';
@ -129,9 +129,9 @@ export default {
methods: { methods: {
async loadInit() { async loadInit() {
await this.subscribe(); await this.subscribe();
if (!this.$store.state.socket.setInRoom && !this.drawWay) { if (!this.$store.state.socket.setInRoom && this.drawWay !== 'true') {
await getjointTraining(this.group); await getjointTraining(this.group);
} else if (!this.$store.state.socket.setInRoom && this.drawWay) { } else if (!this.$store.state.socket.setInRoom && this.drawWay === 'true') {
await getjointTrainingNew(this.group); await getjointTrainingNew(this.group);
} }
await this.getRoomInfo(); await this.getRoomInfo();
@ -146,7 +146,7 @@ export default {
}, },
async getRoomInfo() { async getRoomInfo() {
let resp = ''; let resp = '';
if (this.drawWay) { if (this.drawWay === 'true') {
resp = await postRoomDetailNew(this.group); resp = await postRoomDetailNew(this.group);
} else { } else {
resp = await postRoomDetail(this.group); resp = await postRoomDetail(this.group);
@ -159,7 +159,7 @@ export default {
}, },
async getStandList() { async getStandList() {
let resp = ''; let resp = '';
if (this.drawWay) { if (this.drawWay === 'true') {
resp = await getRealDevicesNew(this.group); resp = await getRealDevicesNew(this.group);
} else { } else {
resp = await getRealDevices(this.group); resp = await getRealDevices(this.group);
@ -188,7 +188,7 @@ export default {
}, },
async getUserList() { async getUserList() {
let res = ''; let res = '';
if (this.drawWay) { if (this.drawWay === 'true') {
res = await getJointTrainRoomUserListNew(this.group); res = await getJointTrainRoomUserListNew(this.group);
} else { } else {
res = await getJointTrainRoomUserList(this.group); res = await getJointTrainRoomUserList(this.group);
@ -276,15 +276,15 @@ export default {
}, },
async jumpInSimulation() { async jumpInSimulation() {
const room = this.room; const room = this.room;
if (this.drawWay) { if (this.drawWay === 'true') {
await putJointTrainingSimulationEntranceNew(room.group); await putJointTrainingSimulationEntranceNew(room.group);
} else { } else {
await putJointTrainingSimulationEntrance(room.group); await putJointTrainingSimulationEntrance(room.group);
} }
const rest = await getPublishMapInfo(room.mapId); const rest = await getPublishMapInfo(room.mapId);
const query = { lineCode: rest.data.lineCode, mapId: room.mapId, group: room.group, roomId: room.id }; const query = { lineCode: rest.data.lineCode, mapId: room.mapId, group: room.group, roomId: room.id };
if (this.$route.query.drawWay) { if (this.drawWay === 'true') {
query.drawWay = this.$route.query.drawWay; query.drawWay = this.drawWay;
this.$router.replace({ path: `/jointTrainingNew`, query: query}); this.$router.replace({ path: `/jointTrainingNew`, query: query});
} else { } else {
this.$router.replace({ path: `/jointTraining`, query: query }); this.$router.replace({ path: `/jointTraining`, query: query });