diff --git a/src/jmapNew/config/skinCode/race_01.js b/src/jmapNew/config/skinCode/race_01.js index d40524404..b2f05590c 100644 --- a/src/jmapNew/config/skinCode/race_01.js +++ b/src/jmapNew/config/skinCode/race_01.js @@ -686,8 +686,8 @@ class SkinCode extends defaultStyle { trainServerOffset: { x: 4, y: 4 }// 列车服务号偏移 }, trainTarget: { - tripNumberPrefix: '000', // 车次号前缀 - defaultTripNumber: 'DDD', // 默认车次号2 + tripNumberPrefix: '0000', // 车次号前缀 + defaultTripNumber: 'BBBB', // 默认车次号2 trainTargetOffset: { x: 36, y: 4 }, // 列车车次号偏移 trainTargetTextAlign: 'left'// 车次号文字显示位置 }, @@ -708,7 +708,7 @@ class SkinCode extends defaultStyle { common: { trainHeight: 20, // 列车高度 trainHeadDistance: 4, // 列车和车头之间的间距 - trainWidth: 40, // 列车长度 + trainWidth: 48, // 列车长度 trainTextFontSize: 12, // 列车字号 fontFamily: 'consolas', // 默认字体 族类 haveTextHSDA: true, // 是否需创建textHSDA对象 diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index 125263262..0ea48be33 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -256,6 +256,7 @@ class Jlmap { } else { elem['points'] = { x: model.points[model.points.length - 1].x, y: model.points[model.points.length - 1].y }; } + console.log(elem, 'overAp'); } // const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig); const oDevice = deviceFactory(type, elem, this.showConfig); diff --git a/src/jmapNew/theme/foshan_01/menus/menuSwitch.vue b/src/jmapNew/theme/foshan_01/menus/menuSwitch.vue index 7df37b64f..3592d34fe 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuSwitch.vue @@ -170,15 +170,15 @@ export default { this.menu = MenuContextHandler.covert(this.menuNormal); // 故障模式菜单列表 if (this.operatemode === OperateMode.FAULT) { - if (!this.$store.state.scriptRecord.bgSet) { - const menuHook = [{ - label: '道岔钩锁', - handler: this.hookLock - }]; - this.menu = [...this.menuForce, ...menuHook]; - } else { - this.menu = this.menuForce; - } + // if (!this.$store.state.scriptRecord.bgSet) { + const menuHook = [{ + label: '道岔钩锁', + handler: this.hookLock + }]; + this.menu = [...this.menuForce, ...menuHook]; + // } else { + // this.menu = this.menuForce; + // } } }, doShow(point) { diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuSwitch.vue b/src/jmapNew/theme/fuzhou_01/menus/menuSwitch.vue index 451147651..4ab788f05 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuSwitch.vue @@ -210,15 +210,15 @@ export default { // 故障模式菜单列表 if (this.operatemode === OperateMode.FAULT) { - if (!this.$store.state.scriptRecord.bgSet) { - const menuHook = [{ - label: '道岔钩锁', - handler: this.hookLock - }]; - this.menu = [...this.menuForce, ...menuHook]; - } else { - this.menu = this.menuForce; - } + // if (!this.$store.state.scriptRecord.bgSet) { + const menuHook = [{ + label: '道岔钩锁', + handler: this.hookLock + }]; + this.menu = [...this.menuForce, ...menuHook]; + // } else { + // this.menu = this.menuForce; + // } } }, doShow(point) { diff --git a/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue b/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue index 2ff620c8f..18d8095d1 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue @@ -184,15 +184,15 @@ export default { this.menu = MenuContextHandler.covert(this.menuNormal); // 故障模式菜单列表 if (this.operatemode === OperateMode.FAULT) { - if (!this.$store.state.scriptRecord.bgSet) { - const menuHook = [{ - label: '道岔钩锁', - handler: this.hookLock - }]; - this.menu = [...this.menuForce, ...menuHook]; - } else { - this.menu = this.menuForce; - } + // if (!this.$store.state.scriptRecord.bgSet) { + const menuHook = [{ + label: '道岔钩锁', + handler: this.hookLock + }]; + this.menu = [...this.menuForce, ...menuHook]; + // } else { + // this.menu = this.menuForce; + // } } }, doShow(point) { diff --git a/src/jmapNew/theme/ningbo_03/menus/menuSwitch.vue b/src/jmapNew/theme/ningbo_03/menus/menuSwitch.vue index 7f153a998..a666f4f4f 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuSwitch.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuSwitch.vue @@ -179,15 +179,15 @@ export default { this.menu = MenuContextHandler.covert(this.menuNormal); // 故障模式菜单列表 if (this.operatemode === OperateMode.FAULT) { - if (!this.$store.state.scriptRecord.bgSet) { - const menuHook = [{ - label: '道岔钩锁', - handler: this.hookLock - }]; - this.menu = [...this.menuForce, ...menuHook]; - } else { - this.menu = this.menuForce; - } + // if (!this.$store.state.scriptRecord.bgSet) { + const menuHook = [{ + label: '道岔钩锁', + handler: this.hookLock + }]; + this.menu = [...this.menuForce, ...menuHook]; + // } else { + // this.menu = this.menuForce; + // } } }, doShow(point) { diff --git a/src/jmapNew/theme/race_01/menus/menuSwitch.vue b/src/jmapNew/theme/race_01/menus/menuSwitch.vue index 0e447ed5a..18fb945ae 100644 --- a/src/jmapNew/theme/race_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/race_01/menus/menuSwitch.vue @@ -199,15 +199,15 @@ export default { this.menu = MenuContextHandler.covert(this.menuNormal); // 故障模式菜单列表 if (this.operatemode === OperateMode.FAULT) { - if (!this.$store.state.scriptRecord.bgSet) { - const menuHook = [{ - label: '道岔钩锁', - handler: this.hookLock - }]; - this.menu = [...this.menuForce, ...menuHook]; - } else { - this.menu = this.menuForce; - } + // if (!this.$store.state.scriptRecord.bgSet) { + const menuHook = [{ + label: '道岔钩锁', + handler: this.hookLock + }]; + this.menu = [...this.menuForce, ...menuHook]; + // } else { + // this.menu = this.menuForce; + // } } }, doShow(point) { diff --git a/src/jmapNew/theme/xian_01/menus/menuSwitch.vue b/src/jmapNew/theme/xian_01/menus/menuSwitch.vue index 166f6c2fb..82435b89d 100644 --- a/src/jmapNew/theme/xian_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/xian_01/menus/menuSwitch.vue @@ -213,11 +213,11 @@ export default { } // 故障模式菜单列表 if (this.operatemode === OperateMode.FAULT) { - if (!this.$store.state.scriptRecord.bgSet) { - this.menu = [...this.menuForce, ...this.menuDirective]; - } else { - this.menu = this.menuForce; - } + // if (!this.$store.state.scriptRecord.bgSet) { + this.menu = [...this.menuForce, ...this.menuDirective]; + // } else { + // this.menu = this.menuForce; + // } } }, doShow(point) { diff --git a/src/router/index_Common.js b/src/router/index_Common.js index e8d394584..43d667009 100644 --- a/src/router/index_Common.js +++ b/src/router/index_Common.js @@ -27,7 +27,6 @@ const Jlmap3dOtherVR = () => import('@/views/jlmap3d/maintainer/jl3dothervr'); const DisplayNew = () => import('@/views/newMap/displayNew/index'); const DesignDisplayNew = () => import('@/views/newMap/displayNew/scriptDisplay/scriptPreview/index'); -const TrainRoom = () => import('@/views/trainRoom/index'); const JointTrainingNew = () => import('@/views/newMap/jointTrainingNew/index'); const Errpr404 = () => import('@/views/error-page/404'); @@ -60,7 +59,6 @@ const Taskmanage = () => import('@/views/lesson/taskmanage/list'); const TrainingRuleList = () => import('@/views/lesson/trainingRule/list'); const TrainingRuleEdit = () => import('@/views/lesson/trainingRule/detail/index'); const Trainingmanage = () => import('@/views/lesson/trainingmanage/index'); -const TrainingmanageOld = () => import('@/views/lesson/trainingmanage/oldMap'); const LessonEdit = () => import('@/views/lesson/lessoncategory/index'); const LessonHome = () => import('@/views/lesson/home'); const LessonDetail = () => import('@/views/lesson/details'); @@ -325,11 +323,6 @@ export const publicAsyncRoute = [ component: BigSplitScreen, hidden: true }, - { // 综合演练室 - path: '/trainroom', - component: TrainRoom, - hidden: true - }, { path: '/refereeJsxtDisplay', component: RefereeDisplay, @@ -461,11 +454,6 @@ export const asyncRouter = [ component: Trainingmanage, hidden: true }, - {// 老地图实训管理 - path: 'lesson/TrainingmanageOld', - component: TrainingmanageOld, - hidden: true - }, { // 创建课程 path: 'lesson/edit/:type', component: LessonEdit, diff --git a/src/router/index_HEB.js b/src/router/index_HEB.js index 6d3f525b4..c35544df0 100644 --- a/src/router/index_HEB.js +++ b/src/router/index_HEB.js @@ -17,7 +17,6 @@ const Jlmap3dPassFlow = () => import('@/views/jlmap3d/passflow/jl3dpassflow'); const Jlmap3dTrain = () => import('@/views/jlmap3d/devicetrain/jl3ddevicetrain'); const DisplayNew = () => import('@/views/newMap/displayNew/index'); -const TrainRoom = () => import('@/views/trainRoom/index'); const JointTrainingNew = () => import('@/views/newMap/jointTrainingNew/index'); const Errpr404 = () => import('@/views/error-page/404'); @@ -209,12 +208,6 @@ export const publicAsyncRoute = [ component: DisplayNew, hidden: true }, - - { // 综合演练室 - path: '/trainroom', - component: TrainRoom, - hidden: true - }, { path: '/jointTrainingNew', component: JointTrainingNew, diff --git a/src/utils/mapList.js b/src/utils/mapList.js index 2053f1cba..bff8520f9 100644 --- a/src/utils/mapList.js +++ b/src/utils/mapList.js @@ -2,13 +2,13 @@ import { getSessionStorage } from '@/utils/auth'; import { listPublishMap, getMapListByProjectCode } from '@/api/jmap/map'; import { ProjectCode } from '@/scripts/ProjectConfig'; -export async function getMapListByProject(drawWay) { +export async function getMapListByProject() { const project = getSessionStorage('project'); let mapList = []; if (project.endsWith('xty') || project.endsWith('gzb')) { mapList = await getMapListByProjectCode(ProjectCode[project]); } else { - mapList = await listPublishMap({ 'drawWay': drawWay }); + mapList = await listPublishMap({ 'drawWay': true }); } return mapList; } diff --git a/src/views/demonstration/deomonList/index.vue b/src/views/demonstration/deomonList/index.vue index 81fe6b297..8f9f6d449 100644 --- a/src/views/demonstration/deomonList/index.vue +++ b/src/views/demonstration/deomonList/index.vue @@ -116,17 +116,9 @@ export default { }, async handleJoinRoom(data) { try { - const rest = await getPublishMapInfo(data.map.id); launchFullscreen(); - if (rest.data.drawWay) { - const query = { lineCode: data.map.lineCode, mapId: data.map.id, group: data.group}; - this.$router.push({path:'/jointTrainingNew', query:query}); - } else { - await getjointTraining(data.group); - const query = { group: data.group, drawWay: rest.data.drawWay }; - this.$router.push({ path: `/trainroom`, query: query }); - } - + const query = { lineCode: data.map.lineCode, mapId: data.map.id, group: data.group}; + this.$router.push({path:'/jointTrainingNew', query:query}); } catch (e) { console.error(e); } finally { diff --git a/src/views/demonstration/deomonTopic/index.vue b/src/views/demonstration/deomonTopic/index.vue index 1ad920cf1..13f60129e 100644 --- a/src/views/demonstration/deomonTopic/index.vue +++ b/src/views/demonstration/deomonTopic/index.vue @@ -76,24 +76,9 @@ export default { try { this.loading = true; const rest = await getPublishMapInfo(this.mapId); - const drawWay = rest.data.drawWay; - if (drawWay) { - launchFullscreen(); - const query = { lineCode: this.lineCode, mapId: this.mapId, group: this.group}; - this.$router.push({path: `/jointTrainingNew`, query: query}); - } else { - await getjointTraining(this.group); - if (this.state == '02') { - this.subscribe(); - launchFullscreen(); - const query = { lineCode: rest.data.lineCode, mapId: this.mapId, group: this.group, drawWay: drawWay }; - await putJointTrainingSimulationEntrance(this.group); - this.$router.push({ path: `/jointTraining`, query: query }); - } else if (this.state == '01') { - const query = { group: this.group, drawWay: drawWay }; - this.$router.push({ path: `/trainroom`, query: query }); - } - } + launchFullscreen(); + const query = { lineCode: this.lineCode, mapId: this.mapId, group: this.group}; + this.$router.push({path: `/jointTrainingNew`, query: query}); this.dialogShow = false; } catch (e) { this.$messageBox(this.$t('tip.enterTrainingRoomFailed')); diff --git a/src/views/demonstration/detail/index.vue b/src/views/demonstration/detail/index.vue index b46685f37..906107c44 100644 --- a/src/views/demonstration/detail/index.vue +++ b/src/views/demonstration/detail/index.vue @@ -17,8 +17,6 @@ {{ $t('global.buy') }} {{ $t('global.distributePermission') }} {{ $t('demonstration.startSimulation') }} - {{ $t('demonstration.createRoom') }} - {{ $t('demonstration.enterRoom') }} @@ -63,7 +61,6 @@ export default { jointShow: false, jointGroup: '', lineCode:'', - drawWay: false, // 是否新版地图 loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts'] }; }, @@ -88,19 +85,13 @@ export default { return this.courseModel.prdType === '03'; }, isStartDemon() { - return (this.hasPermssion || this.tryTime > 0) && !(this.courseModel.prdType === '03' && !this.drawWay); + return (this.hasPermssion || this.tryTime > 0); }, mapId() { return this.$route.query.mapId; }, project() { return getSessionStorage('project'); - }, - isCreateRoom() { - return this.courseModel.prdType === '03' && this.hasPermssion && !this.jointShow && !this.drawWay; - }, - isInRoom() { - return this.courseModel.prdType === '03' && this.hasPermssion && this.jointShow && !this.drawWay; } }, watch: { @@ -130,7 +121,6 @@ export default { const resp = await getSubSystemDetail(this.$route.params.subSystem); this.tryUser = 0; this.loading = false; - this.drawWay = res.data.drawWay; const remarksList = { '01':'ATS现地工作站原理级仿真系统,实现车站值班员培训功能。', '02':'ATS行调工作站原理级仿真系统,实现行车调度员培训功能。', @@ -151,9 +141,6 @@ export default { PermissionType: PermissionType.SIMULATION }; this.currentPrdType = resp.data.prdType; - if (resp.data.prdType === '03' && !this.drawWay) { - this.getJointTrainingList(); - } if (!this.courseModel.pmsList) { this.tryUser = 1; const paras = { @@ -200,7 +187,7 @@ export default { this.disabled = true; await getjointTraining(this.jointGroup); this.$store.dispatch('socket/setInRoom', true); - const query = { lineCode: this.courseModel.lineCode, group: this.jointGroup, drawWay: this.drawWay}; + const query = { lineCode: this.courseModel.lineCode, group: this.jointGroup}; this.$router.push({ path: `/trainroom`, query: query }); }, async createRoom() { @@ -212,7 +199,7 @@ export default { }; const res = await postCreateRoom(param); if (res && res.code == 200) { - const query = { lineCode: this.courseModel.lineCode, group: res.data, drawWay: this.drawWay }; + const query = { lineCode: this.courseModel.lineCode, group: res.data }; this.$router.push({ path: `/trainroom`, query: query }); } } catch (error) { @@ -232,7 +219,7 @@ export default { async enterIntegratedSimulation() { const data = { mapId: this.courseModel.mapId, prdType: this.currentPrdType }; createSimulationNew(data).then(resp => { - const query = { lineCode: this.courseModel.lineCode, group: resp.data, mapId: this.courseModel.mapId, drawWay: true }; + const query = { lineCode: this.courseModel.lineCode, group: resp.data, mapId: this.courseModel.mapId}; if (this.loadingProjectList.includes(this.project)) { this.$store.dispatch('app/transitionAnimations'); } @@ -248,11 +235,7 @@ export default { this.disabled = true; const data = { mapId: this.courseModel.mapId, prdType: this.currentPrdType, lineCode: this.courseModel.lineCode }; let res = {}; - if (!this.drawWay) { - res = await simulationNotify(data); - } else { - res = await createSimulationNew(data); - } + res = await createSimulationNew(data); if (res && res.code == 200) { const query = { group: res.data, lineCode:this.courseModel.lineCode }; this.$router.push({ path: `/displayIscs/system`, query: query }); @@ -278,8 +261,7 @@ export default { if (this.courseModel.prdType == '05') { this.jumpScheduling(); } else if (this.courseModel.prdType == '03') { - this.drawWay && this.enterIntegratedSimulation(); - !this.drawWay && this.createRoom(); + this.enterIntegratedSimulation(); } else if (this.courseModel.prdType == '06') { this.enterISCS(); } else if (this.courseModel.prdType == '07') { @@ -293,22 +275,14 @@ export default { setTimeout(() => { const data = { mapId: this.courseModel.mapId, prdType: this.currentPrdType }; try { - if (this.drawWay) { - createSimulationNew(data).then(resp => { - const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser }; - if (this.loadingProjectList.includes(this.project)) { - this.$store.dispatch('app/transitionAnimations'); - } - this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query }); - launchFullscreen(); - }); - } else { - schedulingNotify(data).then(resp => { - const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser }; - this.$router.push({ path: `${UrlConfig.display}/demon`, query: query }); - launchFullscreen(); - }); - } + createSimulationNew(data).then(resp => { + const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser }; + if (this.loadingProjectList.includes(this.project)) { + this.$store.dispatch('app/transitionAnimations'); + } + this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query }); + launchFullscreen(); + }); } catch (e) { this.$messageBox(this.$t('error.createSimulationFailed') + e.message); this.disabled = false; @@ -319,29 +293,18 @@ export default { this.disabled = true; setTimeout(() => { const data = { mapId: this.courseModel.mapId, prdType: this.currentPrdType }; - if (!this.drawWay) { - simulationNotify(data).then(resp => { - const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser, project: this.project }; - this.$router.push({ path: `${UrlConfig.display}/demon`, query: query }); - launchFullscreen(); - }).catch(error => { - this.$messageBox(this.$t('error.createSimulationFailed') + error.message); - this.disabled = false; - }); - } else { - createSimulationNew(data).then(resp => { - const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser, project: this.project }; - this.$store.dispatch('training/setPrdType', this.currentPrdType); // 改变prdType - if (this.loadingProjectList.includes(this.project)) { - this.$store.dispatch('app/transitionAnimations'); - } - this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query }); - launchFullscreen(); - }).catch(error => { - this.$messageBox(this.$t('error.createSimulationFailed') + error.message); - this.disabled = false; - }); - } + createSimulationNew(data).then(resp => { + const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser, project: this.project }; + this.$store.dispatch('training/setPrdType', this.currentPrdType); // 改变prdType + if (this.loadingProjectList.includes(this.project)) { + this.$store.dispatch('app/transitionAnimations'); + } + this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query }); + launchFullscreen(); + }).catch(error => { + this.$messageBox(this.$t('error.createSimulationFailed') + error.message); + this.disabled = false; + }); }, 100); }, buy() { diff --git a/src/views/designPlatform/demonList.vue b/src/views/designPlatform/demonList.vue index 3036111af..7568da2c4 100644 --- a/src/views/designPlatform/demonList.vue +++ b/src/views/designPlatform/demonList.vue @@ -93,18 +93,18 @@ export default { switch (obj.type) { case 'scriptDesign': { setSessionStorage('designType', 'scriptDesign'); - const query = {lineCode:obj.lineCode, drawWay:obj.drawWay}; + const query = {lineCode:obj.lineCode}; this.$router.push({ path: `${UrlConfig.design.scriptHome}/${obj.mapId}?`, query}); break; } case 'lessonDesign': { setSessionStorage('designType', 'lessonDesign'); - this.$router.push({ path: `${UrlConfig.design.lessonHome}/${obj.mapId}?lineCode=${obj.lineCode}&cityCode=${obj.cityCode}&drawWay=${data.parent.data.drawWay}` }); + this.$router.push({ path: `${UrlConfig.design.lessonHome}/${obj.mapId}?lineCode=${obj.lineCode}&cityCode=${obj.cityCode}` }); break; } case 'runPlanDesign': { setSessionStorage('designType', 'runPlanDesign'); - this.$router.push({ path: `${UrlConfig.design.runPlan}/${obj.mapId}?lineCode=${obj.lineCode}&drawWay=${obj.drawWay}` }); + this.$router.push({ path: `${UrlConfig.design.runPlan}/${obj.mapId}?lineCode=${obj.lineCode}` }); break; } case 'map': { @@ -152,7 +152,6 @@ export default { type: 'mapPreview', mapId: elem.id, cityCode: elem.cityCode, - drawWay: elem.drawWay } ]; this.isAdministrator() ? elem.children.push({id: '2', name: this.$t('designPlatform.lessonDesign'), type: 'lessonDesign', mapId: elem.id, cityCode: elem.cityCode, lineCode: elem.lineCode}) : ''; @@ -164,7 +163,6 @@ export default { mapId: elem.id, cityCode: elem.cityCode, lineCode: elem.lineCode, - drawWay: elem.drawWay // code:elem.children.find(n => { return n.name.includes("行调")}) }); elem.children.push( @@ -175,7 +173,6 @@ export default { mapId: elem.id, lineCode: elem.lineCode, cityCode: elem.cityCode, - drawWay: elem.drawWay } ); if (process.env.VUE_APP_PRO !== 'local') { diff --git a/src/views/exam/detail/examDetail.vue b/src/views/exam/detail/examDetail.vue index 46cfb7eee..a6fbbc5c9 100644 --- a/src/views/exam/detail/examDetail.vue +++ b/src/views/exam/detail/examDetail.vue @@ -85,7 +85,6 @@ export default { typeList: [], examList: [], trainingOperateTypeMap: {}, - drawWay: false, lineCode: '', // 线路对应的皮肤 loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts'] }; @@ -108,75 +107,17 @@ export default { }, methods: { async getList() { - if (this.drawWay) { - this.typeList = []; - for (const val in ConstConfig.ConstSelect.trainingDeviceType) { - this.typeList.push({name: LangStorage.getLang() == 'en' ? ConstConfig.ConstSelect.trainingDeviceType[val].enlabel : ConstConfig.ConstSelect.trainingDeviceType[val].label, code: val}); - } - this.trainingOperateTypeMap = getTrainingOperateTypeMap(); - } else { - this.trainingOperateTypeMap = {}; - this.$Dictionary.stationControl().then(list => { - this.trainingOperateTypeMap['01'] = list; // 控制权实训 - }); - this.$Dictionary.signalOperation().then(list => { - this.trainingOperateTypeMap['02'] = list; // 信号机实训 - }); - this.$Dictionary.switchOperation().then(list => { - this.trainingOperateTypeMap['03'] = list; // 道岔实训 - }); - this.$Dictionary.sectionOperation().then(list => { - this.trainingOperateTypeMap['04'] = list; // 区段实训 - }); - this.$Dictionary.stationStandOperation().then(list => { - this.trainingOperateTypeMap['05'] = list; // 站台实训 - }); - this.$Dictionary.trainPlanOperation().then(list => { - this.trainingOperateTypeMap['06'] = list; // 行车计划实训 - }); - this.$Dictionary.trainOperation().then(list => { - this.trainingOperateTypeMap['07'] = list; // 列车实训 - }); - const res = await getDetailList('training_type'); - this.typeList = res.data; - if (LangStorage.getLang() == 'en' && this.typeList) { - this.typeList.forEach(item => { - switch (item.code) { - case '01': - item.name = 'Control permission operation'; - break; - case '02': - item.name = 'Signalling machine operation'; - break; - case '03': - item.name = 'Turnout operation'; - break; - case '04': - item.name = 'Section operation'; - break; - case '05': - item.name = 'Platform operation'; - break; - case '06': - item.name = 'Train scheduling operation'; - break; - case '07': - item.name = 'Train operation'; - break; - case '08': - item.name = 'Temporary speed limit operation of the whole line'; - break; - } - }); - } + this.typeList = []; + for (const val in ConstConfig.ConstSelect.trainingDeviceType) { + this.typeList.push({name: LangStorage.getLang() == 'en' ? ConstConfig.ConstSelect.trainingDeviceType[val].enlabel : ConstConfig.ConstSelect.trainingDeviceType[val].label, code: val}); } + this.trainingOperateTypeMap = getTrainingOperateTypeMap(); }, async loadInitPage(examId) { if (examId) { try { const response = await getPublishMapInfo(this.$route.query.mapId); if (response.data) { - this.drawWay = response.data.drawWay; this.lineCode = response.data.lineCode; this.typeList = []; await this.getList(); @@ -246,26 +187,7 @@ export default { async exmaStart() { this.disabled = true; await this.examDetail(); - if (this.examList.length && !this.drawWay) { - examNotify({ 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, - lineCode: this.lineCode, - noPreLogout: this.$route.query.noPreLogout - }; - this.$router.push({ path: `${UrlConfig.display}/exam`, query: query }); - launchFullscreen(); - }).catch(error => { - this.disabled = false; - this.$messageBox( this.$t('error.createSimulationFailed') + `: ${error.message}`); - }); - } else if (this.examList.length && this.drawWay) { + if (this.examList.length) { examNotifyNew({ examId: this.$route.params.examId }).then(resp => { const query = { group: resp.data, diff --git a/src/views/ibp/ibpsystem/index.vue b/src/views/ibp/ibpsystem/index.vue index a1c67cca6..c8b33e309 100644 --- a/src/views/ibp/ibpsystem/index.vue +++ b/src/views/ibp/ibpsystem/index.vue @@ -66,9 +66,6 @@ export default { ]), ibpId() { return ['ibp', (Math.random().toFixed(5)) * 100000].join('_'); - }, - drawWay() { - return this.$route.query.drawWay + ''; } }, watch: { diff --git a/src/views/iscs/iscsDesign/mapmanage/create.vue b/src/views/iscs/iscsDesign/mapmanage/create.vue index 1a1534691..5bf0aa462 100644 --- a/src/views/iscs/iscsDesign/mapmanage/create.vue +++ b/src/views/iscs/iscsDesign/mapmanage/create.vue @@ -130,10 +130,8 @@ export default { getLineCodeList().then(response => { this.lineCodeList = response.data; }); - // 新地图 - const drawWay = true; - getMapListByProject(drawWay).then(response => { + getMapListByProject().then(response => { this.publishMapList = response.data; }).catch(() => { this.$messageBox(this.$t('map.failedLoadListPublishedMaps')); diff --git a/src/views/iscsSystem/index.vue b/src/views/iscsSystem/index.vue index 91f6f9f92..1a491f7ff 100644 --- a/src/views/iscsSystem/index.vue +++ b/src/views/iscsSystem/index.vue @@ -67,9 +67,6 @@ export default { iscsId() { return ['iscs', (Math.random().toFixed(5)) * 100000].join('_'); }, - drawWay() { - return this.$route.query.drawWay + ''; - }, width() { return this.$store.state.config.width; }, @@ -262,17 +259,11 @@ export default { back() { this.group = this.$route.query.group; this.$store.dispatch('training/over').then(() => { - 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(); - }); - } else { - putJointTrainingSimulationUser(this.group).then(() => { - this.$router.replace({ path: `/trainroom`, query: { group: this.group, lineCode:this.$route.query.lineCode } }); - exitFullscreen(); - }); - } + putJointTrainingSimulationUserNew(this.group).then(() => { + this.$router.replace({ path: `/trainroom`, query: { group: this.group, lineCode:this.$route.query.lineCode } }); + exitFullscreen(); + }); + }); }, iscsDestroy() { diff --git a/src/views/jlmap3d/drive/drivecontrol/centerpane.vue b/src/views/jlmap3d/drive/drivecontrol/centerpane.vue index 28cb67120..016b93185 100644 --- a/src/views/jlmap3d/drive/drivecontrol/centerpane.vue +++ b/src/views/jlmap3d/drive/drivecontrol/centerpane.vue @@ -35,10 +35,6 @@ }, props: { - drawWay: { - type: String, - default: 'false' - }, groupNum: { type: String, default: null diff --git a/src/views/jlmap3d/drive/drivecontrol/drivecontrol.vue b/src/views/jlmap3d/drive/drivecontrol/drivecontrol.vue index 570ba0974..2b9f3672f 100644 --- a/src/views/jlmap3d/drive/drivecontrol/drivecontrol.vue +++ b/src/views/jlmap3d/drive/drivecontrol/drivecontrol.vue @@ -16,7 +16,7 @@ - + @@ -87,7 +87,6 @@ import axios from 'axios'; trainlist:null, groupnum:"", userrole:'', - drawWay:'', nowdrive:null, tuoguanbutton:false, diff --git a/src/views/lesson/details.vue b/src/views/lesson/details.vue index 819d73408..52e4e5c0c 100644 --- a/src/views/lesson/details.vue +++ b/src/views/lesson/details.vue @@ -86,13 +86,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, drawWay: this.$route.query.drawWay, lineCode:this.$route.query.lineCode}} ); + this.$router.push( {path: `/design/lesson/details/edit/lessonEdit`, query: {id: this.lessonId, cityCode: this.$route.query.cityCode, mapId: this.$route.query.mapId, lineCode:this.$route.query.lineCode}} ); }, 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, drawWay: this.$route.query.drawWay, lineCode:this.$route.query.lineCode}}); + 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, lineCode:this.$route.query.lineCode}}); }, 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, drawWay: this.$route.query.drawWay, lineCode:this.$route.query.lineCode}}); + 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, lineCode:this.$route.query.lineCode}}); }, showContextMenu(e, obj, node, vueElem) { if (obj && obj.type === 'Lesson' || obj.type === 'Chapter') { diff --git a/src/views/lesson/home.vue b/src/views/lesson/home.vue index 38ba9f500..5722f2deb 100644 --- a/src/views/lesson/home.vue +++ b/src/views/lesson/home.vue @@ -175,7 +175,7 @@ export default { this.$refs.queryListPage.refresh(true); }, lessonCreate() { - this.$router.push({ path: `${UrlConfig.design.lessonEdit}/lessonCreate`, query: {mapId: this.$route.params.mapId, cityCode: this.$route.query.cityCode, drawWay: this.$route.query.drawWay, lineCode: this.$route.query.lineCode} }); + this.$router.push({ path: `${UrlConfig.design.lessonEdit}/lessonCreate`, query: {mapId: this.$route.params.mapId, cityCode: this.$route.query.cityCode, lineCode: this.$route.query.lineCode} }); }, lessonCreateByPublish() { this.$nextTick(() => { @@ -204,14 +204,10 @@ export default { this.$router.push({path: `${UrlConfig.design.taskManage}`, query: {mapId: this.$route.params.mapId}}); }, trainingManage() { - if (this.$route.query.drawWay + '' === 'true') { - this.$router.push({path: `${UrlConfig.design.trainingManage}`, query: {mapId: this.$route.params.mapId, drawWay: this.$route.query.drawWay, lineCode: this.$route.query.lineCode}}); - } else { - this.$router.push({path: `${UrlConfig.design.trainingManageOld}`, query: {mapId: this.$route.params.mapId, drawWay: this.$route.query.drawWay, lineCode: this.$route.query.lineCode}}); - } + this.$router.push({path: `${UrlConfig.design.trainingManage}`, query: {mapId: this.$route.params.mapId, lineCode: this.$route.query.lineCode}}); }, operationManage() { - this.$router.push({path: `${UrlConfig.design.trainingRule}`, query: {mapId: this.$route.params.mapId, lineCode: this.$route.query.lineCode, drawWay: this.$route.query.drawWay}}); + 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'), { @@ -234,7 +230,7 @@ export default { this.$refs.lessonDetail.show(row.id); }, goDetail(index, row) { - this.$router.push({path: `/design/lesson/details`, query: {lessonId: row.id, lineCode: this.$route.query.lineCode, cityCode: this.$route.query.cityCode, mapId: this.$route.params.mapId, drawWay: this.$route.query.drawWay}}); + this.$router.push({path: `/design/lesson/details`, query: {lessonId: row.id, lineCode: this.$route.query.lineCode, cityCode: this.$route.query.cityCode, mapId: this.$route.params.mapId}}); } } }; diff --git a/src/views/lesson/lessoncategory/edit/chapter/index.vue b/src/views/lesson/lessoncategory/edit/chapter/index.vue index 0c6b49d82..e0dab1a76 100644 --- a/src/views/lesson/lessoncategory/edit/chapter/index.vue +++ b/src/views/lesson/lessoncategory/edit/chapter/index.vue @@ -217,7 +217,7 @@ export default { }); }, back() { - this.$router.push({ path: `${UrlConfig.design.lessonHome}/${this.$route.query.mapId}`, query: {cityCode: this.$route.query.cityCode, drawWay: this.$route.query.drawWay, lineCode: this.$route.query.lineCode} }); + this.$router.push({ path: `${UrlConfig.design.lessonHome}/${this.$route.query.mapId}`, query: {cityCode: this.$route.query.cityCode, lineCode: this.$route.query.lineCode} }); } } }; diff --git a/src/views/lesson/lessoncategory/edit/chapter/list.vue b/src/views/lesson/lessoncategory/edit/chapter/list.vue index 1726a4553..24c5ea541 100644 --- a/src/views/lesson/lessoncategory/edit/chapter/list.vue +++ b/src/views/lesson/lessoncategory/edit/chapter/list.vue @@ -158,11 +158,7 @@ export default { params['mapId'] = this.detail.mapId; params['prdType'] = this.detail.prdType; let res = ''; - if ((this.$route.query.drawWay + '') === 'true') { - res = await pageQueryTrainingNew(params); - } else { - res = await pageQueryTraining(params); - } + res = await pageQueryTrainingNew(params); res.data.list.forEach(item => { item.isShow = false; this.trainings.forEach(ele => { @@ -179,103 +175,40 @@ export default { getPublishMapListOnline().then(response => { this.mapIdList = response.data; }); - if (this.$route.query.drawWay + '' === 'true') { - this.trainingOperateTypeMap = getTrainingOperateTypeMap(); - const lineCode = this.$route.query.lineCode; - const res = await getCmdList(lineCode, {}); - const trainingOperateList = []; - const trainingOperateConfigList = []; - const operateTypeMap = { - Switch: [], - Section: [], - Signal: [], - Stand: [], - Station: [], - ControlConvertMenu: [], - TrainWindow: [], - LimitControl: [], - Driver: [] - }; - if (res && res.code === 200) { - res.data.forEach(item => { - (this.trainingOperateTypeMap[item.operateObject] || []).forEach(ele => { - if (ele.value == item.operate && !operateTypeMap[item.operateObject].includes(ele)) { - operateTypeMap[item.operateObject].push(ele); - } - }); - if (!trainingOperateList.includes(item.operateObject)) { - trainingOperateList.push(item.operateObject); - const objectLabel = ConstConfig.ConstSelect.trainingDeviceType[item.operateObject] || {}; - trainingOperateConfigList.push({value: item.operateObject, label: Cookies.get('user_lang') == 'en' ? objectLabel.enlabel : objectLabel.label}); + this.trainingOperateTypeMap = getTrainingOperateTypeMap(); + const lineCode = this.$route.query.lineCode; + const res = await getCmdList(lineCode, {}); + const trainingOperateList = []; + const trainingOperateConfigList = []; + const operateTypeMap = { + Switch: [], + Section: [], + Signal: [], + Stand: [], + Station: [], + ControlConvertMenu: [], + TrainWindow: [], + LimitControl: [], + Driver: [] + }; + if (res && res.code === 200) { + res.data.forEach(item => { + (this.trainingOperateTypeMap[item.operateObject] || []).forEach(ele => { + if (ele.value == item.operate && !operateTypeMap[item.operateObject].includes(ele)) { + operateTypeMap[item.operateObject].push(ele); } }); - this.queryForm.queryObject.type.config.data = trainingOperateConfigList; - this.trainingTypeList = trainingOperateConfigList; - this.trainingOperateTypeMap = operateTypeMap; - } else { - this.$message.error(this.$t('error.failedToObtainTrainingType')); - } + if (!trainingOperateList.includes(item.operateObject)) { + trainingOperateList.push(item.operateObject); + const objectLabel = ConstConfig.ConstSelect.trainingDeviceType[item.operateObject] || {}; + trainingOperateConfigList.push({value: item.operateObject, label: Cookies.get('user_lang') == 'en' ? objectLabel.enlabel : objectLabel.label}); + } + }); + this.queryForm.queryObject.type.config.data = trainingOperateConfigList; + this.trainingTypeList = trainingOperateConfigList; + this.trainingOperateTypeMap = operateTypeMap; } else { - this.trainingOperateTypeMap = {}; - this.$Dictionary.stationControl().then(list => { - this.trainingOperateTypeMap['01'] = []; // 控制权实训 - list.forEach(item => { - this.trainingOperateTypeMap['01'].push({value: item.code, label: item.name}); - }); - }); - this.$Dictionary.signalOperation().then(list => { - this.trainingOperateTypeMap['02'] = []; // 信号机实训 - list.forEach(item => { - this.trainingOperateTypeMap['02'].push({value: item.code, label: item.name}); - }); - }); - this.$Dictionary.switchOperation().then(list => { - this.trainingOperateTypeMap['03'] = []; // 道岔实训 - list.forEach(item => { - this.trainingOperateTypeMap['03'].push({value: item.code, label: item.name}); - }); - }); - this.$Dictionary.sectionOperation().then(list => { - this.trainingOperateTypeMap['04'] = []; // 区段实训 - list.forEach(item => { - this.trainingOperateTypeMap['04'].push({value: item.code, label: item.name}); - }); - }); - this.$Dictionary.stationStandOperation().then(list => { - this.trainingOperateTypeMap['05'] = []; // 站台实训 - list.forEach(item => { - this.trainingOperateTypeMap['05'].push({value: item.code, label: item.name}); - }); - }); - this.$Dictionary.trainPlanOperation().then(list => { - this.trainingOperateTypeMap['06'] = []; // 行车计划实训 - list.forEach(item => { - this.trainingOperateTypeMap['06'].push({value: item.code, label: item.name}); - }); - }); - this.$Dictionary.trainOperation().then(list => { - this.trainingOperateTypeMap['07'] = []; // 列车实训 - list.forEach(item => { - this.trainingOperateTypeMap['07'].push({value: item.code, label: item.name}); - }); - }); - this.$Dictionary.limitOperation().then(list => { - this.trainingOperateTypeMap['08'] = []; // 限速实训 - list.forEach(item => { - this.trainingOperateTypeMap['08'].push({value: item.code, label: item.name}); - }); - }); - // 获取实训类型 - this.trainingTypeList = []; - this.$Dictionary.trainingType().then(list => { - this.trainingTypeList = list; - list.forEach(elem => { - this.queryForm.queryObject.type.config.data.push({ - value: elem.code, - label: elem.name - }); - }); - }); + this.$message.error(this.$t('error.failedToObtainTrainingType')); } const json = localStore.get(this.$route.path); if (json && json.type) { diff --git a/src/views/lesson/lessoncategory/edit/lesson/index.vue b/src/views/lesson/lessoncategory/edit/lesson/index.vue index 4f6460801..012db9d59 100644 --- a/src/views/lesson/lessoncategory/edit/lesson/index.vue +++ b/src/views/lesson/lessoncategory/edit/lesson/index.vue @@ -189,7 +189,7 @@ export default { } }, back() { - this.$router.push({ path: `${UrlConfig.design.lessonHome}/${this.$route.query.mapId}`, query: {cityCode: this.$route.query.cityCode, lineCode: this.$route.query.lineCode, drawWay: this.$route.query.drawWay} }); + this.$router.push({ path: `${UrlConfig.design.lessonHome}/${this.$route.query.mapId}`, query: {cityCode: this.$route.query.cityCode, lineCode: this.$route.query.lineCode} }); } } }; diff --git a/src/views/lesson/trainingRule/list.vue b/src/views/lesson/trainingRule/list.vue index 2e1f18357..c971096b7 100644 --- a/src/views/lesson/trainingRule/list.vue +++ b/src/views/lesson/trainingRule/list.vue @@ -160,77 +160,13 @@ export default { }, methods: { init() { - if (this.$route.query.drawWay + '' === 'true') { - this.trainingOperateTypeMap = getTrainingOperateTypeMap(); - let val; - const trainingDeviceTypeList = ConstConfig.ConstSelect.trainingDeviceType || {}; - for (val in trainingDeviceTypeList) { - this.trainingTypeList.push({code: val, name: Cookies.get('user_lang') == 'en' ? trainingDeviceTypeList[val].enlabel : trainingDeviceTypeList[val].label}); - this.queryForm.queryObject.trainingType.config.data.push({value: val, label: Cookies.get('user_lang') == 'en' ? trainingDeviceTypeList[val].enlabel : trainingDeviceTypeList[val].label}); - } - } else { - this.trainingOperateTypeMap = {}; - this.$Dictionary.stationControl().then(list => { - this.trainingOperateTypeMap['01'] = []; // 控制权实训 - list.forEach(item => { - this.trainingOperateTypeMap['01'].push({value: item.code, label: item.name}); - }); - }); - this.$Dictionary.signalOperation().then(list => { - this.trainingOperateTypeMap['02'] = []; // 信号机实训 - list.forEach(item => { - this.trainingOperateTypeMap['02'].push({value: item.code, label: item.name}); - }); - }); - this.$Dictionary.switchOperation().then(list => { - this.trainingOperateTypeMap['03'] = []; // 道岔实训 - list.forEach(item => { - this.trainingOperateTypeMap['03'].push({value: item.code, label: item.name}); - }); - }); - this.$Dictionary.sectionOperation().then(list => { - this.trainingOperateTypeMap['04'] = []; // 区段实训 - list.forEach(item => { - this.trainingOperateTypeMap['04'].push({value: item.code, label: item.name}); - }); - }); - this.$Dictionary.stationStandOperation().then(list => { - this.trainingOperateTypeMap['05'] = []; // 站台实训 - list.forEach(item => { - this.trainingOperateTypeMap['05'].push({value: item.code, label: item.name}); - }); - }); - this.$Dictionary.trainPlanOperation().then(list => { - this.trainingOperateTypeMap['06'] = []; // 行车计划实训 - list.forEach(item => { - this.trainingOperateTypeMap['06'].push({value: item.code, label: item.name}); - }); - }); - this.$Dictionary.trainOperation().then(list => { - this.trainingOperateTypeMap['07'] = []; // 列车实训 - list.forEach(item => { - this.trainingOperateTypeMap['07'].push({value: item.code, label: item.name}); - }); - }); - this.$Dictionary.limitOperation().then(list => { - this.trainingOperateTypeMap['08'] = []; // 限速实训 - list.forEach(item => { - this.trainingOperateTypeMap['08'].push({value: item.code, label: item.name}); - }); - }); - // 获取实训类型 - this.trainingTypeList = []; - this.$Dictionary.trainingType().then(list => { - this.trainingTypeList = list; - list.forEach(elem => { - this.queryForm.queryObject.trainingType.config.data.push({ - value: elem.code, - label: elem.name - }); - }); - }); + this.trainingOperateTypeMap = getTrainingOperateTypeMap(); + let val; + const trainingDeviceTypeList = ConstConfig.ConstSelect.trainingDeviceType || {}; + for (val in trainingDeviceTypeList) { + this.trainingTypeList.push({code: val, name: Cookies.get('user_lang') == 'en' ? trainingDeviceTypeList[val].enlabel : trainingDeviceTypeList[val].label}); + this.queryForm.queryObject.trainingType.config.data.push({value: val, label: Cookies.get('user_lang') == 'en' ? trainingDeviceTypeList[val].enlabel : trainingDeviceTypeList[val].label}); } - this.placeholderMap = {}; getPlaceholderList({ trainingType: '' }).then(res => { res.data.forEach(item => { diff --git a/src/views/lesson/trainingmanage/draft.vue b/src/views/lesson/trainingmanage/draft.vue index 00494fbc3..961efcbbc 100644 --- a/src/views/lesson/trainingmanage/draft.vue +++ b/src/views/lesson/trainingmanage/draft.vue @@ -270,17 +270,10 @@ export default { 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; - } + addAutoTrainingFunction = addAutoTrainingNew; + updateAutoTrainingFunction = updateAutoTrainingNew; + deleteAutoTrainingFunction = deleteAutoTrainingNew; + addTrainingFunction = addTrainingNew; this.$refs.form.validate((valid) => { if (valid) { this.loading = true; diff --git a/src/views/lesson/trainingmanage/index.vue b/src/views/lesson/trainingmanage/index.vue index be4556b4d..b129ba900 100644 --- a/src/views/lesson/trainingmanage/index.vue +++ b/src/views/lesson/trainingmanage/index.vue @@ -148,9 +148,6 @@ export default { ? 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 + ''; - }, project() { return getSessionStorage('project'); } @@ -304,29 +301,17 @@ 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*/ - if (this.loadingProjectList.includes(this.project)) { - this.$store.dispatch('app/transitionAnimations'); - } - const query = { group: resp.data, trainingId: node.id, lessonId: 0, mapId: this.$route.query.mapId, lineCode: this.$route.query.lineCode }; - 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 }; - this.$router.push({ path: `${UrlConfig.display}/manage`, query: query }); - launchFullscreen(); - }).catch(error => { - this.$messageBox(this.$t('error.createSimulationFailed') + error.message); - }); - } - + trainingNotifyNew({ trainingId: node.id }).then(resp => { + /** 区分演示和正式,需要在演示时设置lessonId为0*/ + if (this.loadingProjectList.includes(this.project)) { + this.$store.dispatch('app/transitionAnimations'); + } + const query = { group: resp.data, trainingId: node.id, lessonId: 0, mapId: this.$route.query.mapId, lineCode: this.$route.query.lineCode }; + this.$router.push({ path: `${UrlConfig.displayNew}/manage`, query: query }); + launchFullscreen(); + }).catch(error => { + this.$messageBox(this.$t('error.createSimulationFailed') + error.message); + }); }, reloadTable() { this.queryList.reload(); @@ -335,30 +320,16 @@ 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}`); - }); - } - + 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}`); + }); }, queryFunction(params) { params['mapId'] = this.$route.query.mapId; - if (this.drawWay === 'true') { - return pageQueryTrainingNew(params); - } else { - return pageQueryTraining(params); - } + return pageQueryTrainingNew(params); } } }; diff --git a/src/views/lesson/trainingmanage/oldMap.vue b/src/views/lesson/trainingmanage/oldMap.vue deleted file mode 100644 index 5b69d6a12..000000000 --- a/src/views/lesson/trainingmanage/oldMap.vue +++ /dev/null @@ -1,381 +0,0 @@ - - - - diff --git a/src/views/login/index.vue b/src/views/login/index.vue index f52812b23..88bcea65c 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -490,7 +490,6 @@ export default { getSimulationInfoNew(res.data.group).then(resp => { const query = { group: res.data.group, - drawWay: true, mapId: resp.data.map.id, lineCode:resp.data.map.lineCode, projectDevice: this.$route.query.projectDevice, diff --git a/src/views/newMap/chatView/chatBox.vue b/src/views/newMap/chatView/chatBox.vue index 08e421675..a442f3983 100644 --- a/src/views/newMap/chatView/chatBox.vue +++ b/src/views/newMap/chatView/chatBox.vue @@ -441,6 +441,7 @@ export default { children: parentDepartmentList }]; this.initCommonMemberList(); + this.filterNode(); // this.$nextTick(() => { // if (this.$refs.tree) { // this.$refs.tree.filter(this.queryMember); diff --git a/src/views/newMap/displayNew/menuSchema.vue b/src/views/newMap/displayNew/menuSchema.vue index 5f09f28c6..691770cf3 100644 --- a/src/views/newMap/displayNew/menuSchema.vue +++ b/src/views/newMap/displayNew/menuSchema.vue @@ -91,10 +91,6 @@ export default { isLocalStation() { return this.$store.state.training.prdType === '01'; }, - drawWay() { - const drawWay = this.$route.query.drawWay; - return drawWay && JSON.parse(drawWay); - }, running() { return this.$store.state.training.started; }, diff --git a/src/views/newMap/displayNew/scriptDisplay/scriptPreview/index.vue b/src/views/newMap/displayNew/scriptDisplay/scriptPreview/index.vue index 8f3d308f6..e4410594e 100644 --- a/src/views/newMap/displayNew/scriptDisplay/scriptPreview/index.vue +++ b/src/views/newMap/displayNew/scriptDisplay/scriptPreview/index.vue @@ -99,10 +99,6 @@ export default { }, prdType() { return this.$store.state.training.prdType; - }, - drawWay() { - const drawWay = this.$route.query.drawWay; - return drawWay && JSON.parse(drawWay); } }, watch: { @@ -131,7 +127,7 @@ export default { }, async selectRole(role) { try { - const res = this.drawWay ? await loadDraftScriptNew(role.id, this.group) : await loadDraftScript(this.$route.query.scriptId, role.id, this.group); + const res = await loadDraftScriptNew(role.id, this.group); if (res && res.code == 200) { if (this.querymapLocation) { const newMapLocation = {'offsetX': this.mapLocation.x, 'offsetY': this.mapLocation.y, 'scaleRate': this.mapLocation.scale}; diff --git a/src/views/newMap/jointTrainingNew/memberManage/content-menu.vue b/src/views/newMap/jointTrainingNew/memberManage/content-menu.vue index a537967dc..1064b94a2 100644 --- a/src/views/newMap/jointTrainingNew/memberManage/content-menu.vue +++ b/src/views/newMap/jointTrainingNew/memberManage/content-menu.vue @@ -38,9 +38,6 @@ export default { position() { return this.$store.state.menuOperation.menuPosition; }, - drawWay() { - return this.$route.query.drawWay + ''; - }, menu() { return [{ label: this.$t('trainRoom.kickOutTheRoom'), diff --git a/src/views/newMap/jointTrainingNew/memberManage/membersManage.vue b/src/views/newMap/jointTrainingNew/memberManage/membersManage.vue index 3c8ce2ae6..c2b4e1ef0 100644 --- a/src/views/newMap/jointTrainingNew/memberManage/membersManage.vue +++ b/src/views/newMap/jointTrainingNew/memberManage/membersManage.vue @@ -123,9 +123,6 @@ export default { group() { return this.$route.query.group; }, - drawWay() { - return this.$route.query.drawWay + ''; - }, userId() { return this.$store.state.user ? this.$store.state.user.id : ''; }, diff --git a/src/views/planMonitor/detail.vue b/src/views/planMonitor/detail.vue index 425423edb..9c1b38699 100644 --- a/src/views/planMonitor/detail.vue +++ b/src/views/planMonitor/detail.vue @@ -162,9 +162,6 @@ export default { hasRelease() { return this.$store.state.user.roles.includes('04') || this.$store.state.user.roles.includes('05'); - }, - drawWay() { - return this.$route.query.drawWay + ''; } }, watch: { @@ -226,7 +223,7 @@ export default { if (refresh) { this.$store.dispatch('runPlan/refresh'); } else { - const query = { lineCode: lineCode, mapId: this.$route.params.mapId, planId: planId, planName: planName, drawWay:this.drawWay }; + const query = { lineCode: lineCode, mapId: this.$route.params.mapId, planId: planId, planName: planName }; this.$router.push({ path: `/plan/tool`, query: query }); } }, diff --git a/src/views/planMonitor/editTool/index.vue b/src/views/planMonitor/editTool/index.vue index 502bded14..4217cde34 100644 --- a/src/views/planMonitor/editTool/index.vue +++ b/src/views/planMonitor/editTool/index.vue @@ -123,9 +123,6 @@ export default { }, height() { return this.$store.state.app.height; - }, - drawWay() { - return this.$route.query.drawWay + ''; } }, created() { diff --git a/src/views/planMonitor/editTool/menus/addTask.vue b/src/views/planMonitor/editTool/menus/addTask.vue index a775903bc..003746e91 100644 --- a/src/views/planMonitor/editTool/menus/addTask.vue +++ b/src/views/planMonitor/editTool/menus/addTask.vue @@ -205,9 +205,6 @@ export default { computed: { title() { return this.$t('planMonitor.addTask'); - }, - drawWay() { - return this.$route.query.drawWay + ''; } }, watch: { @@ -253,27 +250,7 @@ export default { } const mapId = this.$route.query.mapId; - if (mapId && this.drawWay == 'false') { - getStationRunning(mapId).then(resp => { // 查询是否有站间运行时间 - const list = resp.data; - list.forEach(elem => { - this.stopStationMap[[elem.startSectionCode, elem.endSectionCode].toString()] = elem; - }); - if (list && list.length) { - list.forEach(elem => { - if (!elem.runPlanLevelVO) { - this.$alert(`${this.$t('planMonitor.tipOperationTime')}`, { - confirmButtonText: this.$t('global.confirm'), - callback: action => { - this.doClose(); - } - }); - } - }); - - } - }); - } else if (mapId && this.drawWay == 'true') { + if (mapId) { getMapStationRun(mapId).then(resp =>{ const list = resp.data; list.forEach(elem => { diff --git a/src/views/planMonitor/editTool/menus/modifyingStationIntervalTime.vue b/src/views/planMonitor/editTool/menus/modifyingStationIntervalTime.vue index 1959faa44..c1b47c083 100644 --- a/src/views/planMonitor/editTool/menus/modifyingStationIntervalTime.vue +++ b/src/views/planMonitor/editTool/menus/modifyingStationIntervalTime.vue @@ -32,23 +32,17 @@ {{ formatName(scope.row.endSectionCode) }} - - - - + -
+
@@ -52,7 +52,6 @@ export default { lessonName: '', formData: {}, mapId: '', - drawWay: false, lineCode: '', OrganizationList: [] }; @@ -83,7 +82,6 @@ export default { if (elem.id === val.region) { this.mapId = elem.mapId; getPublishMapInfo(this.mapId).then(res=>{ - this.drawWay = res.data.drawWay; this.lineCode = res.data.lineCode; }); } @@ -115,7 +113,6 @@ export default { }); const res = await getPublishMapInfo(this.mapId); if (res.data) { - this.drawWay = res.data.drawWay; this.lineCode = res.data.lineCode; } }, diff --git a/src/views/publish/examRule/draft/rule.vue b/src/views/publish/examRule/draft/rule.vue index 5340fc303..51196dfb0 100644 --- a/src/views/publish/examRule/draft/rule.vue +++ b/src/views/publish/examRule/draft/rule.vue @@ -17,7 +17,6 @@ { - this.trainingOperateTypeMap['01'] = list; // 控制权实训 - }); - this.$Dictionary.signalOperation().then(list => { - this.trainingOperateTypeMap['02'] = list; // 信号机实训 - }); - this.$Dictionary.switchOperation().then(list => { - this.trainingOperateTypeMap['03'] = list; // 道岔实训 - }); - this.$Dictionary.sectionOperation().then(list => { - this.trainingOperateTypeMap['04'] = list; // 区段实训 - }); - this.$Dictionary.stationStandOperation().then(list => { - this.trainingOperateTypeMap['05'] = list; // 站台实训 - }); - this.$Dictionary.trainPlanOperation().then(list => { - this.trainingOperateTypeMap['06'] = list; // 行车计划实训 - }); - this.$Dictionary.trainOperation().then(list => { - this.trainingOperateTypeMap['07'] = list; // 列车实训 - }); - } + this.trainingOperateTypeMap = getTrainingOperateTypeMap(); await this.getList(); await this.init(); }, methods: { async getList() { this.typeList = []; - if (this.drawWay) { - for (const val in ConstConfig.ConstSelect.trainingDeviceType) { - this.typeList.push({name: LangStorage.getLang() == 'en' ? ConstConfig.ConstSelect.trainingDeviceType[val].enlabel : ConstConfig.ConstSelect.trainingDeviceType[val].label, code: val}); - } - } else { - await getDetailList('training_type').then(res => { - this.typeList = res.data; - }).catch(error => { - console.error(error); - }); + for (const val in ConstConfig.ConstSelect.trainingDeviceType) { + this.typeList.push({name: LangStorage.getLang() == 'en' ? ConstConfig.ConstSelect.trainingDeviceType[val].enlabel : ConstConfig.ConstSelect.trainingDeviceType[val].label, code: val}); } }, async init() { diff --git a/src/views/publish/publishMap/index.vue b/src/views/publish/publishMap/index.vue index e3870c6d4..6c2ac76f5 100644 --- a/src/views/publish/publishMap/index.vue +++ b/src/views/publish/publishMap/index.vue @@ -136,7 +136,6 @@ export default { { name: this.$t('publish.simulationDataCheck'), handleClick: this.handleSimulationCheck, - showControl: (row) => { return row.drawWay; } }, { name: '导入', diff --git a/src/views/scriptManage/home.vue b/src/views/scriptManage/home.vue index c4f52deb1..dba16ecb4 100644 --- a/src/views/scriptManage/home.vue +++ b/src/views/scriptManage/home.vue @@ -132,25 +132,13 @@ export default { } }, drawUp(index, row) { - const drawWay = this.$route.query.drawWay; - if (drawWay && JSON.parse(drawWay)) { - 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 }); - launchFullscreen(); - }).catch(error => { - this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`); - }); - } - + scriptRecordNotifyNew(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.scriptDisplayNew}/script`, query }); + launchFullscreen(); + }).catch(error => { + this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`); + }); }, deleteScript(index, row) { this.$confirm(this.$t('scriptRecord.deleteScriptTip'), this.$t('global.tips'), { @@ -271,28 +259,16 @@ export default { }, // 剧本预览 previewScript(index, row) { - const drawWay = this.$route.query.drawWay; - if (drawWay && JSON.parse(drawWay)) { - scriptDraftRecordNotifyNew(row.id).then(resp => { - if (this.loadingProjectList.includes(this.project)) { - this.$store.dispatch('app/transitionAnimations'); - } - const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0, lineCode:this.$route.query.lineCode, drawWay:true}; - this.$router.push({ path: `${UrlConfig.design.displayNew}/demon`, query }); - launchFullscreen(); - }).catch(error => { - this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`); - }); - } else { - scriptDraftRecordNotify(row.id).then(resp => { - const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0, lineCode:this.$route.query.lineCode, drawWay:false}; - this.$router.push({ path: `${UrlConfig.design.display}/demon`, query }); - launchFullscreen(); - }).catch(error => { - this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`); - }); - } - + scriptDraftRecordNotifyNew(row.id).then(resp => { + if (this.loadingProjectList.includes(this.project)) { + this.$store.dispatch('app/transitionAnimations'); + } + const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0, lineCode:this.$route.query.lineCode}; + this.$router.push({ path: `${UrlConfig.design.displayNew}/demon`, query }); + launchFullscreen(); + }).catch(error => { + this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`); + }); } } }; diff --git a/src/views/teach/detail/index.vue b/src/views/teach/detail/index.vue index 9d7f2744a..9c1b1a626 100644 --- a/src/views/teach/detail/index.vue +++ b/src/views/teach/detail/index.vue @@ -79,7 +79,6 @@ export default { }, lineCode: '', // 线路皮肤码 expandList: [], - drawWay: false, loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts'] }; }, @@ -116,7 +115,6 @@ export default { initLoadPage() { getPublishMapInfo(this.$route.query.mapId).then(res => { if (res.data) { - this.drawWay = res.data.drawWay; this.lineCode = res.data.lineCode; } }).catch(() => { @@ -151,36 +149,23 @@ 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, lineCode: this.lineCode, noPreLogout: this.$route.query.noPreLogout - }; - if (this.loadingProjectList.includes(this.project)) { - this.$store.dispatch('app/transitionAnimations'); - } - if (this.$route.query.noPreLogout) { - this.$router.replace({ path: `${UrlConfig.displayNew}/teach`, query: query }); - } else { - 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 - }; - this.$router.push({ path: `${UrlConfig.display}/teach`, query: query }); - launchFullscreen(); - }).catch(error => { - this.$messageBox(`${this.$t('tip.createSimulationFaild')} : ${error.message}`); - this.disabled = false; - }); - } + trainingNotifyNew({ trainingId: obj.id }).then(resp => { + const query = { + group: resp.data, trainingId: obj.id, lessonId: this.$route.query.lessonId, mapId: this.courseModel.mapId, lineCode: this.lineCode, noPreLogout: this.$route.query.noPreLogout + }; + if (this.loadingProjectList.includes(this.project)) { + this.$store.dispatch('app/transitionAnimations'); + } + if (this.$route.query.noPreLogout) { + this.$router.replace({ path: `${UrlConfig.displayNew}/teach`, query: query }); + } else { + this.$router.push({ path: `${UrlConfig.displayNew}/teach`, query: query }); + } + launchFullscreen(); + }).catch(error => { + 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'), diff --git a/src/views/trainRoom/add-person.vue b/src/views/trainRoom/add-person.vue deleted file mode 100644 index 69945f579..000000000 --- a/src/views/trainRoom/add-person.vue +++ /dev/null @@ -1,164 +0,0 @@ - - - - - diff --git a/src/views/trainRoom/content-menu.vue b/src/views/trainRoom/content-menu.vue deleted file mode 100644 index 5a95c8c58..000000000 --- a/src/views/trainRoom/content-menu.vue +++ /dev/null @@ -1,92 +0,0 @@ - - - - diff --git a/src/views/trainRoom/e-chat.vue b/src/views/trainRoom/e-chat.vue deleted file mode 100644 index 9e60dc2f6..000000000 --- a/src/views/trainRoom/e-chat.vue +++ /dev/null @@ -1,499 +0,0 @@ -