Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
This commit is contained in:
commit
c30eae5b1e
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
/** 开始实训*/
|
||||
/** 开始实训 0*/
|
||||
export function startTraining(args, group) {
|
||||
return request({
|
||||
url: `/api/training/${args.id}/start`,
|
||||
@ -35,8 +35,7 @@ export function sendTrainingNextStep(data, group) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取章节基本信息*/
|
||||
/** 获取章节基本信息 0*/
|
||||
export function getTrainingDetail(trainingId) {
|
||||
return request({
|
||||
url: `/api/training/${trainingId}`,
|
||||
@ -44,7 +43,7 @@ export function getTrainingDetail(trainingId) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 添加实训*/
|
||||
/** 添加实训 0*/
|
||||
export function addTraining(data) {
|
||||
return request({
|
||||
url: '/api/training',
|
||||
@ -53,7 +52,7 @@ export function addTraining(data) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取实训步骤数据*/
|
||||
/** 获取实训步骤数据 0*/
|
||||
export function getTrainingStepsDetail(trainingId, params) {
|
||||
return request({
|
||||
url: `/api/training/${trainingId}/detail`,
|
||||
@ -62,7 +61,7 @@ export function getTrainingStepsDetail(trainingId, params) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询实训列表*/
|
||||
/** 查询实训列表 0*/
|
||||
export function pageQueryTraining(params) {
|
||||
return request({
|
||||
url: `/api/training/pagedQuery`,
|
||||
@ -70,8 +69,7 @@ export function pageQueryTraining(params) {
|
||||
params: params
|
||||
});
|
||||
}
|
||||
|
||||
/** 自动生成实训操作*/
|
||||
/** 自动生成实训操作 0*/
|
||||
export function addAutoTraining(data) {
|
||||
return request({
|
||||
url: `/api/training/generate`,
|
||||
@ -80,7 +78,7 @@ export function addAutoTraining(data) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 修改自动删除实训操作*/
|
||||
/** 修改自动删除实训操作 0*/
|
||||
export function updateAutoTraining(data) {
|
||||
return request({
|
||||
url: `/api/training/batchUpdateGenerate`,
|
||||
@ -88,8 +86,7 @@ export function updateAutoTraining(data) {
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除自动生成实训*/
|
||||
/** 删除自动生成实训 0*/
|
||||
export function deleteAutoTraining(params) {
|
||||
return request({
|
||||
url: `/api/training/generate`,
|
||||
@ -98,7 +95,7 @@ export function deleteAutoTraining(params) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取用户实训列表*/
|
||||
/** 获取用户实训列表 0*/
|
||||
export function getTrainingList(data) {
|
||||
return request({
|
||||
url: `/api/training/list`,
|
||||
@ -128,15 +125,7 @@ export function sendCommandNew(group, commandDefinitionId, command) {
|
||||
data: command
|
||||
});
|
||||
}
|
||||
|
||||
export function updateLesson(data) {
|
||||
return request({
|
||||
url: `/api/training/userTraining/${data.id}`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
// 添加用户实训数据
|
||||
// 添加用户实训数据 0
|
||||
export function addUserTraining(data) {
|
||||
return request({
|
||||
url: `/api/training/userTraining`,
|
||||
@ -144,7 +133,7 @@ export function addUserTraining(data) {
|
||||
data: data
|
||||
});
|
||||
}
|
||||
// 更新用户实训数据
|
||||
// 更新用户实训数据 0
|
||||
export function putUserTraining(data) {
|
||||
return request({
|
||||
url: `/api/training/userTraining/${data.id}`,
|
||||
@ -152,10 +141,125 @@ export function putUserTraining(data) {
|
||||
data: data
|
||||
});
|
||||
}
|
||||
// 清除实训数据
|
||||
// 清除实训数据 0
|
||||
export function deleteUserTraining(statsId) {
|
||||
return request({
|
||||
url: `/api/training/userTraining/${statsId}`,
|
||||
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'
|
||||
});
|
||||
}
|
||||
|
@ -86,7 +86,13 @@ export function trainingNotify({ trainingId }) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 实训系统(新版地图) */
|
||||
export function trainingNotifyNew({ trainingId }) {
|
||||
return request({
|
||||
url: `/simulation/training/${trainingId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 考试系统CBTC
|
||||
* @param {*} data
|
||||
@ -97,7 +103,13 @@ export function examNotify({ examId }) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 考试系统(新版地图)*/
|
||||
export function examNotifyNew({ examId }) {
|
||||
return request({
|
||||
url: `/simulation/exam/${examId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
/** 获取用户实训列表*/
|
||||
export function getSimulationList(data) {
|
||||
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) {
|
||||
return request({
|
||||
@ -189,6 +209,13 @@ export function getScriptMemberData(group) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
/** 获取剧本编制的所有成员角色(新版地图)*/
|
||||
export function getScriptMemberDataNew(group) {
|
||||
return request({
|
||||
url: `/api/scriptSimulation/${group}/allMember`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取剧本出演成员角色 */
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
return request({
|
||||
|
@ -44,7 +44,7 @@ class EDetain extends Group {
|
||||
|
||||
showMode() {
|
||||
this.create();
|
||||
this.detain.show();
|
||||
this.detain && this.detain.show();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -134,15 +134,6 @@ export default {
|
||||
time: ''
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 深度数据状态
|
||||
tempData: {
|
||||
handler(val, oldVal) {
|
||||
this.checkTableDataSelction(val);
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList',
|
||||
@ -177,21 +168,30 @@ export default {
|
||||
'3': [], // 80 - 70
|
||||
'4': [] // 60 - 50
|
||||
};
|
||||
for (var i = 110; i <= 120; i++) {
|
||||
for (let i = 110; i <= 120; 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}` });
|
||||
}
|
||||
for (var i = 70; i <= 80; i++) {
|
||||
for (let i = 70; i <= 80; 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}` });
|
||||
}
|
||||
return list;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 深度数据状态
|
||||
tempData: {
|
||||
handler(val, oldVal) {
|
||||
this.checkTableDataSelction(val);
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
@ -207,21 +207,21 @@ export default {
|
||||
},
|
||||
loadInitData(selected, opts) {
|
||||
this.tempData = [];
|
||||
const stationList = this.stationList.slice();
|
||||
// const stationList = this.stationList.slice();
|
||||
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||
if (selected.direction == '01') { // 下行
|
||||
// 下行时,此站不是最后一站
|
||||
if (index != 0) {
|
||||
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
||||
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 {
|
||||
// 上行时,此站不是最后一站
|
||||
if (index != this.stationList.length) {
|
||||
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
||||
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 });
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -197,14 +197,14 @@ export default {
|
||||
if (index != 0) {
|
||||
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
||||
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 {
|
||||
// 上行时,此站不是最后一站
|
||||
if (index != this.stationList.length) {
|
||||
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
||||
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) {
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setRunLevel.choose.operation
|
||||
operation: OperationEvent.StationStand.setRunLevel.choose.operation,
|
||||
val: time.toString()
|
||||
};
|
||||
|
||||
this.time = time.toString();
|
||||
@ -258,11 +259,12 @@ export default {
|
||||
});
|
||||
},
|
||||
levelSelectChange(row) {
|
||||
this.time = row.time = this.timeList[row.level][0].value;
|
||||
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.isConfirm = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
@ -273,7 +275,8 @@ export default {
|
||||
},
|
||||
checkChange(check) {
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setRunLevel.check.operation
|
||||
operation: OperationEvent.StationStand.setRunLevel.check.operation,
|
||||
val: check
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
|
@ -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 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) {
|
||||
return designPageRegex.some(item => {
|
||||
|
@ -57,6 +57,7 @@ const LessonDetail = () => import('@/views/lesson/details');
|
||||
|
||||
const ScriptmanageHome = () => import('@/views/scriptManage/home');
|
||||
const ScriptDisplay = () => import('@/views/scriptManage/display/index');
|
||||
const ScriptDisplayNew = () => import('@/views/scriptManage/display/indexNew');
|
||||
|
||||
const IbpHome = () => import('@/views/ibp/home');
|
||||
const IbpDraw = () => import('@/views/ibp/ibpDraw/index');
|
||||
@ -154,6 +155,7 @@ export const UrlConfig = {
|
||||
display: '/display',
|
||||
displayNew: '/displayNew',
|
||||
scriptDisplay: '/scriptDisplay',
|
||||
scriptDisplayNew:'/scriptDisplayNew',
|
||||
examRuleDraft: '/examRule/draft',
|
||||
examRuleManage: '/examRule/manage',
|
||||
lesson: {
|
||||
@ -517,6 +519,13 @@ export const asyncRouter = [
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{ // 剧本编辑 战场图
|
||||
path: '/scriptDisplayNew/:mode',
|
||||
component: ScriptDisplayNew,
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/displayIscs/system',
|
||||
component: IscsSystem,
|
||||
|
@ -87,7 +87,15 @@ export default {
|
||||
{label: '司机', value: 'Driver', enLabel: 'Driver '},
|
||||
{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: [
|
||||
{ label: '实训', value: 'Training'},
|
||||
{ label: '仿真(行调/现地/司机)', value: 'Simulation'},
|
||||
|
@ -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' }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
@ -3,7 +3,7 @@ import router from '@/router';
|
||||
import CommandHandler from './CommandHandler.js';
|
||||
import ValidateHandler from './ValidateHandler.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 { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
@ -36,7 +36,7 @@ class Handler {
|
||||
const basicInfo = store.getters['training/basicInfo'];
|
||||
if (basicInfo.id && valid) {
|
||||
const group = router.currentRoute.query.group;
|
||||
sendTrainingNextStep({ trainingId: basicInfo.id, operation: operation }, group);
|
||||
sendTrainingNextStepNew({ trainingId: basicInfo.id, operation: operation }, group);
|
||||
}
|
||||
|
||||
if (!valid) {
|
||||
|
@ -52,6 +52,9 @@ class ValidateHandler {
|
||||
const order = Handler.getOrder();
|
||||
|
||||
let valid = false;
|
||||
if (operate.over) { // 最后一步不用校验 只校验之前的步骤信息 最后直接发送就可以
|
||||
valid = true;
|
||||
} else {
|
||||
if (order < steps.length) {
|
||||
const standard = steps[order];
|
||||
if (operate && standard &&
|
||||
@ -61,6 +64,7 @@ class ValidateHandler {
|
||||
valid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return valid;
|
||||
}
|
||||
|
@ -93,6 +93,7 @@ OperateHandler.prototype = {
|
||||
const basicInfo = store.getters['training/basicInfo'];
|
||||
if (basicInfo.id && valid) {
|
||||
const group = router.currentRoute.query.group;
|
||||
console.log('--------------------------');
|
||||
sendTrainingNextStep({ trainingId: basicInfo.id, operate: operate }, group);
|
||||
}
|
||||
|
||||
|
@ -3,11 +3,11 @@ 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.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://2925963m2a.zicp.vip'; // 杜康
|
||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||
|
@ -90,12 +90,12 @@ export default {
|
||||
switch (obj.type) {
|
||||
case '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;
|
||||
}
|
||||
case '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;
|
||||
}
|
||||
case 'runPlanDesign': {
|
||||
@ -144,7 +144,7 @@ export default {
|
||||
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(
|
||||
{
|
||||
id: '3',
|
||||
@ -152,7 +152,8 @@ export default {
|
||||
type: 'scriptDesign',
|
||||
mapId: elem.id,
|
||||
cityCode: elem.cityCode,
|
||||
lineCode: elem.lineCode
|
||||
lineCode: elem.lineCode,
|
||||
drawWay: elem.drawWay
|
||||
// code:elem.children.find(n => { return n.name.includes("行调")})
|
||||
});
|
||||
elem.children.push(
|
||||
|
@ -5,7 +5,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import JlmapVisual from '@/views/newMap/jlmapNew/index';
|
||||
import { loadMapDataById } from '@/utils/loaddata';
|
||||
import { loadNewMapDataByGroup } from '@/utils/loaddata';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
@ -60,17 +60,17 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async initLoadData() { // 加载地图数据
|
||||
if (parseInt(this.mapId)) {
|
||||
await this.loadMapDataById(this.mapId);
|
||||
if (this.group) {
|
||||
await this.loadNewMapDataByGroup(this.group);
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
},
|
||||
// 通过id加载地图数据
|
||||
async loadMapDataById(mapId) {
|
||||
async loadNewMapDataByGroup(group) {
|
||||
try {
|
||||
await this.$store.dispatch('training/changeMode', { mode: null });
|
||||
loadMapDataById(mapId).then(()=>{
|
||||
loadNewMapDataByGroup(group).then(()=>{
|
||||
this.$store.dispatch('training/over');
|
||||
this.$store.dispatch('training/setMapDefaultState');
|
||||
this.$store.dispatch('map/clearJlmapTrainView');
|
||||
|
@ -49,7 +49,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { examNotify } from '@/api/simulation';
|
||||
import { examNotify, examNotifyNew } from '@/api/simulation';
|
||||
import { getExamLessonDetail } from '@/api/management/exam';
|
||||
import { generateExamList } from '@/api/management/userexam';
|
||||
import { getPublishLessonDetail } from '@/api/jmap/lesson';
|
||||
@ -59,6 +59,7 @@ import { mapGetters } from 'vuex';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import LangStorage from '@/utils/lang';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
|
||||
export default {
|
||||
name: 'ExamDetailView',
|
||||
@ -79,7 +80,8 @@ export default {
|
||||
},
|
||||
typeList: [],
|
||||
examList: [],
|
||||
trainingOperateTypeMap: {}
|
||||
trainingOperateTypeMap: {},
|
||||
drawWay: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -157,6 +159,13 @@ export default {
|
||||
},
|
||||
async loadInitPage(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);
|
||||
this.examDetails = res.data;
|
||||
this.examDetails.examDefinitionRulesVOList.forEach((res, index) => {
|
||||
@ -175,7 +184,6 @@ export default {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
buy() {
|
||||
@ -220,7 +228,7 @@ export default {
|
||||
async exmaStart() {
|
||||
this.disabled = true;
|
||||
await this.examDetail();
|
||||
if (this.examList.length) {
|
||||
if (this.examList.length && !this.drawWay) {
|
||||
examNotify({ examId: this.$route.params.examId }).then(resp => {
|
||||
const query = {
|
||||
group: resp.data,
|
||||
@ -237,6 +245,23 @@ export default {
|
||||
this.disabled = false;
|
||||
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 {
|
||||
this.disabled = false;
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ export default {
|
||||
return ['ibp', (Math.random().toFixed(5)) * 100000].join('_');
|
||||
},
|
||||
drawWay() {
|
||||
return this.$route.query.drawWay;
|
||||
return this.$route.query.drawWay + '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -241,7 +241,7 @@ export default {
|
||||
back() {
|
||||
this.group = this.$route.query.group;
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
if (this.drawWay) {
|
||||
if (this.drawWay === 'true') {
|
||||
putJointTrainingSimulationUserNew(this.group).then(() => {
|
||||
this.$router.replace({ path: `/trainroom`, query: { group: this.group, lineCode:this.$route.query.lineCode, drawWay: this.drawWay } });
|
||||
exitFullscreen();
|
||||
|
@ -59,7 +59,7 @@ export default {
|
||||
return ['iscs', (Math.random().toFixed(5)) * 100000].join('_');
|
||||
},
|
||||
drawWay() {
|
||||
return this.$route.query.drawWay;
|
||||
return this.$route.query.drawWay + '';
|
||||
},
|
||||
width() {
|
||||
return this.$store.state.config.width;
|
||||
@ -175,7 +175,7 @@ export default {
|
||||
back() {
|
||||
this.group = this.$route.query.group;
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
if (this.drawWay) {
|
||||
if (this.drawWay === 'true') {
|
||||
putJointTrainingSimulationUserNew(this.group).then(() => {
|
||||
this.$router.replace({ path: `/trainroom`, query: { group: this.group, lineCode:this.$route.query.lineCode, drawWay: this.drawWay } });
|
||||
exitFullscreen();
|
||||
|
@ -87,13 +87,13 @@ export default {
|
||||
return data.name.indexOf(value) !== -1;
|
||||
},
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
if (obj && obj.type === 'Lesson' || obj.type === 'Chapter') {
|
||||
|
@ -209,10 +209,10 @@ export default {
|
||||
this.$router.push({path: `${UrlConfig.design.taskManage}`, query: {mapId: this.$route.params.mapId}});
|
||||
},
|
||||
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() {
|
||||
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) {
|
||||
this.$confirm(this.$t('tip.cancelCoursePublicationHint'), this.$t('global.tips'), {
|
||||
@ -235,7 +235,7 @@ export default {
|
||||
this.$refs.lessonDetail.show(row.id);
|
||||
},
|
||||
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}});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -217,7 +217,7 @@ export default {
|
||||
});
|
||||
},
|
||||
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} });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -15,7 +15,7 @@
|
||||
<script>
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
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 localStore from 'storejs';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
@ -156,7 +156,12 @@ export default {
|
||||
async queryFunction(params) {
|
||||
params['mapId'] = this.detail.mapId;
|
||||
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 => {
|
||||
res.data.list.forEach(item => {
|
||||
if (item.id == ele.trainingId) {
|
||||
|
@ -27,7 +27,7 @@ export default {
|
||||
loading: false,
|
||||
dialogVisible: false,
|
||||
formModel: {
|
||||
skinCode: this.$route.query.mapId
|
||||
skinCode: this.$route.query.lineCode
|
||||
},
|
||||
skinCodeList: [],
|
||||
isShow: false
|
||||
@ -113,29 +113,26 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
create() {
|
||||
const self = this;
|
||||
async create() {
|
||||
this.loading = true;
|
||||
addTrainingRulesList(
|
||||
this.formModel.mapId,
|
||||
OperationList[this.formModel.mapId].list
|
||||
)
|
||||
.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}`
|
||||
);
|
||||
try {
|
||||
OperationList[this.$route.query.lineCode].list.forEach(item => {
|
||||
item.mapId = this.$route.query.mapId;
|
||||
});
|
||||
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() {
|
||||
this.formModel = {
|
||||
skinCode: this.$route.query.mapId
|
||||
skinCode: this.$route.query.lineCode
|
||||
};
|
||||
this.$refs.dataform.resetForm();
|
||||
this.isShow = false;
|
||||
|
@ -101,11 +101,6 @@ export default {
|
||||
created() {
|
||||
this.dicId = this.$route.query.id;
|
||||
this.init();
|
||||
getOperateStepDataList(this.dicId).then(response => {
|
||||
this.dic = response.data;
|
||||
}).catch(error => {
|
||||
this.$messageBox(error.message);
|
||||
});
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
|
@ -147,7 +147,7 @@ export default {
|
||||
],
|
||||
actions: [
|
||||
{ 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 }
|
||||
]
|
||||
},
|
||||
|
@ -65,7 +65,7 @@
|
||||
<script>
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
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';
|
||||
|
||||
export default {
|
||||
@ -266,6 +266,21 @@ export default {
|
||||
},
|
||||
// 确定
|
||||
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) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
@ -279,7 +294,7 @@ export default {
|
||||
operateType: this.operateModel.operateType
|
||||
};
|
||||
|
||||
addAutoTraining(data).then(response => {
|
||||
addAutoTrainingFunction(data).then(response => {
|
||||
this.$message.success(this.$t('tip.automaticGenerationTrainingSuccess'));
|
||||
this.$emit('refresh');
|
||||
this.close();
|
||||
@ -300,7 +315,7 @@ export default {
|
||||
maxDuration: this.operateModel.maxDuration
|
||||
};
|
||||
|
||||
updateAutoTraining(data).then(response => {
|
||||
updateAutoTrainingFunction(data).then(response => {
|
||||
this.$message.success(this.$t('tip.updateAutomaticGenerationTrainingSuccess'));
|
||||
this.$emit('refresh');
|
||||
this.close();
|
||||
@ -318,7 +333,7 @@ export default {
|
||||
operateType: `${this.operateModel.operateType.join(',')}`
|
||||
};
|
||||
|
||||
deleteAutoTraining(data).then(response => {
|
||||
deleteAutoTrainingFunction(data).then(response => {
|
||||
this.$message.success(this.$t('tip.deleteAutomaticGenerationTrainingSuccess'));
|
||||
this.$emit('refresh');
|
||||
this.close();
|
||||
@ -337,7 +352,7 @@ export default {
|
||||
maxDuration: this.operateModel.maxDuration,
|
||||
remarks: this.operateModel.remarks
|
||||
};
|
||||
addTraining(data).then(response => {
|
||||
addTrainingFunction(data).then(response => {
|
||||
this.$message.success(this.$t('tip.addTrainingSuccessfully'));
|
||||
this.$emit('refresh');
|
||||
this.close();
|
||||
|
@ -19,8 +19,8 @@
|
||||
<script>
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import Cookies from 'js-cookie';
|
||||
import { pageQueryTraining } from '@/api/jmap/training';
|
||||
import { trainingNotify } from '@/api/simulation';
|
||||
import { pageQueryTraining, pageQueryTrainingNew } from '@/api/jmap/training';
|
||||
import { trainingNotify, trainingNotifyNew } from '@/api/simulation';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
@ -149,6 +149,9 @@ export default {
|
||||
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.label }; });
|
||||
},
|
||||
drawWay() {
|
||||
return this.$route.query.drawWay + '';
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
@ -218,6 +221,16 @@ export default {
|
||||
this.$refs.draftTrain.show({ event: '03', title: this.$t('lesson.deleteAutoGeneratedTraining') });
|
||||
},
|
||||
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 => {
|
||||
/** 区分演示和正式,需要在演示时设置lessonId为0*/
|
||||
const query = { group: resp.data, trainingId: node.id, lessonId: 0, mapId: this.$route.query.mapId};
|
||||
@ -226,6 +239,8 @@ export default {
|
||||
}).catch(error => {
|
||||
this.$messageBox(this.$t('error.createSimulationFailed') + error.message);
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
reloadTable() {
|
||||
this.queryList.reload();
|
||||
@ -234,18 +249,32 @@ export default {
|
||||
this.$router.go(-1);
|
||||
},
|
||||
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 => {
|
||||
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}`);
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
queryFunction(params) {
|
||||
params['mapId'] = this.$route.query.mapId;
|
||||
if (this.drawWay === 'true') {
|
||||
return pageQueryTrainingNew(params);
|
||||
} else {
|
||||
return pageQueryTraining(params);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
|
@ -37,7 +37,7 @@
|
||||
|
||||
<script>
|
||||
import { getPublishLessonTree } from '@/api/jmap/lesson';
|
||||
import { trainingNotify } from '@/api/simulation';
|
||||
import { trainingNotifyNew } from '@/api/simulation';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
export default {
|
||||
@ -61,7 +61,6 @@ export default {
|
||||
getPublishLessonTree(this.$route.query.lessonId).then(response => {
|
||||
if (response.data.tree && response.data.tree.length > 0) {
|
||||
this.treeList = response.data.tree;
|
||||
console.log(this.treeList);
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$message.error(this.$t('tip.failedCourse') + ':' + error.message);
|
||||
@ -82,7 +81,7 @@ export default {
|
||||
if (obj && obj.type === 'Training') {
|
||||
if (obj.valid) {
|
||||
this.disabled = true;
|
||||
trainingNotify({ trainingId: obj.id }).then(resp => {
|
||||
trainingNotifyNew({ trainingId: obj.id }).then(resp => {
|
||||
const query = {
|
||||
group: resp.data, trainingId: obj.id, lessonId: this.$route.query.lessonId, mapId: this.$route.query.mapId
|
||||
};
|
||||
|
@ -61,7 +61,7 @@ import { setGoodsTryUse } from '@/api/management/goods';
|
||||
import { clearSimulation, getSimulationInfo } from '@/api/simulation';
|
||||
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
||||
import { checkLoginLine } from '@/api/login';
|
||||
import { loadMapDataById } from '@/utils/loaddata';
|
||||
import { loadNewMapDataByGroup } from '@/utils/loaddata';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import Vue from 'vue';
|
||||
import {loadDraftScript} from '@/api/designPlatform';
|
||||
@ -334,8 +334,8 @@ export default {
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
this.$store.dispatch('training/setPrdType', this.prdTypeMap[this.prdType]);
|
||||
|
||||
if (parseInt(this.mapId)) {
|
||||
await this.loadMapDataById(this.mapId);
|
||||
if (this.group) {
|
||||
await this.loadNewMapDataByGroup(this.group);
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
@ -346,8 +346,8 @@ export default {
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
this.switchMode('01');
|
||||
|
||||
if (parseInt(this.mapId)) {
|
||||
await this.loadMapDataById(this.mapId);
|
||||
if (this.group) {
|
||||
await this.loadNewMapDataByGroup(this.group);
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
@ -414,9 +414,9 @@ export default {
|
||||
},
|
||||
|
||||
// 通过id加载地图数据
|
||||
async loadMapDataById(mapId) {
|
||||
async loadNewMapDataByGroup(group) {
|
||||
try {
|
||||
await loadMapDataById(mapId);
|
||||
await loadNewMapDataByGroup(group);
|
||||
await this.$store.dispatch('training/setMapDefaultState');
|
||||
} catch (error) {
|
||||
this.$messageBox(`获取地图数据失败: ${error.message}`);
|
||||
|
@ -40,7 +40,7 @@
|
||||
</div>
|
||||
|
||||
<!-- <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-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 Scheduling from './demon/scheduling';
|
||||
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 { clearSimulation, loadScript, getSimulationInfoNew } from '@/api/simulation';
|
||||
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
||||
@ -165,6 +165,9 @@ export default {
|
||||
isLesson() {
|
||||
return this.mode === 'teach' || this.mode === 'manage';
|
||||
},
|
||||
isShowLeftSlider() {
|
||||
return (this.mode === 'teach' || this.mode === 'manage') && (this.$route.query.lessonId != '0');
|
||||
},
|
||||
isExam() {
|
||||
return this.mode === 'exam';
|
||||
},
|
||||
@ -191,11 +194,12 @@ export default {
|
||||
'$store.state.map.mapViewLoadedCount': function (val) { // 地图视图加载完成标识 开始加载默认状态
|
||||
this.mapBoxP = document.getElementById(this.canvasId).children[0];
|
||||
this.mapBox = document.getElementsByTagName('canvas');
|
||||
|
||||
if (this.trainingId) {
|
||||
getTrainingStepsDetail(this.trainingId, { group: this.group }).then(resp => {
|
||||
getTrainingStepsDetailNew(this.trainingId, { group: this.group }).then(resp => {
|
||||
this.trainingObj = resp.data;
|
||||
this.$store.dispatch('training/setTrainingData', this.trainingObj);
|
||||
}).catch(error => {
|
||||
this.$messageBox(`初始化失败实训内容失败: ${error.message}`);
|
||||
});
|
||||
}
|
||||
this.$refs.mapCanvas && this.$refs.mapCanvas.setShowStation(this.showStation);
|
||||
@ -367,11 +371,11 @@ export default {
|
||||
if (parseInt(this.trainingId)) {
|
||||
// 设置地图数据
|
||||
// 设置实训数据
|
||||
const resp = await getTrainingDetail(this.trainingId);
|
||||
const resp = await getTrainingDetailNew(this.trainingId);
|
||||
if (resp && resp.code == 200) {
|
||||
const detail = resp.data;
|
||||
await this.$store.dispatch('training/setPrdType', this.prdTypeMap[detail.prdType]);
|
||||
await this.loadMapDataById(this.mapId);
|
||||
await this.loadNewMapDataByGroup(this.group);
|
||||
} else {
|
||||
this.$messageBox(`获取实训步骤数据失败`);
|
||||
this.endViewLoading();
|
||||
|
@ -19,7 +19,7 @@
|
||||
<script>
|
||||
import TipExamList from './tipExamList';
|
||||
import { Notification } from 'element-ui';
|
||||
import { startTraining } from '@/api/jmap/training';
|
||||
import { startTrainingNew } from '@/api/jmap/training';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { refreshExamList, finishOneExamQuestion } from '@/api/management/userexam';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
@ -75,7 +75,7 @@ export default {
|
||||
this.startLoading = true;
|
||||
if (this.$route.query.trainingId) {
|
||||
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('map/clearJlmapTrainView').then(() => {
|
||||
this.$store.dispatch('training/setMapDefaultState').then(() => {
|
||||
|
@ -26,8 +26,8 @@
|
||||
import TipTrainingDetail from './tipTrainingDetail';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { Notification } from 'element-ui';
|
||||
import { startTraining, endTraining } from '@/api/jmap/training';
|
||||
import { trainingNotify } from '@/api/simulation';
|
||||
import { startTrainingNew, endTrainingNew } from '@/api/jmap/training';
|
||||
import { trainingNotifyNew } from '@/api/simulation';
|
||||
import { TrainingMode } from '@/scripts/ConstDic';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
@ -107,7 +107,7 @@ export default {
|
||||
this.startLoading = true;
|
||||
if (this.trainingObj && this.trainingObj.id) {
|
||||
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('training/teachModeStart', this.demoMode);
|
||||
this.$store.dispatch('training/setMapDefaultState').then(() => {
|
||||
@ -134,7 +134,7 @@ export default {
|
||||
usedTime: this.usedTime
|
||||
};
|
||||
|
||||
endTraining(mode, this.group).then(response => {
|
||||
endTrainingNew(mode, this.group).then(response => {
|
||||
const data = response.data;
|
||||
this.$store.dispatch('training/judgeFinish', data).then(rsp => {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
@ -181,7 +181,7 @@ export default {
|
||||
|
||||
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 } });
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('display.lesson.createSimulationError')}: ${error.message}`);
|
||||
|
@ -79,7 +79,7 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { refreshExamList } from '@/api/management/userexam';
|
||||
import { getTrainingDetail } from '@/api/jmap/training';
|
||||
import { getTrainingDetailNew } from '@/api/jmap/training';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
|
||||
export default {
|
||||
@ -151,7 +151,7 @@ export default {
|
||||
}
|
||||
});
|
||||
if (obj) {
|
||||
getTrainingDetail(obj.trainingId).then(res => {
|
||||
getTrainingDetailNew(obj.trainingId).then(res => {
|
||||
this.courseModel = {
|
||||
id: res.data.id,
|
||||
name: res.data.name,
|
||||
|
59
src/views/scriptManage/display/indexNew.vue
Normal file
59
src/views/scriptManage/display/indexNew.vue
Normal 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>
|
@ -18,7 +18,7 @@ import { UrlConfig } from '@/router/index';
|
||||
import { admin, superAdmin} from '@/router';
|
||||
import { getQuestPageList, createQuest, deleteQuest, updateQuest, publishQuest, retractQuest} from '@/api/quest';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { scriptDraftRecordNotify, scriptRecordNotify } from '@/api/simulation';
|
||||
import { scriptDraftRecordNotify, scriptRecordNotify, scriptRecordNotifyNew } from '@/api/simulation';
|
||||
import CreateScript from './create';
|
||||
import ScriptPublish from './publish';
|
||||
|
||||
@ -125,6 +125,16 @@ export default {
|
||||
}
|
||||
},
|
||||
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 => {
|
||||
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 });
|
||||
@ -132,6 +142,8 @@ export default {
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
deleteScript(index, row) {
|
||||
this.$confirm(this.$t('scriptRecord.deleteScriptTip'), this.$t('global.tips'), {
|
||||
|
@ -14,7 +14,7 @@
|
||||
<script>
|
||||
import Cookies from 'js-cookie';
|
||||
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 {
|
||||
name: 'AddRole',
|
||||
props: {
|
||||
@ -43,6 +43,23 @@ export default {
|
||||
methods: {
|
||||
initData() {
|
||||
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=>{
|
||||
const lastData = JSON.stringify(response.data);
|
||||
this.allRoleData = this.coverData(lastData);
|
||||
@ -56,6 +73,8 @@ export default {
|
||||
this.selectRoleData = data;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
coverData(data) {
|
||||
const roleTypeList = ConstConfig.ConstSelect.roleType;
|
||||
@ -72,32 +91,67 @@ export default {
|
||||
lastData = JSON.parse(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) {
|
||||
switch (direction) {
|
||||
case 'right': {
|
||||
const group = this.$props.group;
|
||||
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.$emit('refresh');
|
||||
})
|
||||
.catch(error => {
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('scriptRecord.selectScriptActorFail')}: ${error.message}`);
|
||||
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;
|
||||
}
|
||||
case 'left': {
|
||||
const group = this.$props.group;
|
||||
const data = movedKeys;
|
||||
cancleScriptMembers(group, data).then(response=>{
|
||||
if (this.$route.query.drawWay == 'true') {
|
||||
cancleScriptMembersNew(group, data).then(response=>{
|
||||
this.$emit('refresh');
|
||||
this.$message.success(this.$t('scriptRecord.cancleScriptActorSuccess'));
|
||||
})
|
||||
.catch(error => {
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('scriptRecord.cancleScriptActorFail')}: ${error.message}`);
|
||||
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();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -77,11 +77,13 @@ export default {
|
||||
getDeviceCode() {
|
||||
const params = {deviceType:'StationStand'};
|
||||
const group = this.$route.query.group;
|
||||
if (this.$route.query.drawWay != 'true') {
|
||||
getDeviceCodeByDeviceType(group, params).then(response =>{
|
||||
let resultData = response.data;
|
||||
resultData = JSON.parse(JSON.stringify(response.data).replace(/groupNumber/g, 'name'));
|
||||
this.stationList = resultData;
|
||||
});
|
||||
}
|
||||
},
|
||||
deviceSelect(em) {
|
||||
if (this.field.toUpperCase() === 'selectSingalCode'.toUpperCase() && em._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
|
@ -12,7 +12,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { addUserTraining } from '@/api/jmap/training';
|
||||
import { addUserTrainingNew } from '@/api/jmap/training';
|
||||
import { getPublishLessonList } from '@/api/jmap/lesson';
|
||||
import { getDimUserList } from '@/api/management/user';
|
||||
import AddTraining from './addTraining';
|
||||
@ -149,7 +149,7 @@ export default {
|
||||
save() {
|
||||
const self = this;
|
||||
if (this.formModel.userId) {
|
||||
addUserTraining(this.formModel).then(response => {
|
||||
addUserTrainingNew(this.formModel).then(response => {
|
||||
self.$message.success(this.$t('system.addSuccess'));
|
||||
self.handleClose();
|
||||
self.$emit('reloadTable');
|
||||
|
@ -9,7 +9,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { putUserTraining } from '@/api/jmap/training';
|
||||
import { putUserTrainingNew } from '@/api/jmap/training';
|
||||
export default {
|
||||
name: 'UsersTrainingEdit',
|
||||
props: {
|
||||
@ -82,7 +82,7 @@ export default {
|
||||
id: this.formModel.id,
|
||||
duration: this.formModel.duration
|
||||
};
|
||||
putUserTraining(param).then(response => {
|
||||
putUserTrainingNew(param).then(response => {
|
||||
self.$message.success(this.$t('system.updateSuccess'));
|
||||
self.handleClose();
|
||||
self.$emit('reloadTable');
|
||||
|
@ -7,7 +7,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getTrainingList, deleteUserTraining } from '@/api/jmap/training';
|
||||
import { getTrainingListNew, deleteUserTrainingNew } from '@/api/jmap/training';
|
||||
import UsersTrainingEdit from './edit';
|
||||
import UsersTrainingAdd from './add';
|
||||
export default {
|
||||
@ -39,7 +39,7 @@ export default {
|
||||
|
||||
},
|
||||
queryList: {
|
||||
query: getTrainingList,
|
||||
query: getTrainingListNew,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
@ -126,7 +126,7 @@ export default {
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteUserTraining(row.id).then(response => {
|
||||
deleteUserTrainingNew(row.id).then(response => {
|
||||
this.$message.success(this.$t('system.deleteSuccess'));
|
||||
this.reloadTable();
|
||||
}).catch(() => {
|
||||
|
@ -50,7 +50,8 @@ import { PermissionType } from '@/scripts/ConstDic';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import LimitList from '@/views/components/limits/index';
|
||||
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 localStore from 'storejs';
|
||||
|
||||
@ -75,7 +76,8 @@ export default {
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
},
|
||||
expandList: []
|
||||
expandList: [],
|
||||
drawWay: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -106,6 +108,13 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
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 => {
|
||||
if (response.data.tree && response.data.tree.length > 0) {
|
||||
this.courseModel = {
|
||||
@ -135,6 +144,18 @@ export default {
|
||||
if (obj && obj.type === 'Training') {
|
||||
if (obj.valid) {
|
||||
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 => {
|
||||
const query = {
|
||||
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.disabled = false;
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.$confirm(this.$t('tip.accessCourseNo'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
|
@ -36,7 +36,7 @@ export default {
|
||||
return this.$store.state.menuOperation.menuPosition;
|
||||
},
|
||||
drawWay() {
|
||||
return this.$route.query.drawWay;
|
||||
return this.$route.query.drawWay + '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -73,7 +73,7 @@ export default {
|
||||
},
|
||||
async kicked() {
|
||||
try {
|
||||
if (this.drawWay) {
|
||||
if (this.drawWay === 'true' ) {
|
||||
await putJointTrainingUserkickedNew(this.clickUserId, this.$route.query.group);
|
||||
} else {
|
||||
await putJointTrainingUserkicked(this.clickUserId, this.$route.query.group);
|
||||
|
@ -71,7 +71,7 @@ export default {
|
||||
return this.$store.state.user ? this.$store.state.user.id : '';
|
||||
},
|
||||
drawWay() {
|
||||
return this.$route.query.drawWay;
|
||||
return this.$route.query.drawWay + '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -92,7 +92,7 @@ export default {
|
||||
async handleSendText() {
|
||||
try {
|
||||
if (this.text.trim()) {
|
||||
if (this.drawWay) {
|
||||
if (this.drawWay === 'true') {
|
||||
await chatWithTextNew(this.text, this.group);
|
||||
} else {
|
||||
await chatWithText(this.text, this.group);
|
||||
|
@ -173,7 +173,7 @@ export default {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
drawWay() {
|
||||
return this.$route.query.drawWay;
|
||||
return this.$route.query.drawWay + '';
|
||||
},
|
||||
userId() {
|
||||
return this.$store.state.user ? this.$store.state.user.id : '';
|
||||
@ -239,7 +239,7 @@ export default {
|
||||
this.$message.info(this.$t('error.theDeviceTypeAlreadyExists'));
|
||||
return;
|
||||
}
|
||||
if (this.drawWay) {
|
||||
if (this.drawWay === 'true') {
|
||||
await setRealDeviceNew(this.group, roomDeviceVo);
|
||||
} else {
|
||||
await setRealDevice(this.group, roomDeviceVo);
|
||||
@ -247,7 +247,7 @@ export default {
|
||||
},
|
||||
async handleUpdDevice({deviceType, device}) {
|
||||
try {
|
||||
if (this.drawWay) {
|
||||
if (this.drawWay === 'true') {
|
||||
await setRealDeviceNew(this.group, device);
|
||||
} else {
|
||||
await setRealDevice(this.group, device);
|
||||
@ -258,7 +258,7 @@ export default {
|
||||
},
|
||||
async handleDelDevice({deviceType, device}) {
|
||||
try {
|
||||
if (this.drawWay) {
|
||||
if (this.drawWay === 'true') {
|
||||
await delRealDeviceNew(device.id, this.group);
|
||||
} else {
|
||||
await delRealDevice(device.id, this.group);
|
||||
@ -277,7 +277,7 @@ export default {
|
||||
userRole: 'Audience',
|
||||
deviceCode: ''
|
||||
}];
|
||||
if (this.drawWay) {
|
||||
if (this.drawWay === 'true') {
|
||||
params[0].userRole = 'AUDIENCE';
|
||||
await putUserRolesNew(params, this.group);
|
||||
} else {
|
||||
@ -301,7 +301,7 @@ export default {
|
||||
deviceCode: deviceCode,
|
||||
ibpPart: user.ibpPart
|
||||
}];
|
||||
if (this.drawWay) {
|
||||
if (this.drawWay === 'true') {
|
||||
params[0].userRole = roleType.toUpperCase();
|
||||
if (roleType === 'Attendant') {
|
||||
params[0].userRole = 'STATION_SUPERVISOR';
|
||||
@ -326,7 +326,7 @@ export default {
|
||||
if (userList.length) {
|
||||
try {
|
||||
let list = [];
|
||||
if (this.drawWay) {
|
||||
if (this.drawWay === 'true') {
|
||||
if (roleType === 'Attendant') {
|
||||
list = userList.map(elem => { return { id: elem.id, nickName: elem.nickName, userRole: 'STATION_SUPERVISOR' }; });
|
||||
} else if (roleType === 'Repair') {
|
||||
@ -356,7 +356,7 @@ export default {
|
||||
async handlePostQrcode() {
|
||||
this.disabled = true;
|
||||
let res = '';
|
||||
if (this.drawWay) {
|
||||
if (this.drawWay === 'true') {
|
||||
res = await getJoinTrainCodeNew({}, this.group);
|
||||
} else {
|
||||
res = await getJoinTrainCode({}, this.group);
|
||||
@ -384,7 +384,7 @@ export default {
|
||||
this.disabled = true;
|
||||
if (this.attendantList.findIndex(item => { return !item.deviceCode; }) < 0) {
|
||||
try {
|
||||
if (this.drawWay) {
|
||||
if (this.drawWay === 'true') {
|
||||
await startJointTrainingNew(this.group);
|
||||
} else {
|
||||
await startJointTraining(this.group);
|
||||
@ -402,7 +402,7 @@ export default {
|
||||
try {
|
||||
this.disabled = true;
|
||||
let res = '';
|
||||
if (this.drawWay) {
|
||||
if (this.drawWay === 'true') {
|
||||
res = await putJointTrainingSimulationNew(this.group);
|
||||
} else {
|
||||
res = await putJointTrainingSimulation(this.group);
|
||||
@ -422,7 +422,7 @@ export default {
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
try {
|
||||
if (this.drawWay) {
|
||||
if (this.drawWay === 'true') {
|
||||
await deljointTrainRoomNew(this.group);
|
||||
} else {
|
||||
await deljointTrainRoom(this.group);
|
||||
@ -439,7 +439,7 @@ export default {
|
||||
async handleBack() {
|
||||
try {
|
||||
this.disabled = true;
|
||||
if (this.drawWay) {
|
||||
if (this.drawWay === 'true') {
|
||||
await putJointTrainingExitNew(this.group);
|
||||
} else {
|
||||
await putJointTrainingExit(this.group);
|
||||
|
@ -89,7 +89,7 @@ export default {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
drawWay() {
|
||||
return this.$route.query.drawWay;
|
||||
return this.$route.query.drawWay + '';
|
||||
},
|
||||
userId() {
|
||||
return this.$store.state.user ? this.$store.state.user.id : '';
|
||||
@ -129,9 +129,9 @@ export default {
|
||||
methods: {
|
||||
async loadInit() {
|
||||
await this.subscribe();
|
||||
if (!this.$store.state.socket.setInRoom && !this.drawWay) {
|
||||
if (!this.$store.state.socket.setInRoom && this.drawWay !== 'true') {
|
||||
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 this.getRoomInfo();
|
||||
@ -146,7 +146,7 @@ export default {
|
||||
},
|
||||
async getRoomInfo() {
|
||||
let resp = '';
|
||||
if (this.drawWay) {
|
||||
if (this.drawWay === 'true') {
|
||||
resp = await postRoomDetailNew(this.group);
|
||||
} else {
|
||||
resp = await postRoomDetail(this.group);
|
||||
@ -159,7 +159,7 @@ export default {
|
||||
},
|
||||
async getStandList() {
|
||||
let resp = '';
|
||||
if (this.drawWay) {
|
||||
if (this.drawWay === 'true') {
|
||||
resp = await getRealDevicesNew(this.group);
|
||||
} else {
|
||||
resp = await getRealDevices(this.group);
|
||||
@ -188,7 +188,7 @@ export default {
|
||||
},
|
||||
async getUserList() {
|
||||
let res = '';
|
||||
if (this.drawWay) {
|
||||
if (this.drawWay === 'true') {
|
||||
res = await getJointTrainRoomUserListNew(this.group);
|
||||
} else {
|
||||
res = await getJointTrainRoomUserList(this.group);
|
||||
@ -276,15 +276,15 @@ export default {
|
||||
},
|
||||
async jumpInSimulation() {
|
||||
const room = this.room;
|
||||
if (this.drawWay) {
|
||||
if (this.drawWay === 'true') {
|
||||
await putJointTrainingSimulationEntranceNew(room.group);
|
||||
} else {
|
||||
await putJointTrainingSimulationEntrance(room.group);
|
||||
}
|
||||
const rest = await getPublishMapInfo(room.mapId);
|
||||
const query = { lineCode: rest.data.lineCode, mapId: room.mapId, group: room.group, roomId: room.id };
|
||||
if (this.$route.query.drawWay) {
|
||||
query.drawWay = this.$route.query.drawWay;
|
||||
if (this.drawWay === 'true') {
|
||||
query.drawWay = this.drawWay;
|
||||
this.$router.replace({ path: `/jointTrainingNew`, query: query});
|
||||
} else {
|
||||
this.$router.replace({ path: `/jointTraining`, query: query });
|
||||
|
Loading…
Reference in New Issue
Block a user